Commit b87e59f0 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

isInRoute used in more places

parent ec437721
......@@ -1093,7 +1093,7 @@ class Machine(CoreObject):
thecaller=callerObject
return len(activeObjectQueue)>0\
and self.waitToDispose\
and (thecaller in self.next)\
and thecaller.isInRoute(self)\
and (self.canDeliverOnInterruption
or self.timeLastEntityEnded==self.env.now
or self.checkIfActive())
......
......@@ -162,7 +162,6 @@ class MachineJobShop(Machine):
and self.waitToDispose\
and self.checkIfActive()\
and thecaller.isInRoute(self)
# and (thecaller in self.next)
# =======================================================================
# method to execute preemption
......
......@@ -166,7 +166,7 @@ class Queue(CoreObject):
if(callerObject==None):
return len(activeObjectQueue)>0
thecaller=callerObject
return len(activeObjectQueue)>0 and (thecaller in self.next)
return len(activeObjectQueue)>0 and thecaller.isInRoute(self)
# =======================================================================
# removes an entity from the Object
......
......@@ -88,7 +88,6 @@ class QueueJobShop(Queue):
#return True if the Queue has Entities and the caller is in the self.next list
return len(activeObjectQueue)>0\
and (thecaller in self.next)\
and thecaller.isInRoute(self)
#===========================================================================
......
......@@ -59,7 +59,7 @@ class RoutingQueue(Queue):
if not entity.receiver:
isInRouting=True
break
return len(activeObjectQueue)>0 and (thecaller in self.next) and isInRouting
return len(activeObjectQueue)>0 and thecaller.isInRoute(self) and isInRouting
#===========================================================================
# sort the entities of the queue for the receiver
......
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