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
3ab6f90b
Commit
3ab6f90b
authored
Feb 19, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
method activeQueueIsEmpty() added to coreObject to be used as filter for a yield waituntil
parent
37262fc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+10
-0
No files found.
dream/simulation/CoreObject.py
View file @
3ab6f90b
...
...
@@ -207,6 +207,8 @@ class CoreObject(Process):
self
.
receiver
.
timeLastEntityEnded
=
now
()
#required to count blockage correctly in the preemptied station
self
.
outputTrace
(
activeEntity
.
name
,
"got into "
+
self
.
objName
)
# # TESTING
# print now(), self.id, 'just received', activeEntity.id
return
activeEntity
# =======================================================================
...
...
@@ -408,3 +410,11 @@ class CoreObject(Process):
def
checkIfActive
(
self
):
return
self
.
Up
and
self
.
onShift
#===========================================================================
# filter that returns True if the activeObject Queue is empty and
# false if object holds entities in its queue
#===========================================================================
def
activeQueueIsEmpty
(
self
):
# # TESTING
# print now(), self.id, 'has its queue empty?', len(self.Res.activeQ)
return
len
(
self
.
Res
.
activeQ
)
==
0
\ No newline at end of file
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