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
d2c9ebce
Commit
d2c9ebce
authored
Aug 27, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup with comments
parent
824569d7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
dream/plugins/Batches/BatchesWIPKEtool.py
dream/plugins/Batches/BatchesWIPKEtool.py
+1
-0
dream/plugins/Batches/BatchesWIPShort.py
dream/plugins/Batches/BatchesWIPShort.py
+1
-0
dream/plugins/Batches/BatchesWIPSpreadsheet.py
dream/plugins/Batches/BatchesWIPSpreadsheet.py
+1
-0
dream/plugins/Batches/OutputKEWIP.py
dream/plugins/Batches/OutputKEWIP.py
+8
-5
No files found.
dream/plugins/Batches/BatchesWIPKEtool.py
View file @
d2c9ebce
...
@@ -15,6 +15,7 @@ class BatchesWIPKEtool(plugin.InputPreparationPlugin):
...
@@ -15,6 +15,7 @@ class BatchesWIPKEtool(plugin.InputPreparationPlugin):
"""
"""
def
preprocess
(
self
,
data
):
def
preprocess
(
self
,
data
):
# if the WIP data is to be defined manually just return
if
data
[
'general'
].
get
(
'wipSource'
,
None
)
==
'Manually'
:
if
data
[
'general'
].
get
(
'wipSource'
,
None
)
==
'Manually'
:
return
data
return
data
...
...
dream/plugins/Batches/BatchesWIPShort.py
View file @
d2c9ebce
...
@@ -13,6 +13,7 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
...
@@ -13,6 +13,7 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
"""
"""
def
preprocess
(
self
,
data
):
def
preprocess
(
self
,
data
):
# if the WIP data is to be read by KE tool just return
if
data
[
'general'
].
get
(
'wipSource'
,
None
)
==
'KE tool'
:
if
data
[
'general'
].
get
(
'wipSource'
,
None
)
==
'KE tool'
:
return
data
return
data
...
...
dream/plugins/Batches/BatchesWIPSpreadsheet.py
View file @
d2c9ebce
...
@@ -15,6 +15,7 @@ class BatchesWIPSpreadsheet(plugin.InputPreparationPlugin):
...
@@ -15,6 +15,7 @@ class BatchesWIPSpreadsheet(plugin.InputPreparationPlugin):
def
preprocess
(
self
,
data
):
def
preprocess
(
self
,
data
):
""" Set the WIP in queue from spreadsheet data.
""" Set the WIP in queue from spreadsheet data.
"""
"""
# if the WIP data is to be read by KE tool just return
if
data
[
'general'
].
get
(
'wipSource'
,
None
)
==
'By KE'
:
if
data
[
'general'
].
get
(
'wipSource'
,
None
)
==
'By KE'
:
return
data
return
data
...
...
dream/plugins/Batches/OutputKEWIP.py
View file @
d2c9ebce
from
dream.plugins
import
plugin
from
dream.plugins
import
plugin
class
OutputKEWIP
(
plugin
.
OutputPreparationPlugin
):
class
OutputKEWIP
(
plugin
.
OutputPreparationPlugin
):
""" Output the
station utilization metrics in a format compatible with
""" Output the
WIP the KE tool return in a DREAM formatted spreadsheet
"""
"""
def
postprocess
(
self
,
data
):
def
postprocess
(
self
,
data
):
# if the wip was defined manually, no report should be given, just a message to explain.
if
data
[
'general'
].
get
(
'wipSource'
,
None
)
==
'Manually'
:
if
data
[
'general'
].
get
(
'wipSource'
,
None
)
==
'Manually'
:
data
[
'result'
][
'result_list'
][
0
][
self
.
configuration_dict
[
'output_id'
]]
=
[[
data
[
'result'
][
'result_list'
][
0
][
self
.
configuration_dict
[
'output_id'
]]
=
[[
'WIP Was defined Manually. No KE tool Input!'
'WIP Was defined Manually. No KE tool Input!'
]]
]]
return
data
return
data
# if the mode was to read by KE but no spreadsheet was uploaded, give a warning.
if
not
data
[
'input'
].
get
(
'wip_report'
,{}):
if
not
data
[
'input'
].
get
(
'wip_report'
,{}):
data
[
'result'
][
'result_list'
][
0
][
self
.
configuration_dict
[
'output_id'
]]
=
[[
data
[
'result'
][
'result_list'
][
0
][
self
.
configuration_dict
[
'output_id'
]]
=
[[
'Warning! No WIP Report was provided. KE could not be run and no WIP was defined in the model!'
'Warning! No WIP Report was provided. KE could not be run and no WIP was defined in the model!'
]]
]]
return
data
return
data
# set the titles
outPutSpreadsheet
=
[[
'Station'
,
'# units awaiting processing'
,
'# units complete but not passed on'
]]
outPutSpreadsheet
=
[[
'Station'
,
'# units awaiting processing'
,
'# units complete but not passed on'
]]
nodes
=
data
[
'graph'
][
'node'
]
nodes
=
data
[
'graph'
][
'node'
]
# create rows for all the stations
for
node_id
,
node
in
nodes
.
iteritems
():
for
node_id
,
node
in
nodes
.
iteritems
():
if
'Machine'
in
node
[
'_class'
]
or
'M3'
in
node
[
'_class'
]:
if
'Machine'
in
node
[
'_class'
]
or
'M3'
in
node
[
'_class'
]:
outPutSpreadsheet
.
append
([
node_id
,
0
])
outPutSpreadsheet
.
append
([
node_id
,
0
])
# read the input and for the queues that have WIP set the total number of units to the next station
# WIP from KE tool now is only in Queues but the manual input is done as '# units awaiting processing' in station
for
node_id
,
node
in
nodes
.
iteritems
():
for
node_id
,
node
in
nodes
.
iteritems
():
if
'Queue'
in
node
[
'_class'
]
or
'Clearance'
in
node
[
'_class'
]:
if
'Queue'
in
node
[
'_class'
]
or
'Clearance'
in
node
[
'_class'
]:
wip
=
node
.
get
(
'wip'
,[])
wip
=
node
.
get
(
'wip'
,[])
...
@@ -43,7 +47,6 @@ class OutputKEWIP(plugin.OutputPreparationPlugin):
...
@@ -43,7 +47,6 @@ class OutputKEWIP(plugin.OutputPreparationPlugin):
def
getNextStation
(
self
,
data
,
bufferId
):
def
getNextStation
(
self
,
data
,
bufferId
):
nodes
=
data
[
'graph'
][
'node'
]
nodes
=
data
[
'graph'
][
'node'
]
current
=
bufferId
current
=
bufferId
# find all the successors that may share batches
while
1
:
while
1
:
next
=
self
.
getSuccessors
(
data
,
current
)[
0
]
next
=
self
.
getSuccessors
(
data
,
current
)[
0
]
if
'Machine'
in
nodes
[
next
][
'_class'
]
or
'M3'
in
nodes
[
next
][
'_class'
]:
if
'Machine'
in
nodes
[
next
][
'_class'
]
or
'M3'
in
nodes
[
next
][
'_class'
]:
...
...
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