QueueJobShop enhancement so that it only returns true if a receiver canAccept

parent 92c351fb
......@@ -77,9 +77,9 @@ class QueueJobShop(Queue):
#give the entity to the possible receiver that is waiting for the most time.
#plant does not do this in every occasion!
maxTimeWaiting=0
# loop through the object in the successor list
maxTimeWaiting=0
hasFreeReceiver=False
# loop through the object in the successor list
for object in activeObject.next:
if(object.canAccept(activeObject)): # if the object can accept
hasFreeReceiver=True
......@@ -94,7 +94,7 @@ class QueueJobShop(Queue):
# =======================================================================
# gets an entity from the predecessor that the predecessor index points to
# =======================================================================
def getEntity(self):
def getEntity(self):
activeObject = self.getActiveObject()
activeEntity=Queue.getEntity(self)
# read the possible receivers - update the next list
......
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