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
12005824
Commit
12005824
authored
Aug 21, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up
parent
398d6f25
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+9
-11
No files found.
dream/simulation/LineGenerationJSON.py
View file @
12005824
...
...
@@ -277,15 +277,10 @@ def createObjects():
for
k
in
(
'element_id'
,
'top'
,
'left'
):
element
.
pop
(
k
,
None
)
objClass
=
element
.
pop
(
'_class'
)
if
objClass
in
[
'Dream.Machine'
,
'Dream.BatchScrapMachine'
,
'Dream.M3'
,
'Dream.MachineJobShop'
,
'Dream.MachineManagedJob'
,
'Dream.MouldAssembly'
,
'Dream.Exit'
,
'Dream.ExitJobShop'
,
'Dream.Queue'
,
'Dream.RoutingQueue'
,
'Dream.QueueJobShop'
,
'Dream.QueueManagedJob'
,
'Dream.Assembly'
,
'Dream.Dismantle'
,
'Dream.Source'
,
'Dream.Conveyer'
,
'Dream.BatchDecomposition'
,
'Dream.BatchReassembly'
,
'Dream.LineClearance'
,
'Dream.BatchSource'
,
'Dream.OrderDecomposition'
,
'Dream.MouldAssemblyBuffer'
,
'Dream.ConditionalBuffer'
,
'Dream.BatchDecompositionStartTime'
,
'Dream.ConditionalBuffer'
,
'Dream.CapacityStation'
,
'Dream.CapacityStationBuffer'
,
'Dream.CapacityStationExit'
]:
objectType
=
Globals
.
getClassFromName
(
objClass
)
from
CoreObject
import
CoreObject
if
issubclass
(
objectType
,
CoreObject
):
# remove data that has to do with wip or object interruption. CoreObjects do not need it
inputDict
=
dict
(
element
)
if
'wip'
in
inputDict
:
del
inputDict
[
'wip'
]
...
...
@@ -295,13 +290,16 @@ def createObjects():
del
inputDict
[
'shift'
]
if
'scheduledMaintenance'
in
inputDict
:
del
inputDict
[
'scheduledMaintenance'
]
objectType
=
Globals
.
getClassFromName
(
objClass
)
# create the CoreObject
coreObject
=
objectType
(
**
inputDict
)
# update the nextIDs list of the object
coreObject
.
nextIds
=
getSuccessorList
(
element
[
'id'
])
# (Below is only for Dismantle for now)
# get the successorList for the 'Parts'
coreObject
.
nextPartIds
=
getSuccessorList
(
element
[
'id'
],
lambda
source
,
destination
,
edge_data
:
edge_data
.
get
(
'entity'
)
==
'Part'
)
# get the successorList for the 'Frames'
coreObject
.
nextFrameIds
=
getSuccessorList
(
element
[
'id'
],
lambda
source
,
destination
,
edge_data
:
edge_data
.
get
(
'entity'
)
==
'Frame'
)
coreObject
.
nextIds
=
getSuccessorList
(
element
[
'id'
])
# update the nextIDs list of the object
# -----------------------------------------------------------------------
# loop through all the nodes to
...
...
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