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
af1e72e0
Commit
af1e72e0
authored
Mar 13, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
naming convention for sorting activeCallers changed
parent
1bae5d7d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
dream/simulation/Operator.py
dream/simulation/Operator.py
+4
-4
dream/simulation/OperatorManagedJob.py
dream/simulation/OperatorManagedJob.py
+1
-1
dream/simulation/OperatorRouter.py
dream/simulation/OperatorRouter.py
+1
-1
No files found.
dream/simulation/Operator.py
View file @
af1e72e0
...
...
@@ -82,20 +82,20 @@ class Operator(Repairman): # XXX isn't it the other way around ?
# sorts the activeCallerrs of the Operator according to the scheduling rule
# TODO: change the name of the class (they are not entities)
# =======================================================================
def
sort
Entitie
s
(
self
):
def
sort
ActiveCaller
s
(
self
):
#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
)
self
.
active
Caller
QSorter
(
criterion
=
criterion
)
#else we just use the default scheduling rule
else
:
self
.
activeQSorter
(
self
.
schedulingRule
)
self
.
active
Caller
QSorter
(
self
.
schedulingRule
)
# =======================================================================
# sorts the activeCallers of the activeCallersList according to the scheduling rule
# =======================================================================
# TODO: entityToGet is not updated for all stations, consider using it for all stations or withdraw the idea
def
activeQSorter
(
self
,
criterion
=
None
):
def
active
Caller
QSorter
(
self
,
criterion
=
None
):
activeObjectQ
=
self
.
activeCallersList
if
criterion
==
None
:
criterion
=
self
.
schedulingRule
...
...
dream/simulation/OperatorManagedJob.py
View file @
af1e72e0
...
...
@@ -181,7 +181,7 @@ class OperatorManagedJob(Operator):
# sorts the Entities of the Queue according to the scheduling rule
# =======================================================================
# TODO: entityToGet is not updated for all stations, consider using it for all stations or withdraw the idea
def
activeQSorter
(
self
,
criterion
=
None
):
def
active
Caller
QSorter
(
self
,
criterion
=
None
):
activeObjectQ
=
self
.
activeCallersList
if
criterion
==
None
:
criterion
=
self
.
schedulingRule
...
...
dream/simulation/OperatorRouter.py
View file @
af1e72e0
...
...
@@ -161,7 +161,7 @@ class Router(ObjectInterruption):
receiverIsActive
:
# sort the activeCallersList of the operator
operator
.
sort
Entitie
s
()
operator
.
sort
ActiveCaller
s
()
# find the activeCaller that has priority
...
...
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