Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
b694b06d
Commit
b694b06d
authored
Mar 05, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temporary comments added to OperatorRouter
parent
9d52e330
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
dream/simulation/OperatorRouter.py
dream/simulation/OperatorRouter.py
+22
-6
No files found.
dream/simulation/OperatorRouter.py
View file @
b694b06d
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment