Commit c5c338ea authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

change so that in normal dist a max can be calculated (if not given) even if...

change so that in normal dist a max can be calculated (if not given) even if the mean and stdev are given as strings
parent 82c748bf
......@@ -52,7 +52,7 @@ class Assembly(CoreObject):
}
if processingTime['distributionType'] == 'Normal' and\
processingTime.get('max', None) is None:
processingTime['max'] = processingTime['mean'] + 5 * processingTime['stdev']
processingTime['max'] = float(processingTime['mean']) + 5 * float(processingTime['stdev'])
CoreObject.__init__(self, id, name)
self.type="Assembly" #String that shows the type of object
......
......@@ -54,7 +54,7 @@ class BatchDecomposition(CoreObject):
'mean': 1, }
if processingTime['distributionType'] == 'Normal' and\
processingTime.get('max', None) is None:
processingTime['max'] = processingTime['mean'] + 5 * processingTime['stdev']
processingTime['max'] = float(processingTime['mean']) + 5 * float(processingTime['stdev'])
# holds the capacity of the object
self.numberOfSubBatches=numberOfSubBatches
......
......@@ -52,7 +52,7 @@ class BatchReassembly(CoreObject):
'mean': 1, }
if processingTime['distributionType'] == 'Normal' and\
processingTime.get('max', None) is None:
processingTime['max'] = processingTime['mean'] + 5 * processingTime['stdev']
processingTime['max'] = float(processingTime['mean']) + 5 * float(processingTime['stdev'])
# holds the capacity of the object
self.numberOfSubBatches=numberOfSubBatches
......
......@@ -60,21 +60,21 @@ class Machine(CoreObject):
'mean': 1, }
if processingTime['distributionType'] == 'Normal' and\
processingTime.get('max', None) is None:
processingTime['max'] = processingTime['mean'] + 5 * processingTime['stdev']
processingTime['max'] = float(processingTime['mean']) + 5 * float(processingTime['stdev'])
if not setupTime:
setupTime = { 'distributionType': 'Fixed',
'mean': 1, }
if setupTime['distributionType'] == 'Normal' and\
setupTime.get('max', None) is None:
setupTime['max'] = setupTime['mean'] + 5 * setupTime['stdev']
setupTime['max'] = float(setupTime['mean']) + 5 * float(setupTime['stdev'])
if not loadTime:
loadTime = { 'distributionType': 'Fixed',
'mean': 1, }
if loadTime['distributionType'] == 'Normal' and\
loadTime.get('max', None) is None:
loadTime['max'] = loadTime['mean'] + 5 * loadTime['stdev']
loadTime['max'] = float(loadTime['mean']) + 5 * float(loadTime['stdev'])
# holds the capacity of the machine
self.capacity=capacity
......
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