Commit 89f5dd4c authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Jérome Perrin

MachineJobShop and RandomNumberGenerator Correction

parent 4494f7b2
...@@ -239,13 +239,14 @@ class MachineJobShop(Machine): ...@@ -239,13 +239,14 @@ class MachineJobShop(Machine):
# check if the operation defined as an argument requires manual operation # check if the operation defined as an argument requires manual operation
#=========================================================================== #===========================================================================
def checkForManualOperation(self,type,entity=None): def checkForManualOperation(self,type,entity=None):
typeDict={'Setup':'setupTime', 'Processing':'processingTime'}
assert type!=None, 'a type must be defined for the checkForManualOperation method' assert type!=None, 'a type must be defined for the checkForManualOperation method'
if not entity: if not entity:
activeEntity=self.getActiveObjectQueue()[0] activeEntity=self.getActiveObjectQueue()[0]
else: else:
activeEntity=entity activeEntity=entity
# read the definition of the time from the remainingRoute dict # 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') operationType=time.get('operationType', 'not defined')
# if the operationType is not 'not defined' # if the operationType is not 'not defined'
if operationType!='not defined': if operationType!='not defined':
......
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