Commit ccf38908 authored by Georgios Dagkakis's avatar Georgios Dagkakis

example does not have to send signal now

parent 15a9b727
......@@ -8,6 +8,7 @@ def balanceQueue(buffer, refillLevel=1):
numInQueue=len(objectQueue)
print '-'*50
print 'at time=', G.env.now
# check if the buffer is empty and if yes fill it with 5 parts
if numInQueue==0:
print 'buffer is starving, I will bring 5 parts'
for i in range(refillLevel):
......@@ -19,8 +20,7 @@ def balanceQueue(buffer, refillLevel=1):
# set the part as WIP
setWIP([P])
G.numOfParts+=1
# send a signal to the buffer that it can dispose an Entity
buffer.canDispose.succeed(G.env.now)
# else do nothing
else:
print 'buffer has', numInQueue, 'parts. No need to bring more'
......
......@@ -280,7 +280,6 @@ 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:
# 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'
......
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