minor clean-up

parent df1fff32
...@@ -360,25 +360,25 @@ class Router(ObjectInterruption): ...@@ -360,25 +360,25 @@ class Router(ObjectInterruption):
# if there are pendingEntities # if there are pendingEntities
if self.pendingObjects: if self.pendingObjects:
# for each pendingObject # for each pendingObject
for object in self.pendingObjects: # for each pendingMachine
# if it is a machine for object in self.pendingMachines:
if object in self.pendingMachines: # if object in self.pendingMachines:
# find an available operator # find an available operator
candidateOperator=object.operatorPool.findAvailableOperator() candidateOperator=object.operatorPool.findAvailableOperator()
# TODO: this way no sorting is performed # TODO: this way no sorting is performed
if not candidateOperator in self.candidateOperators:
self.candidateOperators.append(candidateOperator)
# for each operator append the station into its candidateStations
candidateOperator.candidateStations.append(object)
# for each pendingQueue
for object in self.pendingQueues:
# elif object in self.pendingQueues:
# find available operator for then machines that follow
for nextobject in object.findReceivers():
candidateOperator=nextobject.operatorPool.findAvailableOperator()
if not candidateOperator in self.candidateOperators: if not candidateOperator in self.candidateOperators:
self.candidateOperators.append(candidateOperator) self.candidateOperators.append(candidateOperator)
# for each operator append the station into its candidateStations candidateOperator.candidateStations.append(nextobject)
candidateOperator.candidateStations.append(object)
# if it is a queue
elif object in self.pendingQueues:
# find available operator for then machines that follow
for nextobject in object.next:
if nextobject.canAccept(object):
candidateOperator=nextobject.operatorPool.findAvailableOperator()
if not candidateOperator in self.candidateOperators:
self.candidateOperators.append(candidateOperator)
candidateOperator.candidateStations.append(nextobject)
# update the schedulingRule/multipleCriterionList of the Router # update the schedulingRule/multipleCriterionList of the Router
if self.sorting: if self.sorting:
self.updateSchedulingRule() self.updateSchedulingRule()
......
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