SimPy 3.0.2 released
Posted on
SimPy 3.0.2 has just been
released. It fixes the default capacity for Container
, Store
and
FilterStore
, which is now unlimited.
What is SimPy?
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).
SimPy 3 has been rewritten from scratch. This is the original release announcement:
After one and a half year of development and many iterations, prototypes, and endless discussions, we now proudly release SimPy 3.
SimPy 3 has been completely rewritten from scratch. Our main goals were to simplify the API and code base as well as making SimPy more flexible and extensible. Some of the most important changes are:
- Stronger focus on events. Processes yield event instances and are suspended until the event is triggered. An example for an event is a timeout (formerly known as hold), but even processes are now events, too (you can wait until a process terminates).
- Events can be combined with
&
(and) and|
(or) to create condition events.- Process can now be defined by any generator function. You don’t have to subclass
Process
anymore.- No more global simulation state. Every simulation stores its state in an environment which is comparable to the old
Simulation
class.- Improved resource system with newly added resource types.
- Removed plotting and GUI capabilities. Pyside and matplotlib are much better with this.
- Greatly improved test suite. Its cleaner, and the tests are shorter and more numerous.
- Completely overhauled documentation.
There is a guide for porting from SimPy 2 to SimPy 3. If you want to stick to SimPy 2 for a while, change your requirements to
'SimPy>=2.3,<3'
.All in all, SimPy has become a framework for asynchronous programming based on coroutines. It brings more than ten years of experience and scientific know-how in the field of event-discrete simulation to the world of asynchronous programming and should thus be a solid foundation for everything based on an event loop.
SimPy 3 is dedicated to Klaus G. Müller and Tony Vignaux who originally created SimPy in 2002. Without their hard work and efforts to create and document SimPy and to build a friendly community around it, we wouldn’t be where we are today. Thank you!