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