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
584aa0f8
Commit
584aa0f8
authored
Aug 21, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments added
parent
42dce2d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
dream/plugins/Batches/BatchesWIPShort.py
dream/plugins/Batches/BatchesWIPShort.py
+9
-3
No files found.
dream/plugins/Batches/BatchesWIPShort.py
View file @
584aa0f8
...
...
@@ -75,10 +75,16 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
complete
=
0
complete
=
int
(
complete
)
# we calculate how many sub-batches are
# before station (in buffer or decomposition)
# after station (in buffer or reassembly) and
# inside station (currently worked)
buffered
=
awaiting
-
(
awaiting
%
workingBatchSize
)
proceeded
=
complete
-
(
complete
%
workingBatchSize
)
currentCompleted
=
awaiting
%
workingBatchSize
bufferedSubBatches
=
int
(
buffered
/
workingBatchSize
)
# if the station is after decomposition and has full batches waiting
# these should go to the buffer before decomposition
if
self
.
checkIfStationIsAfterDecomposition
(
data
,
stationId
):
if
buffered
>=
standardBatchUnits
:
bufferedBatches
=
int
(
buffered
/
standardBatchUnits
)
...
...
@@ -137,7 +143,6 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
stationId
=
group
[
0
]
workingBatchSize
=
standardBatchUnits
stationWIPData
=
[
element
for
element
in
WIPData
if
element
[
0
]
==
stationId
][
0
]
print
stationWIPData
awaiting
=
stationWIPData
[
1
]
complete
=
stationWIPData
[
2
]
if
not
awaiting
:
...
...
@@ -146,15 +151,16 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
if
not
complete
:
complete
=
0
complete
=
int
(
complete
)
# calculate how many full batches wait in buffer
buffered
=
awaiting
-
(
awaiting
%
workingBatchSize
)
bufferedBatches
=
int
(
buffered
/
standardBatchUnits
)
print
buffered
# create the full batches in buffer
for
i
in
range
(
bufferedBatches
):
bufferId
=
self
.
getBuffer
(
data
,
stationId
)
self
.
createBatch
(
data
,
bufferId
,
currentBatchId
,
currentBatchId
,
standardBatchUnits
)
batchCounter
+=
1
currentBatchId
=
'Batch_'
+
str
(
batchCounter
)
+
'_WIP'
# if there is work in progress, create the batch giving the remaining units (unitsToProcess)
if
complete
:
unitsToProcess
=
standardBatchUnits
-
complete
self
.
createBatch
(
data
,
stationId
,
currentBatchId
,
currentBatchId
,
standardBatchUnits
,
unitsToProcess
=
unitsToProcess
)
...
...
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