releaseOperator of MachineManagedJob collapsed to Machine

parent 38b7b0a5
...@@ -206,6 +206,11 @@ class Machine(CoreObject): ...@@ -206,6 +206,11 @@ class Machine(CoreObject):
# reset the canProceedWithGetEntity flag # reset the canProceedWithGetEntity flag
self.canProceedWithGetEntity=False self.canProceedWithGetEntity=False
#===================================================================
# # TESTING
# print now(), self.id, 'is in position to get'
#===================================================================
# if the machine must be operated for the loading then the operators must be picked wisely for every machine # if the machine must be operated for the loading then the operators must be picked wisely for every machine
if (self.operatorPool!="None")\ if (self.operatorPool!="None")\
and any(type=="Load" for type in self.multOperationTypeList): and any(type=="Load" for type in self.multOperationTypeList):
...@@ -729,6 +734,8 @@ class Machine(CoreObject): ...@@ -729,6 +734,8 @@ class Machine(CoreObject):
# ======================================================================= # =======================================================================
def releaseOperator(self): def releaseOperator(self):
self.outputTrace(self.currentOperator.objName, "released from "+ self.objName) self.outputTrace(self.currentOperator.objName, "released from "+ self.objName)
# set the flag operatorAssignedTo to None
self.currentOperator.operatorAssignedTo=None
self.broker.invokeBroker() self.broker.invokeBroker()
self.toBeOperated = False self.toBeOperated = False
......
...@@ -193,15 +193,15 @@ class MachineManagedJob(MachineJobShop): ...@@ -193,15 +193,15 @@ class MachineManagedJob(MachineJobShop):
# return True # return True
# ======================================================================= # # =======================================================================
# prepare the machine to be released # # prepare the machine to be released
# ======================================================================= # # =======================================================================
def releaseOperator(self): # def releaseOperator(self):
self.outputTrace(self.currentOperator.objName, "released from "+ self.objName) # self.outputTrace(self.currentOperator.objName, "released from "+ self.objName)
# # TESTING # # # TESTING
# print now(), self.id, 'will release operator', self.operatorPool.operators[0].objName # # print now(), self.id, 'will release operator', self.operatorPool.operators[0].objName
# set the flag operatorAssignedTo to None # # set the flag operatorAssignedTo to None
self.operatorPool.operators[0].operatorAssignedTo=None # self.currentOperator.operatorAssignedTo=None
self.broker.invokeBroker() # self.broker.invokeBroker()
self.toBeOperated = False # self.toBeOperated = 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