Minor correction in Machine (no operator is released if it is allready released). Small clean-up

parent dc2c50ed
...@@ -418,9 +418,9 @@ class Machine(CoreObject): ...@@ -418,9 +418,9 @@ class Machine(CoreObject):
# carry on actions that have to take place when an Entity ends its processing # carry on actions that have to take place when an Entity ends its processing
self.endProcessingActions() self.endProcessingActions()
# =============== release resource after the end of processing # =============== release resource after the end of processing
if (self.operatorPool!='None')\ if (self.operatorPool!='None')\
and self.isOperated()\
and any(type=="Processing" for type in self.multOperationTypeList)\ and any(type=="Processing" for type in self.multOperationTypeList)\
and not self.interruption: and not self.interruption:
self.releaseOperator() self.releaseOperator()
...@@ -653,11 +653,6 @@ class Machine(CoreObject): ...@@ -653,11 +653,6 @@ class Machine(CoreObject):
giverObject.assignExitTo(activeObject) giverObject.assignExitTo(activeObject)
elif giverObject.exitIsAssignedTo()!=activeObject: elif giverObject.exitIsAssignedTo()!=activeObject:
return False return False
# if the activeObject is not in operators' activeCallersList
if activeObject not in activeObject.operatorPool.operators[0].activeCallersList:
# append it to the activeCallerList of the operatorPool operators list
for operator in activeObject.operatorPool.operators:
operator.activeCallersList.append(activeObject)
return True return True
else: else:
return False return False
...@@ -813,13 +808,6 @@ class Machine(CoreObject): ...@@ -813,13 +808,6 @@ class Machine(CoreObject):
self.outputTrace(self.currentOperator.objName, "released from "+ self.objName) self.outputTrace(self.currentOperator.objName, "released from "+ self.objName)
# set the flag operatorAssignedTo to None # set the flag operatorAssignedTo to None
self.currentOperator.operatorAssignedTo=None self.currentOperator.operatorAssignedTo=None
# if the operationType is just Load and not Setup or Processing
# then clear the activeCallersList of the currentOperator
if any(type=='Load' for type in self.multOperationTypeList)\
and not (any(type=='Setup' for type in self.multOperationTypeList)\
or any(type=='Processing' for type in self.multOperationTypeList)):
self.currentOperator.activeCallersList=[]
self.broker.invoke() self.broker.invoke()
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