Commit d4ef9d33 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Jérome Perrin

reassemble method of BatchReassembly modified so that it calculates the number...

reassemble method of BatchReassembly modified so that it calculates the number of units when the batch is reassembled. So if there was scrapping in the sub-batches consistency will be kept
parent 6f78d410
......@@ -110,13 +110,20 @@ class BatchReassembly(CoreObject):
assert curSubBatchId == nextSubBatchId,\
'The subBatches in the re-assembly station are not of the same Batch'
#calculate the number of units of the Batch
numberOfUnits=0
for subBatch in activeObjectQueue:
numberOfUnits+=subBatch.numberOfUnits
batchToBeReassembled = None
for batch in G.BatchWaitingList:
if activeObjectQueue[0].batchId == batch.id:
batchToBeReassembled = batch
G.BatchWaitingList.remove(batchToBeReassembled)
del activeObjectQueue[:]
batchToBeReassembled.numberOfSubBatches = 1
batchToBeReassembled.numberOfUnits=numberOfUnits
activeObjectQueue.append(batchToBeReassembled)
def canAccept(self,callerObject=None):
......
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