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
f1d38927
Commit
f1d38927
authored
May 27, 2014
by
Ioannis Papagiannopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
infinity issue corrected
parent
92e68215
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
dream/simulation/Exit.py
dream/simulation/Exit.py
+1
-1
dream/simulation/LineGenerationJSON.py
dream/simulation/LineGenerationJSON.py
+2
-2
dream/simulation/Source.py
dream/simulation/Source.py
+1
-1
No files found.
dream/simulation/Exit.py
View file @
f1d38927
...
...
@@ -55,7 +55,7 @@ class Exit(CoreObject):
CoreObject
.
initialize
(
self
)
# initialize the internal Queue (type Resource) of the Exit
self
.
Res
=
simpy
.
Resource
(
self
.
env
,
capacity
=
10000
)
self
.
Res
=
simpy
.
Resource
(
self
.
env
,
capacity
=
float
(
'inf'
)
)
# The number of resource that exited through this exit.
# XXX bug: cannot output as json when nothing has exited.
self
.
numOfExits
=
0
...
...
dream/simulation/LineGenerationJSON.py
View file @
f1d38927
...
...
@@ -801,7 +801,7 @@ def createObjects():
stop
=
float
(
element
.
get
(
'stop'
)
or
-
1
)
# infinity (had to be done to make it as float)
if
stop
<
0
:
stop
=
infinity
stop
=
float
(
'inf'
)
interval
=
float
(
element
.
get
(
'interval'
)
or
1
)
duration
=
float
(
element
.
get
(
'duration'
)
or
0
)
method
=
(
element
.
get
(
'method'
,
None
))
# get the method to be run / default None
...
...
@@ -1286,7 +1286,7 @@ def main(argv=[], input_data=None):
# if the simulation is ran until no more events are scheduled,
# then we have to find the end time as the time the last entity ended.
if
G
.
maxSimTime
==-
1
:
G
.
env
.
run
(
until
=
infinity
)
G
.
env
.
run
(
until
=
float
(
'inf'
)
)
# simulate(until=infinity) # simulate until there are no more events.
# # If someone does it for a model that has always events, then it will run forever!
# # identify from the exits what is the time that the last entity has ended.
...
...
dream/simulation/Source.py
View file @
f1d38927
...
...
@@ -122,7 +122,7 @@ class Source(CoreObject):
# initialize the internal Queue (type Resource) of the Source
# self.Res=Resource(capacity=infinity)
self
.
Res
=
simpy
.
Resource
(
self
.
env
,
capacity
=
10000
)
self
.
Res
=
simpy
.
Resource
(
self
.
env
,
capacity
=
float
(
'inf'
)
)
self
.
Res
.
users
=
[]
# self.Res.waitQ=[]
self
.
numberOfArrivals
=
0
...
...
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