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
bc5fb8a0
Commit
bc5fb8a0
authored
Sep 09, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Nov 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CoreObject corrected
parent
2d4941fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+6
-8
No files found.
dream/simulation/CoreObject.py
View file @
bc5fb8a0
...
@@ -445,7 +445,7 @@ class CoreObject(ManPyObject):
...
@@ -445,7 +445,7 @@ class CoreObject(ManPyObject):
@
staticmethod
@
staticmethod
def
findReceiversFor
(
activeObject
):
def
findReceiversFor
(
activeObject
):
receivers
=
[]
receivers
=
[]
for
object
in
[
x
for
x
in
activeObject
.
next
if
x
.
canAccept
(
activeObject
)
and
not
x
.
isRequested
.
triggered
]:
for
object
in
[
x
for
x
in
activeObject
.
next
if
x
.
canAccept
(
activeObject
)
and
not
x
.
isRequested
.
triggered
and
x
.
expectedSignals
[
'isRequested'
]
]:
receivers
.
append
(
object
)
receivers
.
append
(
object
)
return
receivers
return
receivers
...
@@ -490,7 +490,6 @@ class CoreObject(ManPyObject):
...
@@ -490,7 +490,6 @@ class CoreObject(ManPyObject):
self
.
printTrace
(
self
.
id
,
signalReceiver
=
self
.
receiver
.
id
)
self
.
printTrace
(
self
.
id
,
signalReceiver
=
self
.
receiver
.
id
)
# assign the entry of the receiver
# assign the entry of the receiver
self
.
receiver
.
assignEntryTo
()
self
.
receiver
.
assignEntryTo
()
if
self
.
receiver
.
expectedSignals
[
'isRequested'
]:
succeedTuple
=
(
self
,
self
.
env
.
now
)
succeedTuple
=
(
self
,
self
.
env
.
now
)
self
.
receiver
.
isRequested
.
succeed
(
succeedTuple
)
self
.
receiver
.
isRequested
.
succeed
(
succeedTuple
)
return
True
return
True
...
@@ -528,7 +527,7 @@ class CoreObject(ManPyObject):
...
@@ -528,7 +527,7 @@ class CoreObject(ManPyObject):
@
staticmethod
@
staticmethod
def
findGiversFor
(
activeObject
):
def
findGiversFor
(
activeObject
):
givers
=
[]
givers
=
[]
for
object
in
[
x
for
x
in
activeObject
.
previous
if
(
not
x
is
activeObject
)
and
not
x
.
canDispose
.
triggered
]:
for
object
in
[
x
for
x
in
activeObject
.
previous
if
(
not
x
is
activeObject
)
and
not
x
.
canDispose
.
triggered
and
x
.
expectedSignals
[
'canDispose'
]
]:
if
object
.
haveToDispose
(
activeObject
):
if
object
.
haveToDispose
(
activeObject
):
givers
.
append
(
object
)
givers
.
append
(
object
)
return
givers
return
givers
...
@@ -564,7 +563,6 @@ class CoreObject(ManPyObject):
...
@@ -564,7 +563,6 @@ class CoreObject(ManPyObject):
self
.
giver
.
receiver
=
self
self
.
giver
.
receiver
=
self
if
self
.
giver
.
expectedSignals
[
'canDispose'
]:
if
self
.
giver
.
expectedSignals
[
'canDispose'
]:
self
.
printTrace
(
self
.
id
,
signalGiver
=
self
.
giver
.
id
)
self
.
printTrace
(
self
.
id
,
signalGiver
=
self
.
giver
.
id
)
if
self
.
giver
.
expectedSignals
[
'canDispose'
]:
succeedTuple
=
(
self
,
self
.
env
.
now
)
succeedTuple
=
(
self
,
self
.
env
.
now
)
self
.
giver
.
canDispose
.
succeed
(
succeedTuple
)
self
.
giver
.
canDispose
.
succeed
(
succeedTuple
)
return
True
return
True
...
...
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