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
b6427cc1
Commit
b6427cc1
authored
Feb 20, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plugin update. Cleanup needed
parent
403d7e86
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
132 additions
and
6 deletions
+132
-6
dream/plugins/BatchesWIPSpreadsheet.py
dream/plugins/BatchesWIPSpreadsheet.py
+132
-6
No files found.
dream/plugins/BatchesWIPSpreadsheet.py
View file @
b6427cc1
...
...
@@ -63,6 +63,7 @@ class BatchesWIPSpreadsheet(plugin.InputPreparationPlugin):
nextObject
=
self
.
getSuccessors
(
data
,
stationId
)[
0
]
previousObject
=
self
.
getPredecessors
(
data
,
stationId
)[
0
]
# if the station has inherent decomposition/reassembly
if
nodes
[
nextObject
][
'_class'
].
startswith
(
'Dream.BatchReassembly'
)
\
and
nodes
[
previousObject
][
'_class'
].
startswith
(
'Dream.BatchDecomposition'
):
sbId
=
0
...
...
@@ -79,6 +80,7 @@ class BatchesWIPSpreadsheet(plugin.InputPreparationPlugin):
})
sbId
+=
1
remainingUnitsInWorkingBatch
=
int
(
unitsToProcess
)
%
workingBatchSize
if
remainingUnitsInWorkingBatch
:
nodes
[
stationId
][
'wip'
].
append
({
"_class"
:
'Dream.SubBatch'
,
"id"
:
'B_'
+
partId
+
'_WIP_SB_'
+
str
(
sbId
),
...
...
@@ -99,4 +101,128 @@ class BatchesWIPSpreadsheet(plugin.InputPreparationPlugin):
"parentBatchName"
:
'Batch'
+
partId
+
"WIP"
})
sbId
+=
1
# if the station is after routing queue and before reassembly
elif
nodes
[
nextObject
][
'_class'
].
startswith
(
'Dream.BatchReassembly'
)
\
and
nodes
[
previousObject
][
'_class'
].
startswith
(
'Dream.RoutingQueue'
):
sbId
=
0
SBinReassembly
=
(
int
(
numberOfUnits
)
-
int
(
unitsToProcess
))
/
workingBatchSize
SBinDecomposition
=
int
(
unitsToProcess
)
/
workingBatchSize
for
i
in
range
(
SBinReassembly
):
nodes
[
nextObject
][
'wip'
].
append
({
"_class"
:
'Dream.SubBatch'
,
"id"
:
'B_'
+
partId
+
'_WIP_SB_'
+
str
(
sbId
),
"name"
:
'Batch'
+
partId
+
'_SubBatch_'
+
str
(
sbId
)
+
'_wip'
,
"numberOfUnits"
:
workingBatchSize
,
"parentBatchId"
:
partId
,
"parentBatchName"
:
'Batch'
+
partId
+
"WIP"
})
sbId
+=
1
remainingUnitsInWorkingBatch
=
int
(
unitsToProcess
)
%
workingBatchSize
if
remainingUnitsInWorkingBatch
:
nodes
[
stationId
][
'wip'
].
append
({
"_class"
:
'Dream.SubBatch'
,
"id"
:
'B_'
+
partId
+
'_WIP_SB_'
+
str
(
sbId
),
"name"
:
'Batch'
+
partId
+
'_SubBatch_'
+
str
(
sbId
)
+
'_wip'
,
"numberOfUnits"
:
workingBatchSize
,
"parentBatchId"
:
partId
,
"unitsToProcess"
:
remainingUnitsInWorkingBatch
,
"parentBatchName"
:
'Batch'
+
partId
+
"WIP"
})
sbId
+=
1
for
i
in
range
(
SBinDecomposition
):
nodes
[
previousObject
][
'wip'
].
append
({
"_class"
:
'Dream.SubBatch'
,
"id"
:
'B_'
+
partId
+
'_WIP_SB_'
+
str
(
sbId
),
"name"
:
'Batch'
+
partId
+
'_SubBatch_'
+
str
(
sbId
)
+
'_wip'
,
"numberOfUnits"
:
workingBatchSize
,
"parentBatchId"
:
partId
,
"parentBatchName"
:
'Batch'
+
partId
+
"WIP"
,
"receiver"
:
stationId
})
sbId
+=
1
# if the station is after batch decomposition and before reassembly
elif
nodes
[
nextObject
][
'_class'
].
startswith
(
'Dream.RoutingQueue'
)
\
and
nodes
[
previousObject
][
'_class'
].
startswith
(
'Dream.BatchDecomposition'
):
sbId
=
0
SBinReassembly
=
(
int
(
numberOfUnits
)
-
int
(
unitsToProcess
))
/
workingBatchSize
SBinDecomposition
=
int
(
unitsToProcess
)
/
workingBatchSize
for
i
in
range
(
SBinReassembly
):
nodes
[
nextObject
][
'wip'
].
append
({
"_class"
:
'Dream.SubBatch'
,
"id"
:
'B_'
+
partId
+
'_WIP_SB_'
+
str
(
sbId
),
"name"
:
'Batch'
+
partId
+
'_SubBatch_'
+
str
(
sbId
)
+
'_wip'
,
"numberOfUnits"
:
workingBatchSize
,
"parentBatchId"
:
partId
,
"parentBatchName"
:
'Batch'
+
partId
+
"WIP"
})
sbId
+=
1
remainingUnitsInWorkingBatch
=
int
(
unitsToProcess
)
%
workingBatchSize
if
remainingUnitsInWorkingBatch
:
nodes
[
stationId
][
'wip'
].
append
({
"_class"
:
'Dream.SubBatch'
,
"id"
:
'B_'
+
partId
+
'_WIP_SB_'
+
str
(
sbId
),
"name"
:
'Batch'
+
partId
+
'_SubBatch_'
+
str
(
sbId
)
+
'_wip'
,
"numberOfUnits"
:
workingBatchSize
,
"parentBatchId"
:
partId
,
"unitsToProcess"
:
remainingUnitsInWorkingBatch
,
"parentBatchName"
:
'Batch'
+
partId
+
"WIP"
})
sbId
+=
1
for
i
in
range
(
SBinDecomposition
):
nodes
[
previousObject
][
'wip'
].
append
({
"_class"
:
'Dream.SubBatch'
,
"id"
:
'B_'
+
partId
+
'_WIP_SB_'
+
str
(
sbId
),
"name"
:
'Batch'
+
partId
+
'_SubBatch_'
+
str
(
sbId
)
+
'_wip'
,
"numberOfUnits"
:
workingBatchSize
,
"parentBatchId"
:
partId
,
"parentBatchName"
:
'Batch_'
+
partId
+
"_WIP"
})
sbId
+=
1
# for the stations in the end of a sub-line
elif
nodes
[
stationId
][
'_class'
]
==
'Dream.M3'
:
# if there are no more units to process, put the sub-batch in reassembly
if
int
(
unitsToProcess
)
==
0
:
nodes
[
nextObject
][
'wip'
].
append
({
"_class"
:
_class
,
"id"
:
partId
,
"name"
:
'Batch'
+
parentBatchId
+
'_SubBatch_'
+
partId
+
'_wip'
,
"numberOfUnits"
:
numberOfUnits
,
"parentBatchId"
:
parentBatchId
,
"parentBatchName"
:
'Batch_'
+
parentBatchId
+
"_WIP"
})
# else put the sub-batch in the station
else
:
nodes
[
stationId
][
'wip'
].
append
({
"_class"
:
_class
,
"id"
:
partId
,
"name"
:
'Batch'
+
parentBatchId
+
'_SubBatch_'
+
partId
+
'_wip'
,
"numberOfUnits"
:
numberOfUnits
,
"parentBatchId"
:
parentBatchId
,
"unitsToProcess"
:
unitsToProcess
,
"parentBatchName"
:
'Batch_'
+
parentBatchId
+
"_WIP"
})
# for the stations at the start of a sub-line
elif
nodes
[
stationId
][
'_class'
]
==
'Dream.BatchScrapMachineAfterDecompose'
:
# if there are no more units to process, put the sub-batch in reassembly
if
int
(
unitsToProcess
)
==
workingBatchSize
:
nodes
[
previousObject
][
'wip'
].
append
({
"_class"
:
_class
,
"id"
:
partId
,
"name"
:
'Batch'
+
parentBatchId
+
'_SubBatch_'
+
partId
+
'_wip'
,
"numberOfUnits"
:
numberOfUnits
,
"parentBatchId"
:
parentBatchId
,
"parentBatchName"
:
'Batch_'
+
parentBatchId
+
"_WIP"
})
# else put the sub-batch in the station
else
:
nodes
[
stationId
][
'wip'
].
append
({
"_class"
:
_class
,
"id"
:
partId
,
"name"
:
'Batch'
+
parentBatchId
+
'_SubBatch_'
+
partId
+
'_wip'
,
"numberOfUnits"
:
numberOfUnits
,
"parentBatchId"
:
parentBatchId
,
"unitsToProcess"
:
unitsToProcess
,
"parentBatchName"
:
'Batch_'
+
parentBatchId
+
"_WIP"
})
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