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
|
==========================================
|simpylogo| LIST OF MODELS using SimPy
==========================================
:Authors: - Tony Vignaux <Vignaux@users.sourceforge.net>,
- Klaus Muller <Muller@users.sourceforge.net>
:SimPy version: 2.0
:Web-site: http://simpy.sourceforge.net/
:Python-Version: 2.3 or later (not 3.0)
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.
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.
Command Line input and output
------------------------------
new program structure
+++++++++++++++++++++++++
MMC.py, MMC_OO.py
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)
bcc.py, bcc_OO.py
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)
callCenter.py, callCenter_OO.py
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)
cellphone.py, cellphone_OO.py
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)
centralserver.py, centralserver_OO.py
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)
jacksonnetwork.py, jacksonnetwork_OO.py
A Jackson network with 3 nodes, exponential service times and
probability switching. The simulation measures the delay for
jobs moving through the system. (TV)
Miscellaneous Models
+++++++++++++++++++++
bank08renege.py, bank08renege_OO.py (partial conversion)
Use of reneging (compound ``yield request``) based on ``bank08.py``
of the tutorial TheBank. Customers leave if they lose patience
with waiting.
Carwash.py, Carwash_OO.py
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.
CellularAutomata.py
A two-dimensional cellular automaton. Does the game of
Life. (KGM)
demoSimPyEvents.py
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.
shortestPath_SimPy.py, shortestPath_SimPy_OO.py
A fun example of using SimPy for non-queuing work. It
simulates a searcher through a graph, seeking the shortest
path. (KGM)
Machineshop.py, Machineshop_OO.py
An example of the use of the ``interrupt()`` method. It
simulates a workshop with ``n`` machines which break down and one
or more repairmen which have to repair them. (KGM)
Market.py, Market_OO.py
A supermarket checkout with multiple counters and extended
Monitor objects. Written and analysed by David Mertz in an
article for developerWorks (). (MM)
Movie_renege.py, Movie_renege_OO.py
Use of reneging (compound ``yield request``) constructs for
reneging at occurrence of an event. Scenario is a movie ticket
counter with a limited number of tickets for three movies.
needResources.py, needResources_OO.py
Demo of ``waitUntil`` 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.
SimPy_worker_extend.py, SimPy_worker_extend_OO.py
Factory making widgets with queues for machines. (MM)
WidgetPacking.py, WidgetPacking_OO.py
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).
GUI Input
-----------
GUIdemo.py, GUIdemo_OO.py
A firework show.
bank11GUI.py, bank11GUI_OO.py
A modification of the bank11 simulation with GUI input.
SimGUIStep.py
A modification of the bank11 simulation with the ability to
step between events
Plot
----------------
bakery.py, bakery_OO.py
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)
bank11Plot.py
A modification of the bank11 simulation with graphical
output. It plots service and waiting times
Debugging
--------------
SimpleDebugger.py, SimpleDebugger_OO.py
A program which demonstrates how one can step through a
SimPy model interactively, event by event. Can be imported
into any model.
:Created: 2002-December
:Date: $Date$
:Revision: $Revision$
.. |simpylogo| image:: ../SimPyDocs/_images/sm_SimPy_Logo.png
..
Local Variables:
mode: rst
indent-tabs-mode: nil
sentence-end-double-space: t
fill-column: 70
End:
|