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
9f4fdc96
Commit
9f4fdc96
authored
Sep 24, 2014
by
Ioannis Papagiannopoulos
Committed by
Jérome Perrin
Feb 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ConditionalBuffer sortEntities clean-up
parent
20e5ba07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
13 deletions
+2
-13
dream/simulation/ConditionalBuffer.py
dream/simulation/ConditionalBuffer.py
+2
-13
No files found.
dream/simulation/ConditionalBuffer.py
View file @
9f4fdc96
...
...
@@ -96,24 +96,13 @@ class ConditionalBuffer(QueueJobShop):
# =======================================================================
def
sortEntities
(
self
):
activeObject
=
self
.
getActiveObject
()
# (run the default behaviour - loan from Queue)
# if we have sorting according to multiple criteria we have to call the sorter many times
if
self
.
schedulingRule
==
"MC"
:
for
criterion
in
reversed
(
self
.
multipleCriterionList
):
self
.
activeQSorter
(
criterion
=
criterion
)
#else we just use the default scheduling rule
else
:
self
.
activeQSorter
()
# perform the default sorting
QueueJobShop
.
sortEntities
(
activeObject
)
# and in the end sort according to the ConditionalBuffer sorting rule
activeObjectQueue
=
activeObject
.
getActiveObjectQueue
()
# for every entity in the activeObjectQueue
for
entity
in
activeObjectQueue
:
# check if the requiredParts (if any) have concluded the steps with sequence smaller
# than the sequence of the entity next step
entity
.
mayProceed
=
entity
.
checkIfRequiredPartsReady
()
activeObjectQueue
.
sort
(
key
=
lambda
x
:
x
.
mayProceed
,
reverse
=
True
)
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