attributes added to Entity, Mould, OrderComponent, Order, OrderDesing, and...

attributes added to Entity, Mould, OrderComponent, Order, OrderDesing, and CoreObject relative to printRoute method
parent 0ce9bf46
...@@ -53,6 +53,9 @@ class CoreObject(object): ...@@ -53,6 +53,9 @@ class CoreObject(object):
self.resetOnPreemption=False self.resetOnPreemption=False
self.interruptCause=None self.interruptCause=None
self.gatherWipStat=False self.gatherWipStat=False
# attributes/indices used for printing the route, hold the cols corresponding to the machine (entities route and operators route)
self.station_col_inds=[]
self.op_col_indx=None
def initialize(self): def initialize(self):
from Globals import G from Globals import G
...@@ -136,6 +139,9 @@ class CoreObject(object): ...@@ -136,6 +139,9 @@ class CoreObject(object):
self.interruptionStart=self.env.event() self.interruptionStart=self.env.event()
self.interruptedBy=None self.interruptedBy=None
self.entityRemoved=self.env.event() self.entityRemoved=self.env.event()
# attributes/indices used for printing the route, hold the cols corresponding to the machine (entities route and operators route)
self.station_col_inds=[]
self.op_col_indx=None
# ======================================================================= # =======================================================================
......
...@@ -65,6 +65,8 @@ class Entity(object): ...@@ -65,6 +65,8 @@ class Entity(object):
self.proceed=False # boolean that is used to check weather the entity can proceed to the candidateReceiver self.proceed=False # boolean that is used to check weather the entity can proceed to the candidateReceiver
self.candidateReceivers=[] # list of candidateReceivers of the entity (those stations that can receive the entity self.candidateReceivers=[] # list of candidateReceivers of the entity (those stations that can receive the entity
self.candidateReceiver=None # the station that is finaly chosen to receive the entity self.candidateReceiver=None # the station that is finaly chosen to receive the entity
# alias used for printing the Route
self.alias=None
# ======================================================================= # =======================================================================
# outputs results to JSON File # outputs results to JSON File
...@@ -76,4 +78,11 @@ class Entity(object): ...@@ -76,4 +78,11 @@ class Entity(object):
# initializes all the Entity for a new simulation replication # initializes all the Entity for a new simulation replication
# ======================================================================= # =======================================================================
def initialize(self): def initialize(self):
pass pass
\ No newline at end of file
#===========================================================================
# print the route (the different stations the entity moved through)
#===========================================================================
def printRoute(self):
pass
\ No newline at end of file
...@@ -54,4 +54,7 @@ class Mould(Job): # inherits from the Job class ...@@ -54,4 +54,7 @@ class Mould(Job): # inherits from the Job class
# variable to be used by OperatorRouter # variable to be used by OperatorRouter
self.hot=False self.hot=False
# TODO: isCritical argument is deprecated # TODO: isCritical argument is deprecated
# self.isCritical=isCritical # this should be self.order.isCritical. Added now for testing # self.isCritical=isCritical # this should be self.order.isCritical. Added now for testing
\ No newline at end of file # used by printRoute
if self.order:
self.alias=self.order.alias+'C'+str(len(G.OrderComponentList))
\ No newline at end of file
...@@ -34,6 +34,8 @@ class ObjectResource(object): ...@@ -34,6 +34,8 @@ class ObjectResource(object):
def __init__(self): def __init__(self):
self.initialized = False self.initialized = False
# alias used for printing the trace
self.alias=None
def initialize(self): def initialize(self):
from Globals import G from Globals import G
...@@ -97,3 +99,8 @@ class ObjectResource(object): ...@@ -97,3 +99,8 @@ class ObjectResource(object):
def isInitialized(self): def isInitialized(self):
return self.initialized return self.initialized
#===========================================================================
# print the route (the different stations the resource was occupied by)
#===========================================================================
def printRoute(self):
pass
...@@ -59,6 +59,6 @@ class Order(Job): ...@@ -59,6 +59,6 @@ class Order(Job):
self.componentsReadyForAssembly = componentsReadyForAssembly self.componentsReadyForAssembly = componentsReadyForAssembly
self.decomposed=False self.decomposed=False
# used by printRoute
self.alias='O'+str(len(G.OrderList))
...@@ -63,4 +63,7 @@ class OrderComponent(Job): # inherits from the ...@@ -63,4 +63,7 @@ class OrderComponent(Job): # inherits from the
self.requestingComponent = requestingComponent # the id of the requesting component self.requestingComponent = requestingComponent # the id of the requesting component
self.readyForAssembly = readyForAssembly # flag informing weather the component was received self.readyForAssembly = readyForAssembly # flag informing weather the component was received
# by the MouldAssembleBuffer # by the MouldAssembleBuffer
# used by printRoute
if self.order:
self.alias=self.order.alias+'C'+str(len(G.OrderComponentList))
\ No newline at end of file
...@@ -55,4 +55,7 @@ class OrderDesign(Job): # inherits from the Job ...@@ -55,4 +55,7 @@ class OrderDesign(Job): # inherits from the Job
# if the componentType of the component is Auxiliary then there need a requesting Component be defined # if the componentType of the component is Auxiliary then there need a requesting Component be defined
# the requestingComponent is the component that needs the auxiliary component during its processing # the requestingComponent is the component that needs the auxiliary component during its processing
# the auxiliary component should then be added to the requestingComponent's auxiliaryList # the auxiliary component should then be added to the requestingComponent's auxiliaryList
self.requestingComponent = requestingComponent # the id of the requesting component self.requestingComponent = requestingComponent # the id of the requesting component
\ No newline at end of file # used by printRoute
if self.order:
self.alias=self.order.alias+'C'+str(len(G.OrderComponentList))
\ No newline at end of file
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