Commit 9a28f2ba authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Jérome Perrin

corrections in createMould method of MouldAssembly

parent a7bd9e08
...@@ -64,6 +64,7 @@ TODOs: check the case when a mould is already in the WIP by the beginning of the ...@@ -64,6 +64,7 @@ TODOs: check the case when a mould is already in the WIP by the beginning of the
from MachineJobShop import MachineJobShop from MachineJobShop import MachineJobShop
import simpy import simpy
from Globals import G from Globals import G
from RandomNumberGenerator import RandomNumberGenerator
# ======================================================================= # =======================================================================
# Error in the assembling of the mould # Error in the assembling of the mould
...@@ -239,28 +240,32 @@ class MouldAssembly(MachineJobShop): ...@@ -239,28 +240,32 @@ class MouldAssembly(MachineJobShop):
processDistType=processingTime.get('distributionType','not found') processDistType=processingTime.get('distributionType','not found')
procTime=float(processingTime.get('mean', 0)) procTime=float(processingTime.get('mean', 0))
processOpType=processingTime.get('operationType','not found') # can be manual/automatic processOpType=processingTime.get('operationType','not found') # can be manual/automatic
processingTime=self.getOperationTime(processingTime) processingTime=self.getOperationTime(processingTime)
self.rng=RandomNumberGenerator(self, **processingTime) self.rng=RandomNumberGenerator(self, **processingTime)
self.procTime=self.rng.generateNumber() self.procTime=self.rng.generateNumber()
# setup operation # setup operation
setupTime=firstStep['setupTime'] setupTime=firstStep.get('setupTime',None)
# update the activeObject's processing time according to the readings in the mould's route if setupTime:
setupDistType=setup.get('distributionType','not found') # update the activeObject's processing time according to the readings in the mould's route
setupTime=float(setup.get('mean', 0)) setupDistType=setupTime.get('distributionType','not found')
setTime=float(setupTime.get('mean', 0))
setupOpType=setupTime.get('operationType','not found') # can be manual/automatic
setupTime=self.getOperationTime(setupTime)
self.stpRng=RandomNumberGenerator(self, **setupTime)
setupOpType=setup.get('operationType','not found') # can be manual/automatic # update the first step of the route with the activeObjects id as sole element of the stationIdsList
setupTime=self.getOperationTime(setupTime) route.insert(0, {'stationIdsList':[str(self.id)],'processingTime':{'distributionType':str(processDistType),\
self.stpRng=RandomNumberGenerator(self, **setupTime) 'mean':str(procTime),\
'operationType':str(processOpType)},\
# update the first step of the route with the activeObjects id as sole element of the stationIdsList 'setupTime':{'distributionType':str(setupDistType),\
route.insert(0, {'stationIdsList':[str(self.id)],'processingTime':{'distributionType':str(processDistType),\ 'mean':str(setupTime),\
'mean':str(procTime),\ 'operationType':str(setupOpType)}})
'operationType':str(processOpType)},\ else:
'setupTime':{'distributionType':str(setupDistType),\ # update the first step of the route with the activeObjects id as sole element of the stationIdsList
'mean':str(setupTime),\ route.insert(0, {'stationIdsList':[str(self.id)],'processingTime':{'distributionType':str(processDistType),\
'operationType':str(setupOpType)}}) 'mean':str(procTime),\
'operationType':str(processOpType)}})
#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
exitAssigned=False exitAssigned=False
......
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