Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
3b0ef881
Commit
3b0ef881
authored
Jun 22, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
break to inform SkilledRouter if it expects for finish-processing signals
parent
3bad52d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
dream/simulation/ScheduledBreak.py
dream/simulation/ScheduledBreak.py
+9
-0
No files found.
dream/simulation/ScheduledBreak.py
View file @
3b0ef881
...
...
@@ -89,8 +89,17 @@ class ScheduledBreak(ObjectInterruption):
# signal to the station that the operator has to leave
station
=
self
.
victim
.
workingStation
if
station
:
# signal the station that operator left
if
not
self
.
endUnfinished
and
station
.
expectedSignals
[
'processOperatorUnavailable'
]:
self
.
sendSignal
(
receiver
=
station
,
signal
=
station
.
processOperatorUnavailable
)
# 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
():
print
'I must send for'
,
station
.
id
self
.
sendSignal
(
receiver
=
G
.
RouterList
[
0
],
signal
=
G
.
RouterList
[
0
].
expectedFinishSignalsDict
[
station
.
id
],
sender
=
station
)
if
self
.
victim
.
schedule
:
if
not
self
.
victim
.
schedule
[
-
1
].
get
(
"exitTime"
,
None
):
self
.
victim
.
schedule
[
-
1
][
"exitTime"
]
=
self
.
env
.
now
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment