1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467
|
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
<title>simpylogo LIST OF MODELS using SimPy</title>
<meta name="authors" content="Tony Vignaux <Vignaux@users.sourceforge.net>, Klaus Muller <Muller@users.sourceforge.net>" />
<style type="text/css">
/*
:Author: David Goodger
:Contact: goodger@users.sourceforge.net
:Date: $Date$
:Revision: $Revision$
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin-left: 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left {
clear: left }
img.align-right {
clear: right }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font-family: serif ;
font-size: 100% }
pre.literal-block, pre.doctest-block {
margin-left: 2em ;
margin-right: 2em ;
background-color: #eeeeee }
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
tt.docutils {
background-color: #eeeeee }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="simpylogo-list-of-models-using-simpy">
<h1 class="title"><img alt="simpylogo" src="../SimPyDocs/_images/sm_SimPy_Logo.png" /> LIST OF MODELS using SimPy</h1>
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Authors:</th>
<td>Tony Vignaux <<a class="reference" href="mailto:Vignaux@users.sourceforge.net">Vignaux@users.sourceforge.net</a>>,
<br />Klaus Muller <<a class="reference" href="mailto:Muller@users.sourceforge.net">Muller@users.sourceforge.net</a>></td></tr>
<tr class="field"><th class="docinfo-name">SimPy version:</th><td class="field-body">2.0</td>
</tr>
<tr class="field"><th class="docinfo-name">Web-site:</th><td class="field-body"><a class="reference" href="http://simpy.sourceforge.net/">http://simpy.sourceforge.net/</a></td>
</tr>
<tr class="field"><th class="docinfo-name">Python-Version:</th><td class="field-body">2.3 or later (not 3.0)</td>
</tr>
</tbody>
</table>
<p>These models are examples of SimPy use written by several authors and
usually developed for other purposes, such as teaching and
consulting. They are in a variety of styles. Some have been converted
to the new script structure accepted by the SimPy users. These are
listed first.</p>
<p>Most models are given in two versions, one with the procedural SimPy API
and the other (identified by an "_OO" appended to the program name) with
the Object Oriented API introduced in SimPy 2.0.</p>
<div class="section">
<h1><a id="command-line-input-and-output" name="command-line-input-and-output">Command Line input and output</a></h1>
<div class="section">
<h2><a id="new-program-structure" name="new-program-structure">new program structure</a></h2>
<dl class="docutils">
<dt>MMC.py, MMC_OO.py</dt>
<dd>M/M/c (multiple server queue model. This demonstrates both the
multiple capacity Resource class and the observe method of the
Monitor class. Random arrivals, exponential
service-times. (TV)</dd>
<dt>bcc.py, bcc_OO.py</dt>
<dd>Determine the probability of rejection of random arrivals to a
2-server system with different service-time distributions. No
queues allowed, blocked customers are rejected
(BCC). Distributions are Erlang, exponential, and
hyperexponential. The theoretical probability is also
calculated. (TV)</dd>
<dt>callCenter.py, callCenter_OO.py</dt>
<dd>A call center with agents with different skills. The model
returns the frequency distribution of client waiting times,
the percentage of reneging clients, and the load on the
agents. This model demonstrates the use of yield get with a
filter function. (KGM)</dd>
<dt>cellphone.py, cellphone_OO.py</dt>
<dd>A cellphone cell with blocking (that is BCC discipline). The
program simulates the operation for 10 observation periods and
measures the mean and variance of the total time blockedr and
the number of times blocking occur in each hour. An
observational gap occurs between the observation periods to
make each one's measurement independent. (TV)</dd>
<dt>centralserver.py, centralserver_OO.py</dt>
<dd>A primitive central-server model with a single CPU and a
single disk. A fixed number of users send "tasks" to the
system which are processed and sent back to the user who then
thinks for a time before sending a task back. Service times
are exponential. This system can be solved analytically.
Trace statements have been removed. (TV)</dd>
<dt>jacksonnetwork.py, jacksonnetwork_OO.py</dt>
<dd>A Jackson network with 3 nodes, exponential service times and
probability switching. The simulation measures the delay for
jobs moving through the system. (TV)</dd>
</dl>
</div>
<div class="section">
<h2><a id="miscellaneous-models" name="miscellaneous-models">Miscellaneous Models</a></h2>
<dl class="docutils">
<dt>bank08renege.py, bank08renege_OO.py (partial conversion)</dt>
<dd>Use of reneging (compound <tt class="docutils literal"><span class="pre">yield</span> <span class="pre">request</span></tt>) based on <tt class="docutils literal"><span class="pre">bank08.py</span></tt>
of the tutorial TheBank. Customers leave if they lose patience
with waiting.</dd>
<dt>Carwash.py, Carwash_OO.py</dt>
<dd>Using a Store object for implementing master/slave cooperation
between processes. Scenario is a carwash installation with
multiple machines. Two model implementations are shown, one
with the carwash as master in the cooperation, and the other
with the car as master.</dd>
<dt>CellularAutomata.py</dt>
<dd>A two-dimensional cellular automaton. Does the game of
Life. (KGM)</dd>
<dt>demoSimPyEvents.py</dt>
<dd>Demo of the event signalling constructs introduced in SimPy
1.5. Three small simulations are included: Pavlov's drooling
dogs, an activity simulation where a job is completed after a
number of parallel activities, and the simulation of a
US-style 4-way stop intersection.</dd>
<dt>shortestPath_SimPy.py, shortestPath_SimPy_OO.py</dt>
<dd>A fun example of using SimPy for non-queuing work. It
simulates a searcher through a graph, seeking the shortest
path. (KGM)</dd>
<dt>Machineshop.py, Machineshop_OO.py</dt>
<dd>An example of the use of the <tt class="docutils literal"><span class="pre">interrupt()</span></tt> method. It
simulates a workshop with <tt class="docutils literal"><span class="pre">n</span></tt> machines which break down and one
or more repairmen which have to repair them. (KGM)</dd>
<dt>Market.py, Market_OO.py</dt>
<dd>A supermarket checkout with multiple counters and extended
Monitor objects. Written and analysed by David Mertz in an
article for developerWorks (). (MM)</dd>
</dl>
<p>Movie_renege.py, Movie_renege_OO.py</p>
<blockquote>
Use of reneging (compound <tt class="docutils literal"><span class="pre">yield</span> <span class="pre">request</span></tt>) constructs for
reneging at occurrence of an event. Scenario is a movie ticket
counter with a limited number of tickets for three movies.</blockquote>
<dl class="docutils">
<dt>needResources.py, needResources_OO.py</dt>
<dd>Demo of <tt class="docutils literal"><span class="pre">waitUntil</span></tt> capability introduced in SimPy 1.5. It
simulates three workers each requiring a set of tools to do
their jobs. Tools are shared, scarce resources for which they
compete.</dd>
<dt>SimPy_worker_extend.py, SimPy_worker_extend_OO.py</dt>
<dd>Factory making widgets with queues for machines. (MM)</dd>
<dt>WidgetPacking.py, WidgetPacking_OO.py</dt>
<dd>Using buffers for producer/consumer scenarios. Scenario is a
group of widget producing machines and a widget packer,
synchronized via a buffer. Two models are shown: the first
uses a Level for buffering non-distinguishable items
(widgets), and the second a Store for distinguishable items
(widgets of different weight).</dd>
</dl>
</div>
</div>
<div class="section">
<h1><a id="gui-input" name="gui-input">GUI Input</a></h1>
<dl class="docutils">
<dt>GUIdemo.py, GUIdemo_OO.py</dt>
<dd>A firework show.</dd>
<dt>bank11GUI.py, bank11GUI_OO.py</dt>
<dd>A modification of the bank11 simulation with GUI input.</dd>
<dt>SimGUIStep.py</dt>
<dd>A modification of the bank11 simulation with the ability to
step between events</dd>
</dl>
</div>
<div class="section">
<h1><a id="plot" name="plot">Plot</a></h1>
<dl class="docutils">
<dt>bakery.py, bakery_OO.py</dt>
<dd>A bakery with three ovens to answer the following questions:
a) What is the mean waiting time for retail and restaurant
buyers? b) What is their maximum waiting time? c) What
percentage of customer has to wait longer than 15 minutes?
This graphs the number of baguettes over time using
SimPy.SimPlot. (KGM)</dd>
<dt>bank11Plot.py</dt>
<dd>A Modification of the bank11 simulation with graphical
output. It plots service and waiting times</dd>
</dl>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Created:</th><td class="field-body">2002-December</td>
</tr>
<tr class="field"><th class="field-name">Date:</th><td class="field-body">$Date$</td>
</tr>
<tr class="field"><th class="field-name">Revision:</th><td class="field-body">$Revision$</td>
</tr>
</tbody>
</table>
<!-- Local Variables:
mode: rst
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
End: -->
</div>
</div>
</body>
</html>
|