Commit 9c758f6c authored by Georgios Dagkakis's avatar Georgios Dagkakis

handle also stations that work on full batch

parent 30e62cde
......@@ -129,8 +129,33 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
unitsToCompleteBatch=standardBatchUnits
# for stations that operate on full batches
else:
pass
stationId=group[0]
print '@@@@@@@@@@@@@@@@@@@@@@@@@',stationId
workingBatchSize=standardBatchUnits
stationWIPData=[element for element in WIPData if element[0] == stationId][0]
print stationWIPData
awaiting=stationWIPData[1]
complete=stationWIPData[2]
if not awaiting:
awaiting=0
awaiting=int(awaiting)
if not complete:
complete=0
complete=int(complete)
buffered=awaiting - (awaiting % workingBatchSize)
bufferedBatches=int(buffered/standardBatchUnits)
print buffered
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 complete:
unitsToProcess=standardBatchUnits-complete
self.createBatch(data, stationId, currentBatchId, currentBatchId,standardBatchUnits,unitsToProcess=unitsToProcess)
print unitsToProcess
print '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
return data
# creates a sub-batch in a station
......
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