variables added to Entity and Operator for use by OperatorRouter

parent 82cbad0c
...@@ -51,7 +51,7 @@ class Entity(object): ...@@ -51,7 +51,7 @@ class Entity(object):
self.schedule=[] self.schedule=[]
self.currentStation=None self.currentStation=None
# values to be used in the internal processing of compoundObjects # values to be used in the internal processing of compoundObjects
self.internal = False # informs if the entity is being processed internally self.internal = False # informs if the entity is being processed internally
self.isCritical=isCritical # flag to inform weather the entity is critical -> preemption self.isCritical=isCritical # flag to inform weather the entity is critical -> preemption
self.manager=None # default value self.manager=None # default value
self.numberOfUnits=1 # default value self.numberOfUnits=1 # default value
...@@ -61,6 +61,11 @@ class Entity(object): ...@@ -61,6 +61,11 @@ class Entity(object):
# variable used to differentiate entities with and entities without routes # variable used to differentiate entities with and entities without routes
self.family='Entity' self.family='Entity'
# variables to be used by OperatorRouter
self.canProceed=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.candidateReceiver=None # the station that is finaly chosen to receive the entity
# ======================================================================= # =======================================================================
# outputs results to JSON File # outputs results to JSON File
# ======================================================================= # =======================================================================
......
...@@ -59,6 +59,10 @@ class Operator(Repairman): # XXX isn't it the other way around ? ...@@ -59,6 +59,10 @@ class Operator(Repairman): # XXX isn't it the other way around ?
(scheduling_rule, id)) (scheduling_rule, id))
# the station that the operator is assigned to # the station that the operator is assigned to
self.operatorAssignedTo=None self.operatorAssignedTo=None
# variables to be used by OperatorRouter
self.candidateEntities=[] # list of the entities requesting the operator at a certain simulation Time
self.candidateEntity=None # the entity that will be chosen for processing
# ======================================================================= # =======================================================================
# sorts the candidateEntities of the Operator according to the scheduling rule # sorts the candidateEntities of the Operator according to the scheduling rule
......
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