Commit 739996b3 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

addBlockage added in CoreObject to add the blockage time in separate function....

addBlockage added in CoreObject to add the blockage time in separate function. Called by removeEntity
parent c3aec075
...@@ -109,14 +109,7 @@ class CoreObject(Process): ...@@ -109,14 +109,7 @@ class CoreObject(Process):
# ================================== removes an entity from the Object ========================== # ================================== removes an entity from the Object ==========================
def removeEntity(self): def removeEntity(self):
self.totalTimeInCurrentEntity=now()-self.timeLastEntityEntered self.addBlockage()
self.totalTimeWaitingForOperator += self.operatorWaitTimeCurrentEntity
#blockage=self.totalTimeInCurrentEntity-(self.totalProcessingTimeInCurrentEntity\
# +self.failureTimeInCurrentEntity\
# +self.operatorWaitTimeCurrentEntity\
# +self.setupTimeCurrentEntity)
blockage=now()-(self.timeLastEntityEnded+self.downTimeInTryingToReleaseCurrentEntity)
self.totalBlockageTime+=blockage
activeObjectQueue=self.getActiveObjectQueue() activeObjectQueue=self.getActiveObjectQueue()
activeEntity=activeObjectQueue[0] activeEntity=activeObjectQueue[0]
...@@ -130,7 +123,14 @@ class CoreObject(Process): ...@@ -130,7 +123,14 @@ class CoreObject(Process):
self.outputTrace(activeEntity.name, "released "+self.objName) self.outputTrace(activeEntity.name, "released "+self.objName)
except TypeError: except TypeError:
pass pass
return activeEntity return activeEntity
# ================================== adds the blockage to totalBlockageTime each time an Entity is removed===============
def addBlockage(self):
self.totalTimeInCurrentEntity=now()-self.timeLastEntityEntered
self.totalTimeWaitingForOperator += self.operatorWaitTimeCurrentEntity
blockage=now()-(self.timeLastEntityEnded+self.downTimeInTryingToReleaseCurrentEntity)
self.totalBlockageTime+=blockage
# ================================== gets an entity from the giver ==================================== # ================================== gets an entity from the giver ====================================
def getEntity(self): def getEntity(self):
......
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