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
53c66f3f
Commit
53c66f3f
authored
Mar 11, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SubBatches can now be set as wip
parent
b96b5d5f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
dream/simulation/Globals.py
dream/simulation/Globals.py
+1
-1
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+28
-0
No files found.
dream/simulation/Globals.py
View file @
53c66f3f
...
...
@@ -181,7 +181,7 @@ def setWIP(entityList):
# for all the entities in the entityList
for
entity
in
entityList
:
# if the entity is of type Part
if
entity
.
type
==
'Part'
or
entity
.
type
==
'Batch'
:
if
entity
.
type
==
'Part'
or
entity
.
type
==
'Batch'
or
entity
.
type
==
'SubBatch'
:
object
=
entity
.
currentStation
#identify the object
object
.
getActiveObjectQueue
().
append
(
entity
)
#append the entity to its Queue
entity
.
schedule
.
append
([
object
,
now
()])
#append the time to schedule so that it can be read in the result
...
...
dream/simulation/LineGenerationJSON.py
View file @
53c66f3f
...
...
@@ -906,6 +906,7 @@ def createWIP():
G
.
OrderList
=
[]
G
.
MouldList
=
[]
G
.
BatchList
=
[]
G
.
SubBatchList
=
[]
# entities that just finished processing in a station
# and have to enter the next machine
G
.
pendingEntities
=
[]
...
...
@@ -1092,6 +1093,33 @@ def createWIP():
G
.
EntityList
.
append
(
B
)
object
=
Globals
.
findObjectById
(
element
[
'id'
])
B
.
currentStation
=
object
elif
entityClass
==
'Dream.SubBatch'
:
id
=
entity
.
get
(
'id'
,
'not found'
)
name
=
entity
.
get
(
'name'
,
'not found'
)
numberOfUnits
=
int
(
entity
.
get
(
'numberOfUnits'
,
'4'
))
parentBatchId
=
entity
.
get
(
'parentBatchId'
,
'not found'
)
parentBatchName
=
entity
.
get
(
'parentBatchName'
,
'not found'
)
# check if the parent batch is already created. If not, then create it
batch
=
None
for
entity
in
G
.
BatchList
:
if
entity
.
id
==
parentBatchId
:
batch
=
entity
if
batch
:
#if the parent batch was found create add the number of units of current sub-batch
batch
.
numberOfUnits
+=
numberOfUnits
else
:
#if the parent batch was not found create it
batch
=
Batch
(
parentBatchId
,
parentBatchName
,
numberOfUnits
)
G
.
BatchList
.
append
(
B
)
G
.
WipList
.
append
(
B
)
G
.
EntityList
.
append
(
B
)
SB
=
SubBatch
(
id
,
name
,
numberOfUnits
=
numberOfUnits
,
parentBatch
=
batch
)
G
.
SubBatchList
.
append
(
SB
)
G
.
WipList
.
append
(
SB
)
G
.
EntityList
.
append
(
SB
)
object
=
Globals
.
findObjectById
(
element
[
'id'
])
SB
.
currentStation
=
object
if
entityClass
==
'Dream.Order'
:
id
=
entity
.
get
(
'id'
,
'not found'
)
...
...
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