Commit c1c384a3 authored by Georgios Dagkakis's avatar Georgios Dagkakis

ScheduledBreak: synchronisation check

parent ab292aef
......@@ -95,8 +95,9 @@ class ScheduledBreak(ObjectInterruption):
# if SkilledRouter waits for the station to finish, send this signal to this router
from Globals import G
from dream.simulation.SkilledOperatorRouter import SkilledRouter
if G.RouterList[0].__class__ is SkilledRouter:
if station.id in G.RouterList[0].expectedFinishSignalsDict.keys():
if G.RouterList[0].__class__ is SkilledRouter and \
station.id in G.RouterList[0].expectedFinishSignalsDict.keys() and \
not G.RouterList[0].expectedFinishSignalsDict[station.id].triggered:
self.sendSignal(receiver=G.RouterList[0], signal=G.RouterList[0].expectedFinishSignalsDict[station.id],
sender=station)
if self.victim.schedule:
......
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