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
db4a87ed
Commit
db4a87ed
authored
Feb 20, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrections in batches wip plugin, not full yet
parent
4e064fa7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
11 deletions
+28
-11
dream/plugins/BatchesWIPSpreadsheet.py
dream/plugins/BatchesWIPSpreadsheet.py
+28
-11
No files found.
dream/plugins/BatchesWIPSpreadsheet.py
View file @
db4a87ed
...
...
@@ -16,7 +16,14 @@ class BatchesWIPSpreadsheet(plugin.InputPreparationPlugin):
""" Set the WIP in queue from spreadsheet data.
"""
wipData
=
data
[
'input'
].
get
(
'wip_spreadsheet'
,
None
)
node
=
data
[
'graph'
][
'node'
]
nodes
=
data
[
'graph'
][
'node'
]
# get the number of units for a standard batch
standardBatchUnits
=
0
for
node_id
,
node
in
nodes
.
iteritems
():
if
node
[
'_class'
]
==
'Dream.BatchSource'
:
standardBatchUnits
=
int
(
node
[
'numberOfUnits'
])
if
wipData
:
wipData
.
pop
(
0
)
# pop the column names
for
wipItem
in
wipData
:
...
...
@@ -32,15 +39,25 @@ class BatchesWIPSpreadsheet(plugin.InputPreparationPlugin):
_class
=
"Dream."
+
wipItem
[
4
]
parentBatchId
=
wipItem
[
5
]
wip
=
node
[
stationId
].
get
(
'wip'
,[])
wip
=
node
s
[
stationId
].
get
(
'wip'
,[])
if
not
wip
:
node
[
stationId
][
'wip'
]
=
[]
node
[
stationId
][
'wip'
].
append
({
"_class"
:
_class
,
"id"
:
partId
,
"name"
:
partId
,
"numberOfUnits"
:
numberOfUnits
,
"unitsToProcess"
:
unitsToProcess
,
"parentBatchId"
:
parentBatchId
})
nodes
[
stationId
][
'wip'
]
=
[]
stationClass
=
nodes
[
stationId
][
'_class'
]
# if the wip is in a buffer
if
stationClass
in
[
'Dream.RoutingQueue'
,
'Dream.Queue'
,
'Dream.LineClearance'
]:
wipDict
=
{
"_class"
:
_class
,
"id"
:
partId
,
"name"
:
'Batch_'
+
partId
+
'_wip'
,
"numberOfUnits"
:
numberOfUnits
,
}
if
parentBatchId
:
wipDict
[
'parentBatchId'
]
=
parentBatchId
wipDict
[
'name'
]
=
'Batch'
+
parentBatchId
+
'_SB'
+
partId
+
'wip'
nodes
[
stationId
][
'wip'
].
append
(
wipDict
)
# if the wip is in a server
else
:
workingBatchSize
=
int
(
nodes
[
stationId
].
get
((
'workingBatchSize'
),
standardBatchUnits
))
print
stationId
,
workingBatchSize
return
data
\ No newline at end of file
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