currentStep attribute added to job

parent c4b1e2d1
...@@ -70,6 +70,8 @@ class Job(Entity): # inherits from the Entity c ...@@ -70,6 +70,8 @@ class Job(Entity): # inherits from the Entity c
# initialProcessingType=initialProcessing.get('operationType',0) # initialProcessingType=initialProcessing.get('operationType',0)
self.initialOperationTypes={"Setup":initialSetupType, self.initialOperationTypes={"Setup":initialSetupType,
"Processing":initialProcessingType} "Processing":initialProcessingType}
# the current step of the job
self.currentStep = None
# ======================================================================= # =======================================================================
# outputs results to JSON File # outputs results to JSON File
...@@ -126,6 +128,8 @@ class Job(Entity): # inherits from the Entity c ...@@ -126,6 +128,8 @@ class Job(Entity): # inherits from the Entity c
# initializes all the Entity for a new simulation replication # initializes all the Entity for a new simulation replication
# ======================================================================= # =======================================================================
def initialize(self): def initialize(self):
# reset the currentStep
self.currentStep = None
currentStationWellDefined=False currentStationWellDefined=False
# if the currentStation is defined and the route is given in the BOM # if the currentStation is defined and the route is given in the BOM
if self.currentStation and self.routeInBOM: if self.currentStation and self.routeInBOM:
......
...@@ -65,7 +65,7 @@ class MachineJobShop(Machine): ...@@ -65,7 +65,7 @@ class MachineJobShop(Machine):
taskId = activeEntity.remainingRoute[0].get("task_id", None) taskId = activeEntity.remainingRoute[0].get("task_id", None)
if taskId: if taskId:
self.currentOperator.schedule[-1]["task_id"] = taskId self.currentOperator.schedule[-1]["task_id"] = taskId
removedStep = activeEntity.remainingRoute.pop(0) #remove data from the remaining route of the entity activeEntity.currentStep = activeEntity.remainingRoute.pop(0) #remove data from the remaining route of the entity
return activeEntity return activeEntity
#=========================================================================== #===========================================================================
......
...@@ -105,7 +105,7 @@ class QueueJobShop(Queue): ...@@ -105,7 +105,7 @@ class QueueJobShop(Queue):
# ======================================================================= # =======================================================================
def getEntity(self): def getEntity(self):
activeEntity=Queue.getEntity(self) activeEntity=Queue.getEntity(self)
activeEntity.remainingRoute.pop(0) #remove data from the remaining route of the entity activeEntity.currentStep = activeEntity.remainingRoute.pop(0) #remove data from the remaining route of the entity
return activeEntity return activeEntity
#=========================================================================== #===========================================================================
......
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