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):
#Process.__init__(self)
ObjectInterruption.__init__(self,victim)
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.MTTR=distribution.get('MTTR',5) # the MTTR
self.availability=distribution.get('availability',100) # the availability
......
......@@ -389,7 +389,7 @@ def createObjects():
scrMin=int(scrapQuantity.get('min') or 0)
scrMax=int(scrapQuantity.get('max') or mean+5*stdev)
failures=element.get('failures', {})
failureDistribution=failures.get('failureDistribution', 'not found')
failureDistribution=failures.get('distributionType', 'not found')
MTTF=float(failures.get('MTTF') or 0)
MTTR=float(failures.get('MTTR') or 0)
availability=float(failures.get('availability') or 0)
......@@ -412,7 +412,7 @@ def createObjects():
name=element.get('name', 'not found')
processingTime=element.get('processingTime', {})
failures=element.get('failures', {})
failureDistribution=failures.get('failureDistribution', 'not found')
failureDistribution=failures.get('distributionType', 'not found')
MTTF=float(failures.get('MTTF') or 0)
MTTR=float(failures.get('MTTR') or 0)
availability=float(failures.get('availability') or 0)
......@@ -465,7 +465,7 @@ def createObjects():
name=element.get('name', 'not found')
processingTime=element.get('processingTime', None)
failures=element.get('failures', {})
failureDistribution=failures.get('failureDistribution', 'not found')
failureDistribution=failures.get('distributionType', 'not found')
MTTF=float(failures.get('MTTF') or 0)
MTTR=float(failures.get('MTTR') or 0)
availability=float(failures.get('availability') or 0)
......@@ -680,7 +680,7 @@ def createObjects():
min=float(processingTime.get('min') or 0)
max=float(processingTime.get('max') or mean+5*stdev)
failures=element.get('failures', {})
failureDistribution=failures.get('failureDistribution', 'not found')
failureDistribution=failures.get('distributionType', 'not found')
MTTF=float(failures.get('MTTF') or 0)
MTTR=float(failures.get('MTTR') or 0)
availability=float(failures.get('availability') or 0)
......@@ -768,7 +768,7 @@ def createObjects():
name=element.get('name', 'not found')
processingTime=element.get('processingTime', None)
failures=element.get('failures', {})
failureDistribution=failures.get('failureDistribution', 'not found')
failureDistribution=failures.get('distributionType', 'not found')
MTTF=float(failures.get('MTTF') or 0)
MTTR=float(failures.get('MTTR') or 0)
availability=float(failures.get('availability') or 0)
......@@ -1200,7 +1200,7 @@ def createObjectInterruptions():
# if there are failures assigned
# initiate them
if failure:
distributionType=failure.get('failureDistribution', 'No')
distributionType=failure.get('distributionType', 'No')
if distributionType=='No':
pass
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