currentStep attribute added to job

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