bug in Machine canAcceptAndIsRequested fixed. Now exit is assigned in every...

bug in Machine canAcceptAndIsRequested fixed. Now exit is assigned in every occassion that true is returned
parent 3fc61029
...@@ -450,7 +450,22 @@ class Machine(CoreObject): ...@@ -450,7 +450,22 @@ class Machine(CoreObject):
if (len(self.getActiveObjectQueue())==0 and self.shouldPreempt): if (len(self.getActiveObjectQueue())==0 and self.shouldPreempt):
self.shouldPreempt==False self.shouldPreempt==False
break break
# =======================================================================
# actions to be carried out when the processing of an Entity ends
# =======================================================================
def endProcessingActions(self):
activeObject=self.getActiveObject()
activeObjectQueue=activeObject.getActiveObjectQueue()
# the entity that just got processed is cold again it will get
# hot again by the time it reaches the giver of the next machine
# TODO: check first if the next station is not of type Machine before
# you cool the entity down
activeObjectQueue[0].hot=False
from Globals import G
# the just processed entity is added to the list of entities
# pending for the next processing
G.pendingEntities.append(activeObjectQueue[0])
# ======================================================================= # =======================================================================
# checks if the machine is Up # checks if the machine is Up
...@@ -669,7 +684,8 @@ class Machine(CoreObject): ...@@ -669,7 +684,8 @@ class Machine(CoreObject):
# # TESTING # # TESTING
# print now(), self.id, 'requested router' # print now(), self.id, 'requested router'
self.inPositionToGet=True self.inPositionToGet=True
self.router.invokeRouter() if not self.router.routerIsCalled():
self.router.invokeRouter()
# ======================================================================= # =======================================================================
# prepare the machine to be operated # prepare the machine to be operated
......
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