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
a071f79d
Commit
a071f79d
authored
Sep 28, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Nov 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extra control for the case of BOM definition of components route
parent
de836b12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
dream/simulation/Job.py
dream/simulation/Job.py
+6
-2
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+1
-0
No files found.
dream/simulation/Job.py
View file @
a071f79d
...
...
@@ -53,6 +53,8 @@ class Job(Entity): # inherits from the Entity c
G
.
JobList
.
append
(
self
)
# used by printRoute
self
.
alias
=
'J'
+
str
(
len
(
G
.
JobList
))
# added for testing - flag that shows if the order and component routes are defined in the BOM
self
.
orderInBOM
=
False
# =======================================================================
# outputs results to JSON File
...
...
@@ -105,16 +107,18 @@ class Job(Entity): # inherits from the Entity c
# initializes all the Entity for a new simulation replication
# =======================================================================
def
initialize
(
self
):
currentStationWellDefined
=
False
if
self
.
currentStation
:
if
self
.
currentStation
and
self
.
orderInBOM
:
for
step
in
self
.
route
:
stepObjectIds
=
step
.
get
(
'stationIdsList'
,[])
if
self
.
currentStation
.
id
in
stepObjectIds
:
ind
=
self
.
route
.
index
(
step
)
self
.
remainingRoute
=
self
.
route
[
ind
:]
currentStationWellDefined
=
True
break
else
:
if
not
currentStationWellDefined
:
# has to be re-initialized each time a new Job is added
self
.
remainingRoute
=
list
(
self
.
route
)
# check the number of stations in the stationIdsList for the current step (0)
...
...
dream/simulation/LineGenerationJSON.py
View file @
a071f79d
...
...
@@ -405,6 +405,7 @@ def createWIP():
# if orders are provided separately (BOM) provide the parent order as argument
if
entityOrder
:
entity
=
entityType
(
order
=
order
,
**
inputDict
)
entity
.
orderInBOM
=
True
else
:
entity
=
entityType
(
**
inputDict
)
G
.
EntityList
.
append
(
entity
)
...
...
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