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
740723de
Commit
740723de
authored
May 15, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
findCandidateEntities of OperatorManagedJob renamed to pickCandidateEntitiesFrom
parent
f2eb0a82
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
dream/simulation/OperatorManagedJob.py
dream/simulation/OperatorManagedJob.py
+8
-7
dream/simulation/OperatorRouter.py
dream/simulation/OperatorRouter.py
+1
-3
No files found.
dream/simulation/OperatorManagedJob.py
View file @
740723de
...
@@ -89,15 +89,16 @@ class OperatorManagedJob(Operator):
...
@@ -89,15 +89,16 @@ class OperatorManagedJob(Operator):
#=======================================================================
#=======================================================================
# findCandidateEntities method finding the candidateEntities of the operator
# findCandidateEntities method finding the candidateEntities of the operator
#=======================================================================
#=======================================================================
def
findCandidateEntities
(
self
):
def
pickCandidateEntitiesFrom
(
self
,
pendingEntities
=
[]
):
# print 'trying to import G'
# print 'trying to import G'
from
Globals
import
G
# from Globals import G
router
=
G
.
Router
# router=G.Router
if
router
.
pending
:
# if router.pending:
print
now
(),
self
.
id
if
pendingEntities
:
for
entity
in
[
x
for
x
in
router
.
pending
if
x
.
canProceed
and
x
.
manager
==
self
]:
# print now(), self.id
for
entity
in
[
x
for
x
in
pendingEntities
if
x
.
canProceed
and
x
.
manager
==
self
]:
self
.
candidateEntities
.
append
(
entity
)
self
.
candidateEntities
.
append
(
entity
)
print
' '
,
[
x
.
id
for
x
in
self
.
candidateEntities
]
#
print ' ', [x.id for x in self.candidateEntities]
#===========================================================================
#===========================================================================
# check if the operator has only one station as candidate option
# check if the operator has only one station as candidate option
...
...
dream/simulation/OperatorRouter.py
View file @
740723de
...
@@ -428,13 +428,11 @@ class Router(ObjectInterruption):
...
@@ -428,13 +428,11 @@ class Router(ObjectInterruption):
#===========================================================================
#===========================================================================
def
findCandidateEntities
(
self
):
def
findCandidateEntities
(
self
):
for
operator
in
self
.
candidateOperators
:
for
operator
in
self
.
candidateOperators
:
# print now(), operator.id
# find which pendingEntities that can move to machines is the operator managing
# find which pendingEntities that can move to machines is the operator managing
# operator.
findCandidateEntities(
)
# operator.
pickCandidateEntitiesFrom(self.pending
)
for
entity
in
[
x
for
x
in
self
.
pending
if
x
.
canProceed
and
x
.
manager
==
operator
]:
for
entity
in
[
x
for
x
in
self
.
pending
if
x
.
canProceed
and
x
.
manager
==
operator
]:
operator
.
candidateEntities
.
append
(
entity
)
operator
.
candidateEntities
.
append
(
entity
)
# print ' ', [x.id for x in operator.candidateEntities]
# print ' ', [x.id for x in operator.candidateEntities]
#=======================================================================
#=======================================================================
# find the schedulingRules of the candidateOperators
# find the schedulingRules of the candidateOperators
...
...
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