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
601fb807
Commit
601fb807
authored
Dec 04, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
assignment of exit moved in CoreObject.signalReceiver
parent
f3fd097a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+2
-0
dream/simulation/Machine.py
dream/simulation/Machine.py
+4
-6
No files found.
dream/simulation/CoreObject.py
View file @
601fb807
...
...
@@ -496,6 +496,8 @@ class CoreObject(ManPyObject):
self
.
printTrace
(
self
.
id
,
signalReceiver
=
self
.
receiver
.
id
)
# assign the entry of the receiver
self
.
receiver
.
assignEntryTo
()
# assign the exit of the current object to the receiver
self
.
assignExitTo
(
self
.
receiver
)
if
self
.
receiver
.
expectedSignals
[
'isRequested'
]:
self
.
sendSignal
(
receiver
=
self
.
receiver
,
signal
=
self
.
receiver
.
isRequested
)
return
True
...
...
dream/simulation/Machine.py
View file @
601fb807
...
...
@@ -1010,9 +1010,8 @@ class Machine(CoreObject):
if
giverObject
.
haveToDispose
(
self
):
if
self
.
checkOperator
()
\
and
self
.
checkIfActive
()
and
len
(
activeObjectQueue
)
<
self
.
capacity
:
if
not
giverObject
.
exitIsAssignedTo
():
giverObject
.
assignExitTo
(
self
)
elif
giverObject
.
exitIsAssignedTo
()
!=
self
:
# if the exit of the object is already assigned somewhere else, return false
if
giverObject
.
exitIsAssignedTo
()
and
giverObject
.
exitIsAssignedTo
()
!=
self
:
return
False
return
True
else
:
...
...
@@ -1023,9 +1022,8 @@ class Machine(CoreObject):
# operation is assigned
if
self
.
checkIfActive
()
and
len
(
activeObjectQueue
)
<
self
.
capacity
\
and
giverObject
.
haveToDispose
(
self
):
if
not
giverObject
.
exitIsAssignedTo
():
giverObject
.
assignExitTo
(
self
)
elif
giverObject
.
exitIsAssignedTo
()
!=
self
:
# if the exit of the object is already assigned somewhere else, return false
if
giverObject
.
exitIsAssignedTo
()
and
giverObject
.
exitIsAssignedTo
()
!=
self
:
return
False
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