temporary comments added to OperatorRouter

parent 9d52e330
...@@ -74,8 +74,8 @@ class Router(ObjectInterruption): ...@@ -74,8 +74,8 @@ class Router(ObjectInterruption):
#=================================================================== #===================================================================
# # TESTING # # TESTING
# print ' the pending objects are' # print ' the pending objects are'
# for entity in self.pendingObjects: # for object in self.pendingObjects:
# print ' ', entity.id # print ' ', object.id
#=================================================================== #===================================================================
# update the called operators list # update the called operators list
...@@ -87,7 +87,7 @@ class Router(ObjectInterruption): ...@@ -87,7 +87,7 @@ class Router(ObjectInterruption):
# print ' the called operators are' # print ' the called operators are'
# for operator in self.calledOperators: # for operator in self.calledOperators:
# print ' ', operator.id # print ' ', operator.id
# #=================================================================== #===================================================================
# for all the called operators find those available # for all the called operators find those available
# sort the objects for each one of them # sort the objects for each one of them
...@@ -124,11 +124,27 @@ class Router(ObjectInterruption): ...@@ -124,11 +124,27 @@ class Router(ObjectInterruption):
# and if the priorityObject is indeed pending # and if the priorityObject is indeed pending
if priorityObject in self.pendingObjects: if priorityObject in self.pendingObjects:
# assign an operator to it
# # find the giver of the priorityObject, assign its exit
# # update the operators list of its operatorPool
# # read its load time (readLoadTime)
# # and identify the entity to get
# # if the priorityObject has entities to get
# if priorityObject.entitiesToGet:
# # if the entitiesToGet have a defined manager
# if priorityObject.entitiesToGet[0].manager:
# priorityObject.giver.assignExit()
# print ' ',priorityObject.giver.exitIsAssigned()
# priorityObject.entityToGet=priorityObject.giver.getActiveObjectQueue()[0]
# print ' ',priorityObject.entityToGet.id
# priorityObject.operatorPool.operators=[priorityObject.giver.getActiveObjectQueue()[0].manager]
# priorityObject.readLoadTime()
# assign an operator to the priorityObject
operator.operatorAssignedTo=priorityObject operator.operatorAssignedTo=priorityObject
#======================================================= #=======================================================
# # TESTING # TESTING
# print now(), operator.objName, 'got assigned to', priorityObject.id print now(), operator.objName, 'got assigned to', priorityObject.id
#======================================================= #=======================================================
# and let it proceed withGetEntity # and let it proceed withGetEntity
......
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