Commit aebe2c89 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Georgios Dagkakis

further clean-up in Operator and OperatorRouterManaged

parent b81ab065
......@@ -130,7 +130,7 @@ class Operator(ObjectResource):
if candidateMachines:
# choose the one that waits the most time and give it the chance to grasp the resource
for machine in candidateMachines:
machine.critical=False
# machine.critical=False
if machine.broker.waitForOperator:
machine.timeWaiting=self.env.now-machine.broker.timeWaitForOperatorStarted
else:
......
......@@ -108,9 +108,15 @@ class RouterManaged(Router):
# exit actions
self.exitActions()
#===========================================================================
# entry actions on Router call
#===========================================================================
def entryActions(self):
pass
#===========================================================================
# routine to allocate the operators to the stations
#===========================================================================
def allocateOperators(self):
# find the pending objects
self.findPendingObjects()
......@@ -124,6 +130,9 @@ class RouterManaged(Router):
# entities that are already in stations have already a receiver
self.findCandidateReceivers()
#===========================================================================
# un-assign the exit of the objects that are not to be signalled
#===========================================================================
def unAssignExits(self):
for operator in [x for x in self.candidateOperators if x.isAssignedTo()]:
if not operator.isAssignedTo() in self.pendingObjects:
......@@ -136,7 +145,7 @@ class RouterManaged(Router):
object.unAssignExit()
# =======================================================================
# return control to the Machine.run
# Exit actions return control to the Machine.run
# =======================================================================
def exitActions(self):
# reset the candidateEntities of the operators
......
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