Commit 6ddc0faa authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

setWIP updated to use expectedSignals

parent 5a8adb90
......@@ -280,8 +280,9 @@ def setWIP(entityList):
if issubclass(entity.currentStation.__class__, Queue):
# send the signal only if it is not already triggered
if not entity.currentStation.canDispose.triggered:
succeedTuple=(G.env,G.env.now)
entity.currentStation.canDispose.succeed(succeedTuple)
if entity.currentStation.expectedSignals['canDispose']:
succeedTuple=(G.env,G.env.now)
entity.currentStation.canDispose.succeed(succeedTuple)
# if we are in the start of the simulation the object is of server type then we should send initialWIP signal
# TODO, maybe use 'class_family attribute here'
if G.env.now==0 and entity.currentStation:
......@@ -292,8 +293,9 @@ def setWIP(entityList):
# trigger initialWIP event only if it has not been triggered. Otherwise
# if we set more than one entities (e.g. in reassembly) it will crash
if not (entity.currentStation.initialWIP.triggered):
succeedTuple=(G.env,G.env.now)
entity.currentStation.initialWIP.succeed(succeedTuple)
if entity.currentStation.expectedSignals['initialWIP']:
succeedTuple=(G.env,G.env.now)
entity.currentStation.initialWIP.succeed(succeedTuple)
def countIntervalThroughput():
......
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