QueueManagedJob signalRouter corrected

parent fce319bb
...@@ -25,9 +25,9 @@ Created on 2 oct 2012 ...@@ -25,9 +25,9 @@ Created on 2 oct 2012
extends the Exit object so that it can act as a jobshop station. Preceding station is read from the Entity extends the Exit object so that it can act as a jobshop station. Preceding station is read from the Entity
''' '''
from SimPy.Simulation import Process, Resource # from SimPy.Simulation import Process, Resource
from SimPy.Simulation import activate, passivate, waituntil, now, hold # from SimPy.Simulation import activate, passivate, waituntil, now, hold
import simpy
from Exit import Exit from Exit import Exit
# =========================================================================== # ===========================================================================
......
...@@ -113,12 +113,15 @@ class QueueManagedJob(QueueJobShop): ...@@ -113,12 +113,15 @@ class QueueManagedJob(QueueJobShop):
if receiver.identifyEntityToGet().manager: if receiver.identifyEntityToGet().manager:
if receiver.isLoadRequested(): if receiver.isLoadRequested():
if receiver.identifyEntityToGet().manager.isAssignedTo()!=receiver: if receiver.identifyEntityToGet().manager.isAssignedTo()!=receiver:
from Globals import G try:
if not G.Router.invoked: from Globals import G
# self.printTrace(self.id, signal='router') if not G.Router.invoked:
G.Router.invoked=True # self.printTrace(self.id, signal='router')
G.Router.isCalled.succeed(self.env.now) G.Router.invoked=True
return True G.Router.isCalled.succeed(G.env.now)
return True
except:
return False
else: else:
return False return False
except: except:
......
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