Commit d97155ee authored by Georgios Dagkakis's avatar Georgios Dagkakis

SkilledRouter to wait for events and also not consider operators that are off-shift

parent 4a0fc4ec
......@@ -75,6 +75,15 @@ class SkilledRouter(Router):
self.expectedSignals['isCalled']=1
yield self.isCalled
# wait till there are no more events, the machines must be blocked
while 1:
if self.env.now==self.env.peek():
self.printTrace('', 'there are MORE events for now')
yield self.env.timeout(0)
else:
self.printTrace('','there are NO more events for now')
break
transmitter, eventTime=self.isCalled.value
self.isCalled=self.env.event()
self.printTrace('','=-'*15)
......@@ -185,7 +194,7 @@ class SkilledRouter(Router):
#===================================================================
self.availableOperatorList=[]
for operator in G.OperatorsList:
if operator.available:
if operator.available and operator.onShift:
self.availableOperatorList.append(operator.id)
#===================================================================
# # XXX run the LP assignment algorithm
......
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