Commit b0e13f2a authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

MachineJobShop and RandomNumberGenerator Correction

parent d8a9d506
......@@ -239,13 +239,14 @@ class MachineJobShop(Machine):
# check if the operation defined as an argument requires manual operation
#===========================================================================
def checkForManualOperation(self,type,entity=None):
typeDict={'Setup':'setupTime', 'Processing':'processingTime'}
assert type!=None, 'a type must be defined for the checkForManualOperation method'
if not entity:
activeEntity=self.getActiveObjectQueue()[0]
else:
activeEntity=entity
# read the definition of the time from the remainingRoute dict
time=activeEntity.remainingRoute[0].get(str(type),{})
time=activeEntity.remainingRoute[0].get(str(typeDict[str(type)]),{})
operationType=time.get('operationType', 'not defined')
# if the operationType is not 'not defined'
if operationType!='not defined':
......
......@@ -26,7 +26,7 @@ Created on 14 Feb 2013
holds methods for generations of numbers from different distributions
'''
class RandomNumberGenerator(object):
def __init__(self, obj, distributionType, mean=0, stdev=0, min=0, max=0, alpha=0, beta=0):
def __init__(self, obj, distributionType, mean=0, stdev=0, min=0, max=0, alpha=0, beta=0, **kwds):
self.distributionType = distributionType
self.mean = float(mean or 0)
self.stdev = float(stdev or 0)
......
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