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

setWIP updated to use expectedSignals

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