Commit 0eb0563c authored by Georgios Dagkakis's avatar Georgios Dagkakis

be able to set Batches as WIP in BatchScrapMachine

parent 7807e78b
......@@ -88,6 +88,10 @@ class BatchScrapMachine(Machine):
# =======================================================================
def calculateProcessingTime(self):
activeEntity = self.getActiveObjectQueue()[0]
# this is only for processing of the initial wip
if self.isProcessingInitialWIP:
if activeEntity.unitsToProcess:
return self.rng.generateNumber()*activeEntity.unitsToProcess
return self.rng.generateNumber()*activeEntity.numberOfUnits
......@@ -1167,7 +1167,7 @@ def createWIP():
G.WipList.append(B)
G.EntityList.append(B)
object=Globals.findObjectById(element['id'])
B.remainingProcessingTime=entity.get('remainingProcessingTime', {})
B.unitsToProcess=int(entity.get('unitsToProcess', numberOfUnits))
B.currentStation=object
elif entityClass=='Dream.SubBatch':
......@@ -1195,7 +1195,7 @@ def createWIP():
G.WipList.append(SB)
G.EntityList.append(SB)
object=Globals.findObjectById(element['id'])
SB.remainingProcessingTime=entity.get('remainingProcessingTime', {})
SB.unitsToProcess=int(entity.get('unitsToProcess', numberOfUnits))
SB.currentStation=object
if entityClass=='Dream.Order':
......
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