Shared publicly  - 
Dear Community,

it’s been a while since we announced the development of SimPy 3. We now proudly present you the first results of our efforts.

Our goals was to modernize and simplify SimPy’s API as well as its externals. (Ontje had a lot of great ideas how to simplify SimPy and make it faster and more flexible at the same time!) There are some new and some removed features. We already implemented the most important parts, but some features are still missing, so SimPy 3 is still in an alpha state.

Things, that are already working:

- The SimPy core (normal simulations), including:
  - interrupts
  - suspending/resuming processes
  - waiting until another process terminates (new)
- Resources
  - Resource
  - Container (was Level)
  - Store
  - FIFO and LIFO queues
- Documentation (also completely rewritten from scratch):
  - Tutorial
  - Topical Guides: Porting from SimPy 2 to 3
  - Examples (one at least ;-))
  - API reference
  - "About" section
- A lot of tests

What’s still missing
- Monitoring
- Priority Queues for Resources
- A lot more documentation
  - Finish the tutorial
  - More guides
  - More examples

What we removed
- Plotting
- GUIs
(We think dedicated frameworks like matplotlib or pyside are much better at this.)

SimPy 3 is not backward compatible with SimPy 2. However, the backward incompatible changes led to a more thorough and robust design (less corner cases and pitfalls to cope with) and decreased simulation overhead (e.g.  simulations should become faster ;)).

A simple example simulation in SimPy 3:

    >>> import simpy
    >>> def clock(env):
    ...     while True:
    ...         print(
    ...         yield env.timeout(1)
    >>> env = simpy.Environment()
    >>> env.start(clock(env))
    >>> simpy.simulate(env, until=3)

Were can I get it?

SimPy 3 is not on PyPI yet, but you can get it from

    hg clone simpy3-alpha

The documentation is now on Read the Docs:

The new README is also a good read.

What can I do to help?

- Start porting your simulations to SimPy 3. (We promise that it is very unlikely that we change the API of the things we implemented so far.)
- Read the documentation. Ontje and I are no native English speakers, so there are surely some mistakes in it. We may have also failed to explain everything as clearly as possible.
- Create tickets for problems you find or fork us, improve things and make pull requests.

Transition from SimPy 2 to SimPy 3

You will not be able to install SimPy 2 and 3 in parallel. Since SimPy 3 will not be backwards compatible with SimPy 2, you should either
- port your simulation to SimPy 3 or
- add a "SimPy<=3" to your dependency lists in your or PIP requirements.txt files, so that you don accidentally install SimPy 3 and break your simulation.

Have fun with the SimPy 3 alpha!
Ontje and Stefan
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 vers...
Neill Byrne's profile photo
Thanks so much guys for all your efforts. As a heavy user the new features and simplified api looks fantastic. Looking forward to porting soon
Add a comment...