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
37d4047e
Commit
37d4047e
authored
Oct 17, 2014
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SingleServer Example updated to have a buffer
parent
ce794484
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
ManPy_documentation.doc
ManPy_documentation.doc
+0
-0
ManPy_documentation.pdf
ManPy_documentation.pdf
+0
-0
dream/simulation/Examples/SingleServer.py
dream/simulation/Examples/SingleServer.py
+6
-4
No files found.
ManPy_documentation.doc
View file @
37d4047e
No preview for this file type
ManPy_documentation.pdf
View file @
37d4047e
No preview for this file type
dream/simulation/Examples/SingleServer.py
View file @
37d4047e
from
dream.simulation.imports
import
Machine
,
Source
,
Exit
,
Par
t
from
dream.simulation.imports
import
Source
,
Queue
,
Machine
,
Exi
t
from
dream.simulation.Globals
import
runSimulation
#define the objects of the model
S
=
Source
(
'S1'
,
'Source'
,
interarrivalTime
=
{
'distributionType'
:
'Fixed'
,
'mean'
:
0.5
},
entity
=
'Dream.Part'
)
Q
=
Queue
(
'Q1'
,
'Queue'
,
capacity
=
1
)
M
=
Machine
(
'M1'
,
'Machine'
,
processingTime
=
{
'distributionType'
:
'Fixed'
,
'mean'
:
0.25
})
E
=
Exit
(
'E1'
,
'Exit'
)
#define predecessors and successors for the objects
S
.
defineRouting
(
successorList
=
[
M
])
M
.
defineRouting
(
predecessorList
=
[
S
],
successorList
=
[
E
])
S
.
defineRouting
(
successorList
=
[
Q
])
Q
.
defineRouting
(
predecessorList
=
[
S
],
successorList
=
[
M
])
M
.
defineRouting
(
predecessorList
=
[
Q
],
successorList
=
[
E
])
E
.
defineRouting
(
predecessorList
=
[
M
])
def
main
(
test
=
0
):
# add all the objects in a list
objectList
=
[
S
,
M
,
E
]
objectList
=
[
S
,
Q
,
M
,
E
]
# set the length of the experiment
maxSimTime
=
1440.0
# call the runSimulation giving the objects and the length of the experiment
...
...
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