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
04fa9d7e
Commit
04fa9d7e
authored
May 16, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pickCandidateEntitiesFrom moved to operator
parent
9da68a8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
dream/simulation/Operator.py
dream/simulation/Operator.py
+8
-0
dream/simulation/OperatorManagedJob.py
dream/simulation/OperatorManagedJob.py
+0
-14
No files found.
dream/simulation/Operator.py
View file @
04fa9d7e
...
...
@@ -101,6 +101,14 @@ class Operator(ObjectResource):
def
hasOneOption
(
self
):
return
len
(
self
.
candidateStations
)
==
1
#=======================================================================
# findCandidateEntities method finding the candidateEntities of the operator
#=======================================================================
def
pickCandidateEntitiesFrom
(
self
,
pendingEntities
=
[]):
if
pendingEntities
:
for
entity
in
[
x
for
x
in
pendingEntities
if
x
.
canProceed
and
x
.
manager
==
self
]:
self
.
candidateEntities
.
append
(
entity
)
# =======================================================================
# sorts the candidateEntities of the Operator according to the scheduling rule
# TODO: find a way to sort machines or candidate entities for machines,
...
...
dream/simulation/OperatorManagedJob.py
View file @
04fa9d7e
...
...
@@ -86,20 +86,6 @@ class OperatorManagedJob(Operator):
# def isAssignedTo(self):
# return self.operatorAssignedTo
#=======================================================================
# findCandidateEntities method finding the candidateEntities of the operator
#=======================================================================
def
pickCandidateEntitiesFrom
(
self
,
pendingEntities
=
[]):
# print 'trying to import G'
# from Globals import G
# router=G.Router
# if router.pending:
if
pendingEntities
:
# print now(), self.id
for
entity
in
[
x
for
x
in
pendingEntities
if
x
.
canProceed
and
x
.
manager
==
self
]:
self
.
candidateEntities
.
append
(
entity
)
# print ' ', [x.id for x in self.candidateEntities]
#===========================================================================
# check if the operator has only one station as candidate option
#===========================================================================
...
...
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