Commit 15a9b727 authored by Georgios Dagkakis's avatar Georgios Dagkakis

setWIP to send canDispose to buffers

parent 94a1070f
......@@ -273,6 +273,15 @@ def setWIP(entityList):
entity.hot = True
# add the entity to the pendingEntities list
G.pendingEntities.append(entity)
# if the station is buffer then sent the canDispose signal
from Queue import Queue
if entity.currentStation:
if issubclass(entity.currentStation.__class__, Queue):
# send the signal only if it is not already triggered
if not entity.currentStation.canDispose.triggered:
# print 'sending canDispose to', entity.currentStation.id
entity.currentStation.canDispose.succeed(G.env.now)
# 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:
......
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