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
6a727d79
Commit
6a727d79
authored
Feb 23, 2015
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new plugin that updates the WIP according to the flag completed of the route steps
parent
4c0653bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
0 deletions
+54
-0
dream/plugins/ReadJSCompleted.py
dream/plugins/ReadJSCompleted.py
+51
-0
dream/simulation/Examples/GUI_instances/JobShopAllInOneEmpty.json
...mulation/Examples/GUI_instances/JobShopAllInOneEmpty.json
+3
-0
No files found.
dream/plugins/ReadJSCompleted.py
0 → 100644
View file @
6a727d79
from
copy
import
copy
import
json
import
time
import
random
import
operator
from
datetime
import
datetime
import
copy
from
dream.plugins
import
plugin
class
ReadJSCompleted
(
plugin
.
InputPreparationPlugin
):
""" Input preparation
reads the work-plan from the corresponding spreadsheet
"""
def
preprocess
(
self
,
data
):
""" inserts the retrieved order components and the related information (routing) to the BOM echelon
"""
self
.
data
=
data
orders
=
data
[
"input"
][
"BOM"
].
get
(
"orders"
,{})
wip
=
data
[
"input"
][
"BOM"
].
get
(
"WIP"
,
{})
for
order
in
orders
:
components
=
order
.
get
(
"componentsList"
,
[])
for
component
in
components
:
routeConcluded
=
True
route
=
component
.
get
(
"route"
,
[])
for
index
,
step
in
enumerate
(
route
):
completed
=
step
.
get
(
"completed"
,
)
if
not
completed
:
routeConcluded
=
False
# check the WIP and see if the current part already resides there
if
not
part
[
"componentID"
]
in
wip
.
keys
():
# if there is a previous task
if
index
:
previousStep
=
route
[
index
-
1
]
# XXX: no entry/exit/stationID is defined
wip
[
part
[
"componentID"
]]
=
{
"task_id"
:
previousStep
[
"task_id"
],
"station"
:
previousStep
[
"technology"
],
"remainingProcessingTime"
:
0
,
"sequence"
:
previousStep
[
"sequence"
]
}
if
routeConcluded
:
wip
[
part
[
"componentID"
]]
=
{
"task_id"
:
step
[
"task_id"
],
"station"
:
step
[
"technology"
],
"remainingProcessingTime"
:
0
,
"sequence"
:
step
[
"sequence"
]
}
return
data
\ No newline at end of file
dream/simulation/Examples/GUI_instances/JobShopAllInOneEmpty.json
View file @
6a727d79
...
...
@@ -822,6 +822,9 @@
},
{
"_class"
:
"dream.plugins.ReadJSWorkPlan.ReadJSWorkPlan"
,
"input_id"
:
"workplan_spreadsheet"
},
{
"_class"
:
"dream.plugins.ReadJSCompleted.ReadJSCompleted"
,
"input_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