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
9b6ee605
Commit
9b6ee605
authored
Sep 30, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Nov 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
when WIP for machines Job limit their first step stationIdsList to the id of their currentStation
parent
94858723
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
dream/simulation/Job.py
dream/simulation/Job.py
+14
-1
No files found.
dream/simulation/Job.py
View file @
9b6ee605
...
@@ -108,13 +108,26 @@ class Job(Entity): # inherits from the Entity c
...
@@ -108,13 +108,26 @@ class Job(Entity): # inherits from the Entity c
# =======================================================================
# =======================================================================
def
initialize
(
self
):
def
initialize
(
self
):
currentStationWellDefined
=
False
currentStationWellDefined
=
False
#
XXX change WIP definition when BOM is provided (current sequence number should be provided)
#
if the currentStation is defined and the route is given in the BOM
if
self
.
currentStation
and
self
.
routeInBOM
:
if
self
.
currentStation
and
self
.
routeInBOM
:
# find the current sequence given in the WIP in the entity's route
for
step
in
self
.
route
:
for
step
in
self
.
route
:
stepObjectIds
=
step
.
get
(
'stationIdsList'
,[])
stepObjectIds
=
step
.
get
(
'stationIdsList'
,[])
if
self
.
currentStation
.
id
in
stepObjectIds
:
if
self
.
currentStation
.
id
in
stepObjectIds
:
# find the corresponding station to the sequence
ind
=
self
.
route
.
index
(
step
)
ind
=
self
.
route
.
index
(
step
)
# copy the route from that sequence on to the remainingRoute
self
.
remainingRoute
=
self
.
route
[
ind
:]
self
.
remainingRoute
=
self
.
route
[
ind
:]
# correct the first step of the remainingRoute (only one station (currentStation)
# should be present in the stationIdsList of the firstStep)
firstStep
=
self
.
remainingRoute
[
0
]
firstStepStationIdsList
=
firstStep
.
get
(
'stationIdsList'
,[])
assert
self
.
currentStation
.
id
in
firstStepStationIdsList
,
'the initialStation is not in the first step
\
'
s stationIdsList'
firstStepStationIdsList
=
[
str
(
self
.
currentStation
.
id
)]
firstStep
.
pop
(
'stationIdsList'
)
firstStep
[
'stationIdsList'
]
=
firstStepStationIdsList
self
.
remainingRoute
.
pop
(
0
)
self
.
remainingRoute
.
insert
(
0
,
firstStep
)
currentStationWellDefined
=
True
currentStationWellDefined
=
True
break
break
...
...
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