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
363fd41b
Commit
363fd41b
authored
Apr 22, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CoreObject prin comments added
parent
699be5b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+5
-1
No files found.
dream/simulation/CoreObject.py
View file @
363fd41b
...
@@ -323,9 +323,10 @@ class CoreObject(Process):
...
@@ -323,9 +323,10 @@ class CoreObject(Process):
possibleReceivers
=
[]
possibleReceivers
=
[]
for
object
in
[
x
for
x
in
self
.
next
if
x
.
canAccept
(
activeObject
)]:
for
object
in
[
x
for
x
in
self
.
next
if
x
.
canAccept
(
activeObject
)]:
possibleReceivers
.
append
(
object
)
possibleReceivers
.
append
(
object
)
# print now(), self.id,'possibleReceivers',[str(x.id) for x in possibleReceivers]
if
possibleReceivers
:
if
possibleReceivers
:
activeObject
.
receiver
=
activeObject
.
selectReceiver
(
possibleReceivers
)
activeObject
.
receiver
=
activeObject
.
selectReceiver
(
possibleReceivers
)
activeObject
.
receiver
.
giver
=
activeObject
activeObject
.
receiver
.
giver
=
activeObject
# perform the checks that canAcceptAndIsRequested used to perform and update activeCallersList or assignExit and operatorPool
# perform the checks that canAcceptAndIsRequested used to perform and update activeCallersList or assignExit and operatorPool
while
not
activeObject
.
receiver
.
canAcceptAndIsRequested
():
while
not
activeObject
.
receiver
.
canAcceptAndIsRequested
():
possibleReceivers
.
remove
(
activeObject
.
receiver
)
possibleReceivers
.
remove
(
activeObject
.
receiver
)
...
@@ -371,6 +372,7 @@ class CoreObject(Process):
...
@@ -371,6 +372,7 @@ class CoreObject(Process):
for
object
in
[
x
for
x
in
activeObject
.
previous
if
(
not
x
is
activeObject
)]:
for
object
in
[
x
for
x
in
activeObject
.
previous
if
(
not
x
is
activeObject
)]:
if
object
.
haveToDispose
(
activeObject
):
if
object
.
haveToDispose
(
activeObject
):
possibleGivers
.
append
(
object
)
possibleGivers
.
append
(
object
)
# print 'possibleGivers:', [str(x.id) for x in possibleGivers]
if
possibleGivers
:
if
possibleGivers
:
activeObject
.
giver
=
activeObject
.
selectGiver
(
possibleGivers
)
activeObject
.
giver
=
activeObject
.
selectGiver
(
possibleGivers
)
activeObject
.
giver
.
receiver
=
activeObject
activeObject
.
giver
.
receiver
=
activeObject
...
@@ -578,12 +580,14 @@ class CoreObject(Process):
...
@@ -578,12 +580,14 @@ class CoreObject(Process):
# assign Exit of the object
# assign Exit of the object
# =======================================================================
# =======================================================================
def
assignExitTo
(
self
):
def
assignExitTo
(
self
):
# print self.id, 'assignExit'
self
.
exitAssignedToReceiver
=
self
.
receiver
self
.
exitAssignedToReceiver
=
self
.
receiver
# =======================================================================
# =======================================================================
# unblock the object
# unblock the object
# =======================================================================
# =======================================================================
def
unAssignExit
(
self
):
def
unAssignExit
(
self
):
# print now(),self.id, 'unassignExit'
self
.
exitAssignedToReceiver
=
None
self
.
exitAssignedToReceiver
=
None
# =======================================================================
# =======================================================================
...
...
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