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
6285cfe5
Commit
6285cfe5
authored
Sep 18, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Oct 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
checkIfRequiredPartsReady correction
parent
c3e7c554
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
11 deletions
+18
-11
dream/simulation/Job.py
dream/simulation/Job.py
+18
-11
No files found.
dream/simulation/Job.py
View file @
6285cfe5
...
...
@@ -142,7 +142,7 @@ class Job(Entity): # inherits from the Entity c
# if there are required parts
if
requiredParts
:
# for each requested part
for
part
in
requiredParts
IDs
:
for
part
in
requiredParts
:
# retrieve the current step sequence of the requiredPart
curStepSeq
=
part
.
currentStepSequence
()
# retrieve the next step sequence of the requiredParts
...
...
@@ -156,10 +156,16 @@ class Job(Entity): # inherits from the Entity c
# required part is currently being processed and thus the activeEntity cannot proceed
if
not
curStepSeq
:
mayProceed
=
True
else
:
mayProceed
=
False
break
else
:
mayProceed
=
False
break
# if there are no requestedParts defined, then entity can proceed to the next step of its route
else
:
mayProceed
=
True
# if the local flag
can
Proceed is true then return true
# if the local flag
may
Proceed is true then return true
return
mayProceed
#===========================================================================
...
...
@@ -168,8 +174,9 @@ class Job(Entity): # inherits from the Entity c
#===========================================================================
def
getRequiredParts
(
self
):
# retrieve the IDs of the required parts in the next step sequence
requiredPartsIDs
=
self
.
remainingRoute
[
0
].
get
(
'requiredParts'
,[])
requiredParts
=
[]
if
self
.
remainingRoute
:
requiredPartsIDs
=
self
.
remainingRoute
[
0
].
get
(
'requiredParts'
,[])
# if there are requested parts
if
requiredPartsIDs
:
from
Globals
import
findObjectById
...
...
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