SimPy

Note:Simpy 3 is currently in development. Everything we promise below may
or may not yet exist, may dramatically change or even explode! Nevertheless, we
encourage you to try out the development version and tell us what you think.

SimPy is a process-based discrete-event simulation framework based on standard
Python. Its event dispatcher is based on Python’s generators and can also be
used for asynchronous networking or to implement multi-agent systems (with
both, simulated and real communication).

Processes in SimPy are simple Python generator functions and are used to model
active components like customers, vehicles or agents. SimPy also provides
various types of shared resource to model limited capacity congestion points
(like servers, checkout counters and tunnels). It will also provides monitoring
capabilities to aid in gathering statistics about resources and processes.

Simulations can be performed “as fast as possible”, in real time (wall clock
time) or by manually stepping through the events.

The distribution contains in-depth documentation, tutorials, and a large number
of examples.

Simpy is released under the GNU LGPL. Simulation model developers are
encouraged to share their SimPy modeling techniques with the SimPy community.
Please post a message to the SimPy-Users mailing list.

A Simple Example

One of SimPy's main goals is to be easy to use. Here is an example for a simple
SimPy simulation: a clock process that prints the current simulation time at
each step: