Commit c88ff88a authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

ChangingPredecessors example updated

parent 245ef0ee
......@@ -18,7 +18,9 @@ def changeMachinePredecessor(machine, possiblePredecessors):
break
# if canDispose is not triggered in the predecessor send it
if not machine.previous[0].canDispose.triggered:
machine.previous[0].canDispose.succeed()
# a succeed function on an event must always take attributes the transmitter and the time of the event
succeedTuple=(machine, G.env.now)
machine.previous[0].canDispose.succeed(succeedTuple)
print G.env.now, 'from now on the machine will take from', machine.previous[0].id
#define the objects of the model
......
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