Commit 18769d8d authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

additions so that the movements of the operator are outputted in the Trace

parent 8a6b0745
......@@ -364,7 +364,7 @@ class Machine(CoreObject):
self.outputTrace(self.getActiveObjectQueue()[0].name,"ended processing in "+self.objName)
except IndexError:
pass
# =============== release resource after the end of processing
if (self.operatorPool!='None')\
and any(type=="Processing" for type in self.multOperationTypeList)\
......@@ -626,6 +626,7 @@ class Machine(CoreObject):
# prepare the machine to be released
# =======================================================================
def releaseOperator(self):
self.outputTrace(self.currentOperator.objName, "released from "+ self.objName)
self.broker.invokeBroker()
self.toBeOperated = False
......
......@@ -74,12 +74,12 @@ class Broker(ObjectInterruption):
self.timeWaitForOperatorStarted = 0
# update the time that the operation started
self.timeOperationStarted = now()
#self.victim.outputTrace(self.victim.currentOperator.objName, "started work "+self.victim.objName)
self.victim.outputTrace(self.victim.currentOperator.objName, "started work in "+ self.victim.objName)
self.victim.currentOperator.timeLastOperationStarted=now()
# ======= release a resource
elif not self.victim.isOperated():
self.victim.currentOperator.totalWorkingTime+=now()-self.victim.currentOperator.timeLastOperationStarted
#self.victim.outputTrace(self.victim.currentOperator.objName, "finished work "+self.victim.objName)
#self.victim.outputTrace(self.victim.currentOperator.objName, "left "+ self.victim.objName)
yield release,self,self.victim.operatorPool.getResource(self.victim.currentOperator)
# the victim current operator must be cleared after the operator is released
self.timeLastOperationEnded = now()
......
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