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
f17455f5
Commit
f17455f5
authored
Oct 21, 2015
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wait for elements to move before deciding if buffer has space
parent
0aee6d25
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
dream/simulation/Examples/OperationalFailures.py
dream/simulation/Examples/OperationalFailures.py
+5
-3
No files found.
dream/simulation/Examples/OperationalFailures.py
View file @
f17455f5
...
@@ -17,7 +17,7 @@ f=0.2
...
@@ -17,7 +17,7 @@ f=0.2
maxSimTime
=
1000
maxSimTime
=
1000
# the capacity of B123
# the capacity of B123
capacity
=
45
# float('inf')
capacity
=
3
# float('inf')
class
OpQueue
(
Queue
):
class
OpQueue
(
Queue
):
# allow to be locked between the time periods
# allow to be locked between the time periods
...
@@ -115,6 +115,7 @@ def controllerMethod():
...
@@ -115,6 +115,7 @@ def controllerMethod():
E
.
locked
=
False
E
.
locked
=
False
if
len
(
M3
.
getActiveObjectQueue
())
and
(
not
M3
.
state
==
0
):
if
len
(
M3
.
getActiveObjectQueue
())
and
(
not
M3
.
state
==
0
):
Controller
.
sendSignal
(
sender
=
M3
,
receiver
=
E
,
signal
=
E
.
isRequested
)
Controller
.
sendSignal
(
sender
=
M3
,
receiver
=
E
,
signal
=
E
.
isRequested
)
while
len
(
M3
.
getActiveObjectQueue
()):
yield
G
.
env
.
timeout
(
0
)
yield
G
.
env
.
timeout
(
0
)
E
.
locked
=
True
E
.
locked
=
True
...
@@ -122,6 +123,7 @@ def controllerMethod():
...
@@ -122,6 +123,7 @@ def controllerMethod():
M3
.
locked
=
False
M3
.
locked
=
False
if
len
(
B123
.
getActiveObjectQueue
())
and
(
not
M3
.
state
==
0
):
if
len
(
B123
.
getActiveObjectQueue
())
and
(
not
M3
.
state
==
0
):
Controller
.
sendSignal
(
sender
=
B123
,
receiver
=
M3
,
signal
=
M3
.
isRequested
)
Controller
.
sendSignal
(
sender
=
B123
,
receiver
=
M3
,
signal
=
M3
.
isRequested
)
while
not
len
(
M3
.
getActiveObjectQueue
()):
yield
G
.
env
.
timeout
(
0
)
yield
G
.
env
.
timeout
(
0
)
M3
.
locked
=
True
M3
.
locked
=
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