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
b6142c82
Commit
b6142c82
authored
Mar 10, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sequence that are empty strings are handled correctly
parent
a5f3919f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
dream/simulation/Job.py
dream/simulation/Job.py
+7
-2
No files found.
dream/simulation/Job.py
View file @
b6142c82
...
...
@@ -182,8 +182,11 @@ class Job(Entity): # inherits from the Entity c
# find the sequence of the next step in the route of the activeEntity
nextSequence
=
self
.
nextStepSequence
()
# if no sequence is provided then return true
if
nextSequence
==
None
:
if
nextSequence
==
None
or
nextSequence
==
""
:
return
True
else
:
# print nextSequence
nextSequence
=
int
(
nextSequence
)
# flag that decides if the entity can proceed to the next station in its route
mayProceed
=
False
# find the required parts for the next step in the route (if any)
...
...
@@ -193,9 +196,11 @@ class Job(Entity): # inherits from the Entity c
# for each requested part
for
part
in
requiredParts
:
# retrieve the current step sequence of the requiredPart
partCurrentSeq
=
part
.
currentStepSequence
(
)
partCurrentSeq
=
int
(
part
.
currentStepSequence
()
)
# retrieve the next step sequence of the requiredParts
partNextSeq
=
part
.
nextStepSequence
()
if
partNextSeq
:
partNextSeq
=
int
(
partNextSeq
)
# if there is no next step sequence (route finished)
# it means that the part has exhausted its route
# if the sequence of the required part next step is smaller than the sequence of activeEntity's next step
...
...
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