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