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
ad3245f3
Commit
ad3245f3
authored
Jun 23, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Router findCandidateOperators() fix
parent
de07170e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
dream/simulation/OperatorRouter.py
dream/simulation/OperatorRouter.py
+5
-4
No files found.
dream/simulation/OperatorRouter.py
View file @
ad3245f3
...
@@ -313,18 +313,19 @@ class Router(ObjectInterruption):
...
@@ -313,18 +313,19 @@ class Router(ObjectInterruption):
for
station
in
candidateMachines
+
self
.
pendingMachines
:
for
station
in
candidateMachines
+
self
.
pendingMachines
:
# find candidateOperators for each object
# find candidateOperators for each object
candidateOperators
=
station
.
operatorPool
.
availableOperators
()
candidateOperators
=
station
.
operatorPool
.
availableOperators
()
if
candidateOperators
:
# if there was an operator found append the Machine on his candidateStations
if
candidateOperators
:
# if there was an operator found append the Machine on his candidateStations
for
candidateOperator
in
candidateOperators
:
for
candidateOperator
in
candidateOperators
:
# XXX not generic enough - find an other way to initiate skilledRouter and incorporate also setup and load
# XXX not generic enough - find an other way to initiate skilledRouter and incorporate also setup and load
if
candidateOperator
.
skillDict
:
if
candidateOperator
.
skillDict
:
if
(
station
.
id
in
candidateOperator
.
skillDict
[
"process"
].
get
(
"stationIdList"
,[])
and
station
in
self
.
pendingMachines
)
or
\
if
(
(
station
.
id
in
candidateOperator
.
skillDict
[
"process"
].
get
(
"stationIdList"
,[])
and
station
in
self
.
pendingMachines
)
or
\
(
station
.
id
in
candidateOperator
.
skillDict
[
"setup"
].
get
(
"stationIdList"
,[])
and
station
in
candidateMachines
)
or
\
(
station
.
id
in
candidateOperator
.
skillDict
[
"setup"
].
get
(
"stationIdList"
,[])
and
station
in
candidateMachines
)
or
\
((
station
.
id
in
candidateOperator
.
skillDict
[
"process"
].
get
(
"stationIdList"
,[])
and
station
in
candidateMachines
)
and
\
((
station
.
id
in
candidateOperator
.
skillDict
[
"process"
].
get
(
"stationIdList"
,[])
and
station
in
candidateMachines
)
and
\
not
station
.
getActiveObjectQueue
()):
not
station
.
getActiveObjectQueue
()))
and
\
station
.
checkIfActive
():
if
not
station
in
candidateOperator
.
candidateStations
:
if
not
station
in
candidateOperator
.
candidateStations
:
candidateOperator
.
candidateStations
.
append
(
station
)
candidateOperator
.
candidateStations
.
append
(
station
)
else
:
else
:
if
not
station
in
candidateOperator
.
candidateStations
:
if
not
station
in
candidateOperator
.
candidateStations
and
station
.
checkIfActive
()
:
candidateOperator
.
candidateStations
.
append
(
station
)
candidateOperator
.
candidateStations
.
append
(
station
)
if
not
candidateOperator
in
self
.
candidateOperators
:
if
not
candidateOperator
in
self
.
candidateOperators
:
self
.
candidateOperators
.
append
(
candidateOperator
)
self
.
candidateOperators
.
append
(
candidateOperator
)
...
...
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