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

MouldAssembly createMould method corrected - operation times reading corrected

parent 1db697bb
...@@ -232,24 +232,34 @@ class MouldAssembly(MachineJobShop): ...@@ -232,24 +232,34 @@ class MouldAssembly(MachineJobShop):
firstStep = route.pop(0) firstStep = route.pop(0)
assert (self.id in firstStep.get('stationIdsList',[])),\ assert (self.id in firstStep.get('stationIdsList',[])),\
'the assembler must be in the mould-to-be-created route\' initial step' 'the assembler must be in the mould-to-be-created route\' initial step'
# normal processing operation # normal processing operation
processingTime=firstStep['processingTime'] processingTime=firstStep['processingTime']
# update the activeObject's processing time according to the readings in the mould's route # update the activeObject's processing time according to the readings in the mould's route
self.distType=processingTime.get('distributionType','not found') processDistType=processingTime.get('distributionType','not found')
self.procTime=float(processingTime.get('mean', 0)) procTime=float(processingTime.get('mean', 0))
procOpType=processingTime.get('operationType','not found') # can be manual/automatic processOpType=processingTime.get('operationType','not found') # can be manual/automatic
processingTime=self.getOperationTime(processingTime)
self.rng=RandomNumberGenerator(self, **processingTime)
self.procTime=self.rng.generateNumber()
# setup operation # setup operation
setupTime=firstStep['setupTime'] setupTime=firstStep['setupTime']
# update the activeObject's processing time according to the readings in the mould's route # update the activeObject's processing time according to the readings in the mould's route
self.distType=setup.get('distributionType','not found') setupDistType=setup.get('distributionType','not found')
self.setupTime=float(setup.get('mean', 0)) setupTime=float(setup.get('mean', 0))
setupOpType=setup.get('operationType','not found') # can be manual/automatic setupOpType=setup.get('operationType','not found') # can be manual/automatic
setupTime=self.getOperationTime(setupTime)
self.stpRng=RandomNumberGenerator(self, **setupTime)
# update the first step of the route with the activeObjects id as sole element of the stationIdsList # update the first step of the route with the activeObjects id as sole element of the stationIdsList
route.insert(0, {'stationIdsList':[str(self.id)],'processingTime':{'distributionType':str(self.distType),\ route.insert(0, {'stationIdsList':[str(self.id)],'processingTime':{'distributionType':str(processDistType),\
'mean':str(self.procTime),\ 'mean':str(procTime),\
'operationType':str(procOpType)},\ 'operationType':str(processOpType)},\
'setupTime':{'distributionType':str(self.distType),\ 'setupTime':{'distributionType':str(setupDistType),\
'mean':str(self.setupTime),\ 'mean':str(setupTime),\
'operationType':str(setupOpType)}}) 'operationType':str(setupOpType)}})
#Below it is to assign an exit if it was not assigned in JSON #Below it is to assign an exit if it was not assigned in JSON
#have to talk about it with NEX #have to talk about it with NEX
......
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