Commit e48b2494 authored by Georgios Dagkakis's avatar Georgios Dagkakis

Main script and Failures editted to match new notation

parent 348ef368
...@@ -37,7 +37,7 @@ class Failure(ObjectInterruption): ...@@ -37,7 +37,7 @@ class Failure(ObjectInterruption):
#Process.__init__(self) #Process.__init__(self)
ObjectInterruption.__init__(self,victim) ObjectInterruption.__init__(self,victim)
if distribution: if distribution:
self.distType=distribution.get('failureDistribution','No') # the distribution that the failure duration follows self.distType=distribution.get('distributionType','No') # the distribution that the failure duration follows
self.MTTF=distribution.get('MTTF',60) # the MTTF self.MTTF=distribution.get('MTTF',60) # the MTTF
self.MTTR=distribution.get('MTTR',5) # the MTTR self.MTTR=distribution.get('MTTR',5) # the MTTR
self.availability=distribution.get('availability',100) # the availability self.availability=distribution.get('availability',100) # the availability
......
...@@ -389,7 +389,7 @@ def createObjects(): ...@@ -389,7 +389,7 @@ def createObjects():
scrMin=int(scrapQuantity.get('min') or 0) scrMin=int(scrapQuantity.get('min') or 0)
scrMax=int(scrapQuantity.get('max') or mean+5*stdev) scrMax=int(scrapQuantity.get('max') or mean+5*stdev)
failures=element.get('failures', {}) failures=element.get('failures', {})
failureDistribution=failures.get('failureDistribution', 'not found') failureDistribution=failures.get('distributionType', 'not found')
MTTF=float(failures.get('MTTF') or 0) MTTF=float(failures.get('MTTF') or 0)
MTTR=float(failures.get('MTTR') or 0) MTTR=float(failures.get('MTTR') or 0)
availability=float(failures.get('availability') or 0) availability=float(failures.get('availability') or 0)
...@@ -412,7 +412,7 @@ def createObjects(): ...@@ -412,7 +412,7 @@ def createObjects():
name=element.get('name', 'not found') name=element.get('name', 'not found')
processingTime=element.get('processingTime', {}) processingTime=element.get('processingTime', {})
failures=element.get('failures', {}) failures=element.get('failures', {})
failureDistribution=failures.get('failureDistribution', 'not found') failureDistribution=failures.get('distributionType', 'not found')
MTTF=float(failures.get('MTTF') or 0) MTTF=float(failures.get('MTTF') or 0)
MTTR=float(failures.get('MTTR') or 0) MTTR=float(failures.get('MTTR') or 0)
availability=float(failures.get('availability') or 0) availability=float(failures.get('availability') or 0)
...@@ -465,7 +465,7 @@ def createObjects(): ...@@ -465,7 +465,7 @@ def createObjects():
name=element.get('name', 'not found') name=element.get('name', 'not found')
processingTime=element.get('processingTime', None) processingTime=element.get('processingTime', None)
failures=element.get('failures', {}) failures=element.get('failures', {})
failureDistribution=failures.get('failureDistribution', 'not found') failureDistribution=failures.get('distributionType', 'not found')
MTTF=float(failures.get('MTTF') or 0) MTTF=float(failures.get('MTTF') or 0)
MTTR=float(failures.get('MTTR') or 0) MTTR=float(failures.get('MTTR') or 0)
availability=float(failures.get('availability') or 0) availability=float(failures.get('availability') or 0)
...@@ -680,7 +680,7 @@ def createObjects(): ...@@ -680,7 +680,7 @@ def createObjects():
min=float(processingTime.get('min') or 0) min=float(processingTime.get('min') or 0)
max=float(processingTime.get('max') or mean+5*stdev) max=float(processingTime.get('max') or mean+5*stdev)
failures=element.get('failures', {}) failures=element.get('failures', {})
failureDistribution=failures.get('failureDistribution', 'not found') failureDistribution=failures.get('distributionType', 'not found')
MTTF=float(failures.get('MTTF') or 0) MTTF=float(failures.get('MTTF') or 0)
MTTR=float(failures.get('MTTR') or 0) MTTR=float(failures.get('MTTR') or 0)
availability=float(failures.get('availability') or 0) availability=float(failures.get('availability') or 0)
...@@ -768,7 +768,7 @@ def createObjects(): ...@@ -768,7 +768,7 @@ def createObjects():
name=element.get('name', 'not found') name=element.get('name', 'not found')
processingTime=element.get('processingTime', None) processingTime=element.get('processingTime', None)
failures=element.get('failures', {}) failures=element.get('failures', {})
failureDistribution=failures.get('failureDistribution', 'not found') failureDistribution=failures.get('distributionType', 'not found')
MTTF=float(failures.get('MTTF') or 0) MTTF=float(failures.get('MTTF') or 0)
MTTR=float(failures.get('MTTR') or 0) MTTR=float(failures.get('MTTR') or 0)
availability=float(failures.get('availability') or 0) availability=float(failures.get('availability') or 0)
...@@ -1200,7 +1200,7 @@ def createObjectInterruptions(): ...@@ -1200,7 +1200,7 @@ def createObjectInterruptions():
# if there are failures assigned # if there are failures assigned
# initiate them # initiate them
if failure: if failure:
distributionType=failure.get('failureDistribution', 'No') distributionType=failure.get('distributionType', 'No')
if distributionType=='No': if distributionType=='No':
pass pass
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment