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
824569d7
Commit
824569d7
authored
Aug 27, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow model to run if no WIP report is uploaded, but throw a warning message in the spreadsheet
parent
891a4781
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
dream/plugins/Batches/BatchesWIPKEtool.py
dream/plugins/Batches/BatchesWIPKEtool.py
+4
-1
dream/plugins/Batches/OutputKEWIP.py
dream/plugins/Batches/OutputKEWIP.py
+9
-4
No files found.
dream/plugins/Batches/BatchesWIPKEtool.py
View file @
824569d7
...
@@ -28,7 +28,10 @@ class BatchesWIPKEtool(plugin.InputPreparationPlugin):
...
@@ -28,7 +28,10 @@ class BatchesWIPKEtool(plugin.InputPreparationPlugin):
node
[
'wip'
]
=
[]
node
[
'wip'
]
=
[]
data_uri_encoded_input_data
=
data
[
'input'
].
get
(
self
.
configuration_dict
[
'input_id'
],
{})
data_uri_encoded_input_data
=
data
[
'input'
].
get
(
self
.
configuration_dict
[
'input_id'
],
{})
try
:
wipData
=
KEtoolWIP
(
data_uri_encoded_input_data
)
wipData
=
KEtoolWIP
(
data_uri_encoded_input_data
)
except
TypeError
:
return
data
for
batchId
,
stationId
in
wipData
.
iteritems
():
for
batchId
,
stationId
in
wipData
.
iteritems
():
nextBufferId
=
self
.
getNextBuffer
(
data
,
stationId
)
nextBufferId
=
self
.
getNextBuffer
(
data
,
stationId
)
if
not
nextBufferId
:
if
not
nextBufferId
:
...
...
dream/plugins/Batches/OutputKEWIP.py
View file @
824569d7
...
@@ -10,6 +10,14 @@ class OutputKEWIP(plugin.OutputPreparationPlugin):
...
@@ -10,6 +10,14 @@ class OutputKEWIP(plugin.OutputPreparationPlugin):
'WIP Was defined Manually. No KE tool Input!'
'WIP Was defined Manually. No KE tool Input!'
]]
]]
return
data
return
data
if
not
data
[
'input'
].
get
(
'wip_report'
,{}):
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!'
]]
return
data
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'
]
...
@@ -21,15 +29,12 @@ class OutputKEWIP(plugin.OutputPreparationPlugin):
...
@@ -21,15 +29,12 @@ class OutputKEWIP(plugin.OutputPreparationPlugin):
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'
,[])
stationId
=
self
.
getNextStation
(
data
,
node_id
)
stationId
=
self
.
getNextStation
(
data
,
node_id
)
print
node_id
,
stationId
totalUnits
=
0
totalUnits
=
0
for
element
in
wip
:
for
element
in
wip
:
numberOfUnits
=
element
.
get
(
'numberOfUnits'
,
0
)
numberOfUnits
=
element
.
get
(
'numberOfUnits'
,
0
)
totalUnits
+=
numberOfUnits
totalUnits
+=
numberOfUnits
for
record
in
outPutSpreadsheet
:
for
record
in
outPutSpreadsheet
:
print
record
if
record
[
0
]
==
stationId
:
if
record
[
0
]
==
stationId
:
print
'appending'
,
totalUnits
record
[
1
]
=
(
totalUnits
)
record
[
1
]
=
(
totalUnits
)
data
[
'result'
][
'result_list'
][
0
][
self
.
configuration_dict
[
'output_id'
]]
=
outPutSpreadsheet
data
[
'result'
][
'result_list'
][
0
][
self
.
configuration_dict
[
'output_id'
]]
=
outPutSpreadsheet
return
data
return
data
...
...
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