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
6d3b4df6
Commit
6d3b4df6
authored
May 12, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor clean-up
parent
df1fff32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
dream/simulation/OperatorRouter.py
dream/simulation/OperatorRouter.py
+16
-16
No files found.
dream/simulation/OperatorRouter.py
View file @
6d3b4df6
...
...
@@ -360,25 +360,25 @@ class Router(ObjectInterruption):
# if there are pendingEntities
if
self
.
pendingObjects
:
# for each pendingObject
for
object
in
self
.
pendingObjects
:
# if it is a machine
if
object
in
self
.
pendingMachines
:
# for each pendingMachine
for
object
in
self
.
pendingMachines
:
#
if object in self.pendingMachines:
# find an available operator
candidateOperator
=
object
.
operatorPool
.
findAvailableOperator
()
# TODO: this way no sorting is performed
candidateOperator
=
object
.
operatorPool
.
findAvailableOperator
()
# TODO: this way no sorting is performed
if
not
candidateOperator
in
self
.
candidateOperators
:
self
.
candidateOperators
.
append
(
candidateOperator
)
# for each operator append the station into its candidateStations
candidateOperator
.
candidateStations
.
append
(
object
)
# for each pendingQueue
for
object
in
self
.
pendingQueues
:
# elif object in self.pendingQueues:
# find available operator for then machines that follow
for
nextobject
in
object
.
findReceivers
():
candidateOperator
=
nextobject
.
operatorPool
.
findAvailableOperator
()
if
not
candidateOperator
in
self
.
candidateOperators
:
self
.
candidateOperators
.
append
(
candidateOperator
)
# for each operator append the station into its candidateStations
candidateOperator
.
candidateStations
.
append
(
object
)
# if it is a queue
elif
object
in
self
.
pendingQueues
:
# find available operator for then machines that follow
for
nextobject
in
object
.
next
:
if
nextobject
.
canAccept
(
object
):
candidateOperator
=
nextobject
.
operatorPool
.
findAvailableOperator
()
if
not
candidateOperator
in
self
.
candidateOperators
:
self
.
candidateOperators
.
append
(
candidateOperator
)
candidateOperator
.
candidateStations
.
append
(
nextobject
)
candidateOperator
.
candidateStations
.
append
(
nextobject
)
# update the schedulingRule/multipleCriterionList of the Router
if
self
.
sorting
:
self
.
updateSchedulingRule
()
...
...
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