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
9198dad2
Commit
9198dad2
authored
Aug 20, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
further correction
parent
80c677a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
dream/plugins/Batches/BatchesWIPShort.py
dream/plugins/Batches/BatchesWIPShort.py
+9
-2
No files found.
dream/plugins/Batches/BatchesWIPShort.py
View file @
9198dad2
...
...
@@ -88,6 +88,8 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
if
unitsToCompleteBatch
==
0
:
subBatchCounter
=
0
batchCounter
+=
1
currentBatchId
=
'Batch_'
+
str
(
batchCounter
)
+
'_WIP'
unitsToCompleteBatch
=
standardBatchUnits
# set the completed sub-batches to the next station
for
i
in
range
(
int
(
proceeded
/
workingBatchSize
)):
bufferId
=
self
.
getSuccessors
(
data
,
stationId
)[
0
]
...
...
@@ -97,6 +99,8 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
if
unitsToCompleteBatch
==
0
:
subBatchCounter
=
0
batchCounter
+=
1
currentBatchId
=
'Batch_'
+
str
(
batchCounter
)
+
'_WIP'
unitsToCompleteBatch
=
standardBatchUnits
# set the sub-batch inside the station
if
currentCompleted
:
self
.
createSubBatch
(
data
,
stationId
,
currentBatchId
,
currentBatchId
,
subBatchCounter
,
workingBatchSize
,
...
...
@@ -106,6 +110,8 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
if
unitsToCompleteBatch
==
0
:
subBatchCounter
=
0
batchCounter
+=
1
currentBatchId
=
'Batch_'
+
str
(
batchCounter
)
+
'_WIP'
unitsToCompleteBatch
=
standardBatchUnits
# for stations that do not share sub-batches with others
else
:
...
...
@@ -117,7 +123,7 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
def
createSubBatch
(
self
,
data
,
stationId
,
parentBatchId
,
parentBatchName
,
subBatchId
,
numberOfUnits
,
unitsToProcess
=
0
,
receiver
=
None
):
print
'creating'
,
stationId
,
parentBatchId
data
[
'graph'
][
'node'
][
stationId
][
'wip'
].
append
(
{
data
[
'graph'
][
'node'
][
stationId
][
'wip'
].
insert
(
0
,
{
"_class"
:
'Dream.SubBatch'
,
"id"
:
parentBatchId
+
'_SB_'
+
str
(
subBatchId
)
+
'_wip'
,
"name"
:
parentBatchName
+
'_SB_'
+
str
(
subBatchId
)
+
'_wip'
,
...
...
@@ -126,7 +132,8 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
"parentBatchId"
:
parentBatchId
,
"parentBatchName"
:
parentBatchName
,
"receiver"
:
receiver
})
}
)
# gets the data and a station id and returns a list with all the stations that the station may share batches
def
findSharingStations
(
self
,
data
,
stationId
):
...
...
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