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
d97155ee
Commit
d97155ee
authored
Feb 25, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SkilledRouter to wait for events and also not consider operators that are off-shift
parent
4a0fc4ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
dream/simulation/SkilledOperatorRouter.py
dream/simulation/SkilledOperatorRouter.py
+10
-1
No files found.
dream/simulation/SkilledOperatorRouter.py
View file @
d97155ee
...
...
@@ -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
...
...
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