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
6ddc0faa
Commit
6ddc0faa
authored
Sep 09, 2014
by
Ioannis Papagiannopoulos
Committed by
Georgios Dagkakis
Nov 03, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setWIP updated to use expectedSignals
parent
5a8adb90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
dream/simulation/Globals.py
dream/simulation/Globals.py
+6
-4
No files found.
dream/simulation/Globals.py
View file @
6ddc0faa
...
@@ -280,8 +280,9 @@ def setWIP(entityList):
...
@@ -280,8 +280,9 @@ def setWIP(entityList):
if
issubclass
(
entity
.
currentStation
.
__class__
,
Queue
):
if
issubclass
(
entity
.
currentStation
.
__class__
,
Queue
):
# send the signal only if it is not already triggered
# send the signal only if it is not already triggered
if
not
entity
.
currentStation
.
canDispose
.
triggered
:
if
not
entity
.
currentStation
.
canDispose
.
triggered
:
succeedTuple
=
(
G
.
env
,
G
.
env
.
now
)
if
entity
.
currentStation
.
expectedSignals
[
'canDispose'
]:
entity
.
currentStation
.
canDispose
.
succeed
(
succeedTuple
)
succeedTuple
=
(
G
.
env
,
G
.
env
.
now
)
entity
.
currentStation
.
canDispose
.
succeed
(
succeedTuple
)
# if we are in the start of the simulation the object is of server type then we should send initialWIP signal
# if we are in the start of the simulation the object is of server type then we should send initialWIP signal
# TODO, maybe use 'class_family attribute here'
# TODO, maybe use 'class_family attribute here'
if
G
.
env
.
now
==
0
and
entity
.
currentStation
:
if
G
.
env
.
now
==
0
and
entity
.
currentStation
:
...
@@ -292,8 +293,9 @@ def setWIP(entityList):
...
@@ -292,8 +293,9 @@ def setWIP(entityList):
# trigger initialWIP event only if it has not been triggered. Otherwise
# trigger initialWIP event only if it has not been triggered. Otherwise
# if we set more than one entities (e.g. in reassembly) it will crash
# if we set more than one entities (e.g. in reassembly) it will crash
if
not
(
entity
.
currentStation
.
initialWIP
.
triggered
):
if
not
(
entity
.
currentStation
.
initialWIP
.
triggered
):
succeedTuple
=
(
G
.
env
,
G
.
env
.
now
)
if
entity
.
currentStation
.
expectedSignals
[
'initialWIP'
]:
entity
.
currentStation
.
initialWIP
.
succeed
(
succeedTuple
)
succeedTuple
=
(
G
.
env
,
G
.
env
.
now
)
entity
.
currentStation
.
initialWIP
.
succeed
(
succeedTuple
)
def
countIntervalThroughput
():
def
countIntervalThroughput
():
...
...
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