Commit 849bc6ca authored by Georgios Dagkakis's avatar Georgios Dagkakis

getEntity to update currentStation before invoking removeEntity

parent a680e8a8
...@@ -336,6 +336,7 @@ class CoreObject(ManPyObject): ...@@ -336,6 +336,7 @@ class CoreObject(ManPyObject):
giverObject=self.giver giverObject=self.giver
giverObject.sortEntities() #sort the Entities of the giver giverObject.sortEntities() #sort the Entities of the giver
#according to the scheduling rule if applied #according to the scheduling rule if applied
#giverObject.sortEntitiesForReceiver()
giverObjectQueue=giverObject.Res.users giverObjectQueue=giverObject.Res.users
# if the giverObject is blocked then unBlock it # if the giverObject is blocked then unBlock it
if giverObject.exitIsAssignedTo(): if giverObject.exitIsAssignedTo():
...@@ -343,7 +344,8 @@ class CoreObject(ManPyObject): ...@@ -343,7 +344,8 @@ class CoreObject(ManPyObject):
# if the activeObject entry is blocked then unBlock it # if the activeObject entry is blocked then unBlock it
if self.entryIsAssignedTo(): if self.entryIsAssignedTo():
self.unAssignEntry() self.unAssignEntry()
activeEntity=self.identifyEntityToGet()
activeEntity.currentStation=self
# remove entity from the giver # remove entity from the giver
activeEntity = giverObject.removeEntity(entity=self.identifyEntityToGet()) activeEntity = giverObject.removeEntity(entity=self.identifyEntityToGet())
# variable that holds the last giver; used in case of preemption # variable that holds the last giver; used in case of preemption
......
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