Commit 1e71a986 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

remainingSetupUp time introduced to Entity

parent 9b6ee605
......@@ -36,7 +36,7 @@ class Entity(ManPyObject):
type="Entity"
def __init__(self, id=None, name=None, priority=0, dueDate=0, orderDate=0,
isCritical=False, remainingProcessingTime=0,currentStation=None,**kw):
isCritical=False, remainingProcessingTime=0,remainingSetupTime=0,currentStation=None,**kw):
ManPyObject.__init__(self,id,name)
# information on the object holding the entity
# initialized as None and updated every time an entity enters a new object
......@@ -54,6 +54,7 @@ class Entity(ManPyObject):
# a list that holds information about the schedule
# of the entity (when it enters and exits every station)
self.schedule=[]
# the current station of the entity
self.currentStation=currentStation
# values to be used in the internal processing of compoundObjects
self.internal = False # informs if the entity is being processed internally
......@@ -75,7 +76,7 @@ class Entity(ManPyObject):
# alias used for printing the Route
self.alias=None
self.remainingProcessingTime=remainingProcessingTime
# the current station of the entity
self.remainingSetupTime=remainingSetupTime
#===========================================================================
# return the responsible operator for the current step, not implemented for entities
......
......@@ -37,8 +37,9 @@ class Job(Entity): # inherits from the Entity c
family='Job'
def __init__(self, id=None, name=None, route=[], priority=0, dueDate=0, orderDate=0,
extraPropertyDict=None,currentStation=None, isCritical=False,**kw):
extraPropertyDict=None,remainingProcessingTime={}, remainingSetupTime={}, currentStation=None, isCritical=False,**kw):
Entity.__init__(self, id=id,name=name, priority=priority, dueDate=dueDate,
remainingProcessingTime=remainingProcessingTime, remainingSetupTime=remainingSetupTime,
currentStation=currentStation, orderDate=orderDate, isCritical=isCritical)
# instance specific attributes
# information on the routing and the stops of the entity
......
......@@ -391,6 +391,7 @@ def createWIP():
if entity['id']==componentDict['id']:
entityCurrentSeq=int(entity['sequence'])# the current seq number of the entity's route
entityRemainingProcessingTime=entity.get('remainingProcessingTime',{})
entityRemainingSetupTime=entity.get('remainingSetupTime',{})
ind=0 # holder of the route index corresponding to the entityCurrentSeq
solution=False # flag to signal that the route step is found
# find the step that corresponds to the entityCurrentSeq
......@@ -412,6 +413,7 @@ def createWIP():
entity['route']=entityRoute # and hold the new one without the previous steps
entity['order']=order.id
entity['remainingProcessingTime']=entityRemainingProcessingTime
entity['remainingSetupTime']=entityRemainingSetupTime
break
entityClass=entity.get('_class', 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