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
494d265e
Commit
494d265e
authored
Feb 24, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor corrections and key names update
parent
a72a126e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
19 deletions
+20
-19
dream/plugins/InsertQueues.py
dream/plugins/InsertQueues.py
+1
-1
dream/plugins/MergeSteps.py
dream/plugins/MergeSteps.py
+1
-1
dream/plugins/ReadJSCompleted.py
dream/plugins/ReadJSCompleted.py
+4
-4
dream/plugins/ReadJSWorkPlan.py
dream/plugins/ReadJSWorkPlan.py
+5
-5
dream/plugins/SplitRoute.py
dream/plugins/SplitRoute.py
+3
-4
dream/plugins/UpdateStationList.py
dream/plugins/UpdateStationList.py
+1
-1
dream/plugins/UpdateWIP.py
dream/plugins/UpdateWIP.py
+5
-3
No files found.
dream/plugins/InsertQueues.py
View file @
494d265e
...
@@ -63,7 +63,7 @@ class InsertQueues(plugin.InputPreparationPlugin):
...
@@ -63,7 +63,7 @@ class InsertQueues(plugin.InputPreparationPlugin):
""" inserts buffers before the corresponding stations
""" inserts buffers before the corresponding stations
"""
"""
self
.
data
=
copy
(
data
)
self
.
data
=
copy
(
data
)
orders
=
self
.
data
[
"input"
][
"BOM"
][
"
o
rders"
]
orders
=
self
.
data
[
"input"
][
"BOM"
][
"
productionO
rders"
]
nodes
=
self
.
data
[
"graph"
][
"node"
]
nodes
=
self
.
data
[
"graph"
][
"node"
]
for
order
in
orders
:
for
order
in
orders
:
orderComponents
=
order
.
get
(
"componentsList"
,
[])
orderComponents
=
order
.
get
(
"componentsList"
,
[])
...
...
dream/plugins/MergeSteps.py
View file @
494d265e
...
@@ -16,7 +16,7 @@ class MergeSteps(plugin.InputPreparationPlugin):
...
@@ -16,7 +16,7 @@ class MergeSteps(plugin.InputPreparationPlugin):
def
preprocess
(
self
,
data
):
def
preprocess
(
self
,
data
):
""" merge the steps that constitute one single technology step
""" merge the steps that constitute one single technology step
"""
"""
orders
=
data
[
"input"
][
"BOM"
][
'orders'
]
orders
=
data
[
"input"
][
"BOM"
][
"productionOrders"
]
# for all the orders
# for all the orders
for
order
in
orders
:
for
order
in
orders
:
orderComponents
=
order
.
get
(
"componentsList"
,
[])
orderComponents
=
order
.
get
(
"componentsList"
,
[])
...
...
dream/plugins/ReadJSCompleted.py
View file @
494d265e
...
@@ -18,7 +18,7 @@ class ReadJSCompleted(plugin.InputPreparationPlugin):
...
@@ -18,7 +18,7 @@ class ReadJSCompleted(plugin.InputPreparationPlugin):
""" inserts the retrieved order components and the related information (routing) to the BOM echelon
""" inserts the retrieved order components and the related information (routing) to the BOM echelon
"""
"""
self
.
data
=
data
self
.
data
=
data
orders
=
data
[
"input"
][
"BOM"
].
get
(
"
o
rders"
,{})
orders
=
data
[
"input"
][
"BOM"
].
get
(
"
productionO
rders"
,{})
wip
=
data
[
"input"
][
"BOM"
].
get
(
"WIP"
,
{})
wip
=
data
[
"input"
][
"BOM"
].
get
(
"WIP"
,
{})
for
order
in
orders
:
for
order
in
orders
:
components
=
order
.
get
(
"componentsList"
,
[])
components
=
order
.
get
(
"componentsList"
,
[])
...
@@ -30,11 +30,11 @@ class ReadJSCompleted(plugin.InputPreparationPlugin):
...
@@ -30,11 +30,11 @@ class ReadJSCompleted(plugin.InputPreparationPlugin):
if
completed
==
"No"
or
completed
==
""
:
if
completed
==
"No"
or
completed
==
""
:
routeConcluded
=
False
routeConcluded
=
False
# check the WIP and see if the current part already resides there
# check the WIP and see if the current part already resides there
if
not
component
[
"
componentID
"
]
in
wip
.
keys
():
if
not
component
[
"
id
"
]
in
wip
.
keys
():
# if there is a previous task
# if there is a previous task
if
index
:
if
index
:
previousStep
=
route
[
index
-
1
]
previousStep
=
route
[
index
-
1
]
wip
[
component
[
"
componentID
"
]]
=
{
wip
[
component
[
"
id
"
]]
=
{
"task_id"
:
previousStep
[
"task_id"
],
"task_id"
:
previousStep
[
"task_id"
],
"station"
:
previousStep
[
"technology"
],
"station"
:
previousStep
[
"technology"
],
"remainingProcessingTime"
:
0
,
"remainingProcessingTime"
:
0
,
...
@@ -42,7 +42,7 @@ class ReadJSCompleted(plugin.InputPreparationPlugin):
...
@@ -42,7 +42,7 @@ class ReadJSCompleted(plugin.InputPreparationPlugin):
}
}
break
break
if
routeConcluded
:
if
routeConcluded
:
wip
[
component
[
"
componentID
"
]]
=
{
wip
[
component
[
"
id
"
]]
=
{
"task_id"
:
step
[
"task_id"
],
"task_id"
:
step
[
"task_id"
],
"station"
:
step
[
"technology"
],
"station"
:
step
[
"technology"
],
"remainingProcessingTime"
:
0
,
"remainingProcessingTime"
:
0
,
...
...
dream/plugins/ReadJSWorkPlan.py
View file @
494d265e
...
@@ -15,14 +15,14 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin):
...
@@ -15,14 +15,14 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin):
def
findEntityByID
(
self
,
ID
):
def
findEntityByID
(
self
,
ID
):
"""search within the BOM and find the entity (order or component)"""
"""search within the BOM and find the entity (order or component)"""
orders
=
self
.
data
[
"input"
][
"BOM"
].
get
(
"
o
rders"
,
{})
orders
=
self
.
data
[
"input"
][
"BOM"
].
get
(
"
productionO
rders"
,
{})
for
order
in
orders
:
for
order
in
orders
:
# check if the id corresponds to an order
# check if the id corresponds to an order
if
ID
==
order
[
"
orderID
"
]:
if
ID
==
order
[
"
id
"
]:
return
order
return
order
components
=
order
.
get
(
"componentsList"
,
[])
components
=
order
.
get
(
"componentsList"
,
[])
for
component
in
components
:
for
component
in
components
:
if
ID
==
component
[
"
componentID
"
]:
if
ID
==
component
[
"
id
"
]:
return
component
return
component
return
{}
return
{}
...
@@ -47,8 +47,8 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin):
...
@@ -47,8 +47,8 @@ class ReadJSWorkPlan(plugin.InputPreparationPlugin):
components
=
order
.
get
(
"componentsList"
,[])
components
=
order
.
get
(
"componentsList"
,[])
# the part is brand new
# the part is brand new
part
=
{
part
=
{
"
componentID
"
:
partID
,
"
id
"
:
partID
,
"
componentN
ame"
:
partName
"
n
ame"
:
partName
}
}
components
.
append
(
part
)
components
.
append
(
part
)
order
[
"componentsList"
]
=
components
order
[
"componentsList"
]
=
components
...
...
dream/plugins/SplitRoute.py
View file @
494d265e
...
@@ -18,8 +18,7 @@ class SplitRoute(plugin.InputPreparationPlugin):
...
@@ -18,8 +18,7 @@ class SplitRoute(plugin.InputPreparationPlugin):
def
preprocess
(
self
,
data
):
def
preprocess
(
self
,
data
):
""" splits the routes of mould parts (design + mould)
""" splits the routes of mould parts (design + mould)
"""
"""
orders
=
data
[
"input"
][
"BOM"
][
"orders"
]
orders
=
data
[
"input"
][
"BOM"
][
"productionOrders"
]
# stations = data["input"]["BOM"]["stations"]
for
order
in
orders
:
for
order
in
orders
:
orderComponents
=
order
.
get
(
"componentsList"
,
[])
orderComponents
=
order
.
get
(
"componentsList"
,
[])
componentsToAdd
=
[]
componentsToAdd
=
[]
...
@@ -38,8 +37,8 @@ class SplitRoute(plugin.InputPreparationPlugin):
...
@@ -38,8 +37,8 @@ class SplitRoute(plugin.InputPreparationPlugin):
else
:
else
:
i
+=
1
i
+=
1
if
design_step_list
:
if
design_step_list
:
design
=
{
"
componentName"
:
component
.
get
(
"componentN
ame"
,
""
)
+
"_Design"
,
design
=
{
"
name"
:
component
.
get
(
"n
ame"
,
""
)
+
"_Design"
,
"
componentID"
:
component
.
get
(
"componentID
"
,
""
)
+
"_D"
,
"
id"
:
component
.
get
(
"id
"
,
""
)
+
"_D"
,
"quantity"
:
component
.
get
(
"quantity"
,
1
),
"quantity"
:
component
.
get
(
"quantity"
,
1
),
"route"
:
design_step_list
}
"route"
:
design_step_list
}
componentsToAdd
.
append
(
design
)
componentsToAdd
.
append
(
design
)
...
...
dream/plugins/UpdateStationList.py
View file @
494d265e
...
@@ -43,7 +43,7 @@ class UpdateStationList(plugin.InputPreparationPlugin):
...
@@ -43,7 +43,7 @@ class UpdateStationList(plugin.InputPreparationPlugin):
""" substitutes the technology information with stationIDs lists
""" substitutes the technology information with stationIDs lists
"""
"""
self
.
data
=
data
self
.
data
=
data
orders
=
data
[
"input"
][
"BOM"
][
'orders'
]
orders
=
data
[
"input"
][
"BOM"
][
"productionOrders"
]
try
:
try
:
stations
=
data
[
"input"
][
"BOM"
][
'stations'
]
stations
=
data
[
"input"
][
"BOM"
][
'stations'
]
except
:
except
:
...
...
dream/plugins/UpdateWIP.py
View file @
494d265e
...
@@ -20,7 +20,7 @@ class UpdateWIP(plugin.InputPreparationPlugin):
...
@@ -20,7 +20,7 @@ class UpdateWIP(plugin.InputPreparationPlugin):
""" updates the Work in Process according to what is provided by the BOM, i.e. if a design just exited the last step of it's sequence
""" updates the Work in Process according to what is provided by the BOM, i.e. if a design just exited the last step of it's sequence
"""
"""
self
.
data
=
copy
(
data
)
self
.
data
=
copy
(
data
)
orders
=
self
.
data
[
"input"
][
"BOM"
][
"
o
rders"
]
orders
=
self
.
data
[
"input"
][
"BOM"
][
"
productionO
rders"
]
nodes
=
self
.
data
[
"graph"
][
"node"
]
nodes
=
self
.
data
[
"graph"
][
"node"
]
wip
=
self
.
data
[
"input"
][
"BOM"
].
get
(
"WIP"
,
{})
wip
=
self
.
data
[
"input"
][
"BOM"
].
get
(
"WIP"
,
{})
...
@@ -35,7 +35,7 @@ class UpdateWIP(plugin.InputPreparationPlugin):
...
@@ -35,7 +35,7 @@ class UpdateWIP(plugin.InputPreparationPlugin):
completedComponents
=
[]
# list to hold the componentIDs that are concluded
completedComponents
=
[]
# list to hold the componentIDs that are concluded
# # find all the components
# # find all the components
for
component
in
orderComponents
:
for
component
in
orderComponents
:
componentID
=
component
[
"
componentID
"
]
componentID
=
component
[
"
id
"
]
route
=
component
[
"route"
]
route
=
component
[
"route"
]
# # figure out if they are defined in the WIP
# # figure out if they are defined in the WIP
if
componentID
in
self
.
getWIPIds
():
if
componentID
in
self
.
getWIPIds
():
...
@@ -79,7 +79,7 @@ class UpdateWIP(plugin.InputPreparationPlugin):
...
@@ -79,7 +79,7 @@ class UpdateWIP(plugin.InputPreparationPlugin):
# if the entity is not recognized within the current WIP then check if it should be created
# if the entity is not recognized within the current WIP then check if it should be created
# first the flag designComplete and the completedComponents list must be updated
# first the flag designComplete and the completedComponents list must be updated
for
component
in
orderComponents
:
for
component
in
orderComponents
:
componentID
=
component
[
"
componentID
"
]
componentID
=
component
[
"
id
"
]
route
=
component
[
"route"
]
route
=
component
[
"route"
]
if
not
componentID
in
self
.
getWIPIds
():
if
not
componentID
in
self
.
getWIPIds
():
insertWIPitem
=
False
insertWIPitem
=
False
...
@@ -100,6 +100,8 @@ class UpdateWIP(plugin.InputPreparationPlugin):
...
@@ -100,6 +100,8 @@ class UpdateWIP(plugin.InputPreparationPlugin):
insertWIPitem
=
True
insertWIPitem
=
True
if
insertWIPitem
:
if
insertWIPitem
:
if
not
wip
.
get
(
componentID
,
{}):
wip
[
componentID
]
=
{}
wip
[
componentID
][
"station"
]
=
route
[
0
][
"stationIdsList"
][
0
]
wip
[
componentID
][
"station"
]
=
route
[
0
][
"stationIdsList"
][
0
]
wip
[
componentID
][
"sequence"
]
=
route
[
0
][
"sequence"
]
wip
[
componentID
][
"sequence"
]
=
route
[
0
][
"sequence"
]
wip
[
componentID
][
"task_id"
]
=
route
[
0
][
"task_id"
]
wip
[
componentID
][
"task_id"
]
=
route
[
0
][
"task_id"
]
...
...
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