Commit 4947a2ef authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

cherry-pick from readWIPseperatelly. attributes added to Entity, Mould,...

cherry-pick from readWIPseperatelly. attributes added to Entity, Mould, OrderComponent, Order, OrderDesing, and CoreObject relative to printRoute method
parent aac07003
...@@ -55,6 +55,9 @@ class CoreObject(object): ...@@ -55,6 +55,9 @@ class CoreObject(object):
self.gatherWipStat=False self.gatherWipStat=False
# flag used to signal that the station waits for removeEntity event # flag used to signal that the station waits for removeEntity event
self.waitEntityRemoval=False self.waitEntityRemoval=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
...@@ -140,6 +143,9 @@ class CoreObject(object): ...@@ -140,6 +143,9 @@ class CoreObject(object):
self.entityRemoved=self.env.event() self.entityRemoved=self.env.event()
# flag used to signal that the station waits for removeEntity event # flag used to signal that the station waits for removeEntity event
self.waitEntityRemoval=False self.waitEntityRemoval=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
# ======================================================================= # =======================================================================
# the main process of the core object # the main process of the core object
......
...@@ -66,6 +66,8 @@ class Entity(object): ...@@ -66,6 +66,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
...@@ -78,3 +80,10 @@ class Entity(object): ...@@ -78,3 +80,10 @@ class Entity(object):
# ======================================================================= # =======================================================================
def initialize(self): def initialize(self):
pass pass
#===========================================================================
# 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
...@@ -57,6 +57,8 @@ class Order(Job): ...@@ -57,6 +57,8 @@ class Order(Job):
self.basicsEnded=basicsEnded # flag that informs that the basic components of the order are finished self.basicsEnded=basicsEnded # flag that informs that the basic components of the order are finished
# flag that informs weather the components needed for the assembly are present in the Assembly Buffer # flag that informs weather the components needed for the assembly are present in the Assembly Buffer
self.componentsReadyForAssembly = componentsReadyForAssembly self.componentsReadyForAssembly = componentsReadyForAssembly
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