Commit 9198dad2 authored by Georgios Dagkakis's avatar Georgios Dagkakis

further correction

parent 80c677a9
...@@ -88,6 +88,8 @@ class BatchesWIPShort(plugin.InputPreparationPlugin): ...@@ -88,6 +88,8 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
if unitsToCompleteBatch==0: if unitsToCompleteBatch==0:
subBatchCounter=0 subBatchCounter=0
batchCounter+=1 batchCounter+=1
currentBatchId='Batch_'+str(batchCounter)+'_WIP'
unitsToCompleteBatch=standardBatchUnits
# set the completed sub-batches to the next station # set the completed sub-batches to the next station
for i in range(int(proceeded/workingBatchSize)): for i in range(int(proceeded/workingBatchSize)):
bufferId=self.getSuccessors(data, stationId)[0] bufferId=self.getSuccessors(data, stationId)[0]
...@@ -97,6 +99,8 @@ class BatchesWIPShort(plugin.InputPreparationPlugin): ...@@ -97,6 +99,8 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
if unitsToCompleteBatch==0: if unitsToCompleteBatch==0:
subBatchCounter=0 subBatchCounter=0
batchCounter+=1 batchCounter+=1
currentBatchId='Batch_'+str(batchCounter)+'_WIP'
unitsToCompleteBatch=standardBatchUnits
# set the sub-batch inside the station # set the sub-batch inside the station
if currentCompleted: if currentCompleted:
self.createSubBatch(data, stationId, currentBatchId, currentBatchId, subBatchCounter, workingBatchSize, self.createSubBatch(data, stationId, currentBatchId, currentBatchId, subBatchCounter, workingBatchSize,
...@@ -106,6 +110,8 @@ class BatchesWIPShort(plugin.InputPreparationPlugin): ...@@ -106,6 +110,8 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
if unitsToCompleteBatch==0: if unitsToCompleteBatch==0:
subBatchCounter=0 subBatchCounter=0
batchCounter+=1 batchCounter+=1
currentBatchId='Batch_'+str(batchCounter)+'_WIP'
unitsToCompleteBatch=standardBatchUnits
# for stations that do not share sub-batches with others # for stations that do not share sub-batches with others
else: else:
...@@ -117,7 +123,7 @@ class BatchesWIPShort(plugin.InputPreparationPlugin): ...@@ -117,7 +123,7 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
def createSubBatch(self,data,stationId,parentBatchId,parentBatchName,subBatchId,numberOfUnits, def createSubBatch(self,data,stationId,parentBatchId,parentBatchName,subBatchId,numberOfUnits,
unitsToProcess=0,receiver=None): unitsToProcess=0,receiver=None):
print 'creating',stationId,parentBatchId print 'creating',stationId,parentBatchId
data['graph']['node'][stationId]['wip'].append({ data['graph']['node'][stationId]['wip'].insert(0,{
"_class": 'Dream.SubBatch', "_class": 'Dream.SubBatch',
"id": parentBatchId+'_SB_'+str(subBatchId)+'_wip', "id": parentBatchId+'_SB_'+str(subBatchId)+'_wip',
"name":parentBatchName+'_SB_'+str(subBatchId)+'_wip', "name":parentBatchName+'_SB_'+str(subBatchId)+'_wip',
...@@ -126,7 +132,8 @@ class BatchesWIPShort(plugin.InputPreparationPlugin): ...@@ -126,7 +132,8 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
"parentBatchId":parentBatchId, "parentBatchId":parentBatchId,
"parentBatchName":parentBatchName, "parentBatchName":parentBatchName,
"receiver":receiver "receiver":receiver
}) }
)
# gets the data and a station id and returns a list with all the stations that the station may share batches # 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): def findSharingStations(self,data,stationId):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment