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

isInRoute used in more places

parent 3311039f
......@@ -1079,7 +1079,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
......
......@@ -162,7 +162,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)
#===========================================================================
......
......@@ -60,7 +60,7 @@ class RoutingQueue(Queue):
# if yes then that entity can proceed
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