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):
...
@@ -75,10 +75,16 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
complete
=
0
complete
=
0
complete
=
int
(
complete
)
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
)
buffered
=
awaiting
-
(
awaiting
%
workingBatchSize
)
proceeded
=
complete
-
(
complete
%
workingBatchSize
)
proceeded
=
complete
-
(
complete
%
workingBatchSize
)
currentCompleted
=
awaiting
%
workingBatchSize
currentCompleted
=
awaiting
%
workingBatchSize
bufferedSubBatches
=
int
(
buffered
/
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
self
.
checkIfStationIsAfterDecomposition
(
data
,
stationId
):
if
buffered
>=
standardBatchUnits
:
if
buffered
>=
standardBatchUnits
:
bufferedBatches
=
int
(
buffered
/
standardBatchUnits
)
bufferedBatches
=
int
(
buffered
/
standardBatchUnits
)
...
@@ -137,7 +143,6 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
...
@@ -137,7 +143,6 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
stationId
=
group
[
0
]
stationId
=
group
[
0
]
workingBatchSize
=
standardBatchUnits
workingBatchSize
=
standardBatchUnits
stationWIPData
=
[
element
for
element
in
WIPData
if
element
[
0
]
==
stationId
][
0
]
stationWIPData
=
[
element
for
element
in
WIPData
if
element
[
0
]
==
stationId
][
0
]
print
stationWIPData
awaiting
=
stationWIPData
[
1
]
awaiting
=
stationWIPData
[
1
]
complete
=
stationWIPData
[
2
]
complete
=
stationWIPData
[
2
]
if
not
awaiting
:
if
not
awaiting
:
...
@@ -146,15 +151,16 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
...
@@ -146,15 +151,16 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
if
not
complete
:
if
not
complete
:
complete
=
0
complete
=
0
complete
=
int
(
complete
)
complete
=
int
(
complete
)
# calculate how many full batches wait in buffer
buffered
=
awaiting
-
(
awaiting
%
workingBatchSize
)
buffered
=
awaiting
-
(
awaiting
%
workingBatchSize
)
bufferedBatches
=
int
(
buffered
/
standardBatchUnits
)
bufferedBatches
=
int
(
buffered
/
standardBatchUnits
)
print
buffered
# create the full batches in buffer
for
i
in
range
(
bufferedBatches
):
for
i
in
range
(
bufferedBatches
):
bufferId
=
self
.
getBuffer
(
data
,
stationId
)
bufferId
=
self
.
getBuffer
(
data
,
stationId
)
self
.
createBatch
(
data
,
bufferId
,
currentBatchId
,
currentBatchId
,
standardBatchUnits
)
self
.
createBatch
(
data
,
bufferId
,
currentBatchId
,
currentBatchId
,
standardBatchUnits
)
batchCounter
+=
1
batchCounter
+=
1
currentBatchId
=
'Batch_'
+
str
(
batchCounter
)
+
'_WIP'
currentBatchId
=
'Batch_'
+
str
(
batchCounter
)
+
'_WIP'
# if there is work in progress, create the batch giving the remaining units (unitsToProcess)
if
complete
:
if
complete
:
unitsToProcess
=
standardBatchUnits
-
complete
unitsToProcess
=
standardBatchUnits
-
complete
self
.
createBatch
(
data
,
stationId
,
currentBatchId
,
currentBatchId
,
standardBatchUnits
,
unitsToProcess
=
unitsToProcess
)
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