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
0a24e21b
Commit
0a24e21b
authored
Jun 29, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrections in skilledRouter
parent
36589b54
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
dream/simulation/SkilledOperatorRouter.py
dream/simulation/SkilledOperatorRouter.py
+14
-3
No files found.
dream/simulation/SkilledOperatorRouter.py
View file @
0a24e21b
...
...
@@ -265,7 +265,7 @@ class SkilledRouter(Router):
station
.
operatorToGet
=
operator
# remove the operator id from availableOperatorList
self
.
availableOperatorList
.
remove
(
operatorID
)
#===================================================================
# # XXX signal the stations that the assignment is complete
#===================================================================
...
...
@@ -276,7 +276,8 @@ class SkilledRouter(Router):
# check if the operator that the station waits for is free
operator
=
station
.
operatorToGet
if
operator
.
workingStation
:
if
operator
.
workingStation
.
isProcessing
:
# if the operator is in a station that is processing or just starts processing then he/she is not free
if
operator
.
workingStation
.
isProcessing
or
(
not
(
operator
.
workingStation
.
timeLastEntityEntered
==
self
.
env
.
now
)):
stationsProcessingLast
.
append
(
operator
.
workingStation
)
continue
# signal the station so that it gets the operator
...
...
@@ -297,10 +298,20 @@ class SkilledRouter(Router):
assert
eventTime
==
self
.
env
.
now
,
'the station finished signal must be received on the time of request'
self
.
expectedFinishSignals
.
remove
(
signal
)
del
self
.
expectedFinishSignalsDict
[
transmitter
.
id
]
# signal also the other stations that should be signalled
for
id
in
solution
.
keys
():
operator
=
findObjectById
(
id
)
station
=
findObjectById
(
solution
[
id
])
if
station
in
self
.
toBeSignalled
:
signal
=
True
# signal only the stations in the original list
if
station
not
in
self
.
toBeSignalled
:
signal
=
False
# signal only if the operator is free
if
operator
.
workingStation
:
if
operator
.
workingStation
.
isProcessing
\
or
(
not
(
operator
.
workingStation
.
timeLastEntityEntered
==
self
.
env
.
now
)):
signal
=
False
if
signal
:
# signal the station so that it gets the operator
self
.
signalStation
(
station
,
operator
)
...
...
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