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
ab83067e
Commit
ab83067e
authored
Apr 11, 2014
by
Georgios Dagkakis
Committed by
Ioannis Papagiannopoulos
May 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrections. Now topology09 runs correctly. Check the TODO in Source
parent
06ec4e3a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
dream/simulation/CoreObject.py
dream/simulation/CoreObject.py
+1
-1
dream/simulation/Exit.py
dream/simulation/Exit.py
+1
-1
dream/simulation/Source.py
dream/simulation/Source.py
+7
-3
No files found.
dream/simulation/CoreObject.py
View file @
ab83067e
...
...
@@ -202,7 +202,7 @@ class CoreObject(Process):
#get the entity from the previous object and put it in front of the activeQ
activeObjectQueue
.
append
(
activeEntity
)
# if the giverObject is blocked then unBlock it
if
giverObject
.
exitIsAssigned
():
if
giverObject
.
exitIsAssigned
To
():
giverObject
.
unAssignExit
()
#append the time to schedule so that it can be read in the result
#remember that every entity has it's schedule which is supposed to be updated every time
...
...
dream/simulation/Exit.py
View file @
ab83067e
...
...
@@ -25,7 +25,7 @@ Created on 6 Feb 2013
models the exit of the model
'''
from
SimPy.Simulation
import
now
,
Process
,
Resource
,
infinity
,
waituntil
from
SimPy.Simulation
import
now
,
Process
,
Resource
,
infinity
,
waituntil
,
waitevent
import
xlwt
from
CoreObject
import
CoreObject
...
...
dream/simulation/Source.py
View file @
ab83067e
...
...
@@ -26,7 +26,7 @@ Created on 8 Nov 2012
models the source object that generates the entities
'''
from
SimPy.Simulation
import
now
,
Process
,
Resource
,
infinity
,
hold
,
SimEvent
,
activate
from
SimPy.Simulation
import
now
,
Process
,
Resource
,
infinity
,
hold
,
SimEvent
,
activate
,
waitevent
from
RandomNumberGenerator
import
RandomNumberGenerator
from
CoreObject
import
CoreObject
from
Globals
import
G
...
...
@@ -67,7 +67,7 @@ class EntityGenerator(Process):
self
.
victim
.
numberOfArrivals
+=
1
# we have one new arrival
G
.
numberOfEntities
+=
1
yield
hold
,
self
,
self
.
victim
.
calculateInterarrivalTime
()
# wait until the next arrival
self
.
victim
.
entityCreated
.
signal
(
str
(
entity
.
id
)
+
' created'
)
self
.
victim
.
entityCreated
.
signal
(
str
(
entity
.
name
)
+
' created'
)
#============================================================================
# The Source object is a Process
...
...
@@ -132,7 +132,11 @@ class Source(CoreObject):
yield
waitevent
,
self
,
self
.
canDispose
if
activeObject
.
signalReceiver
():
break
# note, it needs to lose the control here.
# TODO Need to think
else
:
yield
hold
,
self
,
0
#============================================================================
# sets the routing out element for the Source
#============================================================================
...
...
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