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

CoreObject editted to update timeLastEntityEntered in getEntity and...

CoreObject editted to update timeLastEntityEntered in getEntity and timeLastEntityLeft in removeEntity
parent f79417b2
...@@ -78,7 +78,7 @@ class CoreObject(Process): ...@@ -78,7 +78,7 @@ class CoreObject(Process):
activeObjectQueue=self.getActiveObjectQueue() activeObjectQueue=self.getActiveObjectQueue()
activeEntity=activeObjectQueue[0] activeEntity=activeObjectQueue[0]
activeObjectQueue.pop(0) #remove the Entity from the queue activeObjectQueue.pop(0) #remove the Entity from the queue
self.timeLastEntityLeft=now()
try: try:
self.outputTrace(activeEntity.name, "released "+self.objName) self.outputTrace(activeEntity.name, "released "+self.objName)
except TypeError: except TypeError:
...@@ -107,6 +107,7 @@ class CoreObject(Process): ...@@ -107,6 +107,7 @@ class CoreObject(Process):
# the entity enters a new object # the entity enters a new object
activeEntity.schedule.append([activeObject.id,now()]) activeEntity.schedule.append([activeObject.id,now()])
activeEntity.currentStation=self activeEntity.currentStation=self
self.timeLastEntityEntered=now()
try: try:
self.outputTrace(activeEntity.name, "got into "+self.objName) self.outputTrace(activeEntity.name, "got into "+self.objName)
except TypeError: except TypeError:
......
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