Commit f3ebd848 authored by Jérome Perrin's avatar Jérome Perrin

Apply 65ea4ef8 to new way of defining default distributions

parent d79a65f6
......@@ -43,8 +43,11 @@ class Assembly(CoreObject):
'mean': 0,
'stdev': 0,
'min': 0,
'max': 0,
}
if processingTime['distributionType'] == 'Normal' and\
processingTime.get('max', None) is None:
processingTime['max'] = processingTime['mean'] + 5 * processingTime['stdev']
CoreObject.__init__(self, id, name)
self.type="Assembly" #String that shows the type of object
self.rng=RandomNumberGenerator(self, **processingTime)
......
......@@ -60,7 +60,10 @@ class Machine(CoreObject):
'mean': 1,
'stdev': 0,
'min': 0,
'max': 10}
}
if processingTime['distributionType'] == 'Normal' and\
processingTime.get('max', None) is None:
processingTime['max'] = processingTime['mean'] + 5 * processingTime['stdev']
# holds the capacity of the machine
self.capacity=capacity
......
......@@ -39,6 +39,9 @@ class Source(CoreObject):
# Default values
if not interarrivalTime:
interarrivalTime = {'distributionType': 'Fixed', 'mean': 1}
if interarrivalTime['distributionType'] == 'Normal' and\
interarrivalTime.get('max', None) is None:
interarrivalTime['max'] = interarrivalTime['mean'] + 5 * interarrivalTime['stdev']
CoreObject.__init__(self, id, name)
# properties used for statistics
......
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