Commit 42dce2d5 authored by Georgios Dagkakis's avatar Georgios Dagkakis

prints removed

parent 630acdd6
...@@ -65,8 +65,6 @@ class BatchesWIPShort(plugin.InputPreparationPlugin): ...@@ -65,8 +65,6 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
for stationId in group: for stationId in group:
workingBatchSize=nodes[stationId]['workingBatchSize'] workingBatchSize=nodes[stationId]['workingBatchSize']
stationWIPData=[element for element in WIPData if element[0] == stationId][0] stationWIPData=[element for element in WIPData if element[0] == stationId][0]
print stationWIPData
print stationId, self.checkIfStationIsAfterDecomposition(data, stationId),self.getBuffer(data, stationId)
awaiting=stationWIPData[1] awaiting=stationWIPData[1]
complete=stationWIPData[2] complete=stationWIPData[2]
startingBatchCounter=batchCounter startingBatchCounter=batchCounter
...@@ -80,13 +78,11 @@ class BatchesWIPShort(plugin.InputPreparationPlugin): ...@@ -80,13 +78,11 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
buffered=awaiting - (awaiting % workingBatchSize) buffered=awaiting - (awaiting % workingBatchSize)
proceeded=complete - (complete % workingBatchSize) proceeded=complete - (complete % workingBatchSize)
currentCompleted=awaiting % workingBatchSize currentCompleted=awaiting % workingBatchSize
print buffered,proceeded,currentCompleted
bufferedSubBatches=int(buffered/workingBatchSize) bufferedSubBatches=int(buffered/workingBatchSize)
if self.checkIfStationIsAfterDecomposition(data, stationId): if self.checkIfStationIsAfterDecomposition(data, stationId):
if buffered>=standardBatchUnits: if buffered>=standardBatchUnits:
bufferedBatches=int(buffered/standardBatchUnits) bufferedBatches=int(buffered/standardBatchUnits)
bufferedSubBatches=int((buffered-bufferedBatches*standardBatchUnits)/workingBatchSize) bufferedSubBatches=int((buffered-bufferedBatches*standardBatchUnits)/workingBatchSize)
print bufferedBatches,bufferedSubBatches
for i in range(bufferedBatches): for i in range(bufferedBatches):
bufferId=self.getBuffer(data, stationId) bufferId=self.getBuffer(data, stationId)
...@@ -139,7 +135,6 @@ class BatchesWIPShort(plugin.InputPreparationPlugin): ...@@ -139,7 +135,6 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
# for stations that operate on full batches # for stations that operate on full batches
else: else:
stationId=group[0] stationId=group[0]
print '@@@@@@@@@@@@@@@@@@@@@@@@@',stationId
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 print stationWIPData
...@@ -163,14 +158,12 @@ class BatchesWIPShort(plugin.InputPreparationPlugin): ...@@ -163,14 +158,12 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
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)
print unitsToProcess
print '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
return data return data
# creates a sub-batch in a station # creates a sub-batch in a station
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 sub-batch',stationId,parentBatchId,receiver # print 'creating sub-batch',stationId,parentBatchId,receiver
data['graph']['node'][stationId]['wip'].insert(0,{ 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',
...@@ -185,7 +178,7 @@ class BatchesWIPShort(plugin.InputPreparationPlugin): ...@@ -185,7 +178,7 @@ class BatchesWIPShort(plugin.InputPreparationPlugin):
# creates a batch in a station # creates a batch in a station
def createBatch(self,data,stationId,batchId,batchName,numberOfUnits,unitsToProcess=0): def createBatch(self,data,stationId,batchId,batchName,numberOfUnits,unitsToProcess=0):
print 'creating batch',stationId,batchId,numberOfUnits # print 'creating batch',stationId,batchId,numberOfUnits
data['graph']['node'][stationId]['wip'].insert(0,{ data['graph']['node'][stationId]['wip'].insert(0,{
"_class": 'Dream.Batch', "_class": 'Dream.Batch',
"id": batchId+'_wip', "id": batchId+'_wip',
......
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