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
612e2ac7
Commit
612e2ac7
authored
Nov 12, 2013
by
Georgios Dagkakis
Committed by
Jérome Perrin
Dec 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modification in Source so that the trace is outputted correctly in Entity generation
parent
be7298d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
dream/simulation/Source.py
dream/simulation/Source.py
+3
-3
No files found.
dream/simulation/Source.py
View file @
612e2ac7
...
...
@@ -106,14 +106,14 @@ class Source(CoreObject):
while
1
:
entity
=
self
.
createEntity
()
# create the Entity object and assign its name
self
.
numberOfArrivals
+=
1
# we have one new arrival
G
.
numberOfEntities
+=
1
entity
.
creationTime
=
now
()
# assign the current simulation time as the Entity's creation time
entity
.
startTime
=
now
()
# assign the current simulation time as the Entity's start time
entity
.
currentStation
=
self
# update the current station of the Entity
self
.
outputTrace
(
self
.
item
.
type
+
\
str
(
self
.
numberOfArrivals
))
# output the trace
activeObjectQueue
.
append
(
entity
)
# append the entity to the resource
activeObjectQueue
.
append
(
entity
)
# append the entity to the resource
self
.
numberOfArrivals
+=
1
# we have one new arrival
G
.
numberOfEntities
+=
1
yield
hold
,
self
,
self
.
calculateInterarrivalTime
()
# wait until the next arrival
#============================================================================
# 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