It’s been a while since our last status update and we have to admit that not
much happened in the default branch during that time.
The most visible changes are improved stacktraces for Python 2, better
"__repr__" implementations and that events now store their "value"---it can now
be accessed at any time via a property of that name.
In the background, we have been working on a new implementation of SimPy’s
resources and implemented a first draft for the monitoring capabilities.
Ontje & Stefan
yesterday, Ontje merged his last changes:
• He did some research on how to improve the scheduling of events and make it
more flexible. He extracted the scheduling functionality into a separate
class. For real-time simulations you can now use the same "Environment" and
"simulate()" as for normal simulations but only use the real-time scheduler.
The "rt" package now contains a "RealTimeEnvironment" which is just a wrapper
for "Environment" with a "RealtimeScheduler".
• You can now also *yield* events that have already been triggered. That is,
for example, useful if you want to wait for other processes to finish to get
their results and don’t know if they are still running or not.
We have now implemented everything that we planned for SimPy 3. There are still
a lot of things to be done before we can release it, though:
• We will split the repo into a SimPy 2 and 3 version. This will reduce the
repository size from 13MB to 1.6MB and should dramatically improve the time
need to clone the repository. You will find the SimPy 2 repository under
• "peek()", "step()" and "simulate()" might be moved back to "Environment"
again, but that’s not 100% sure yet.
• Tests and coverage – though there are already a lot of tests, we want to
further improve our test suite and test coverage before releasing SimPy 3.
• Documentation and examples – this requires the most work. The API reference
is quite complete by now. The tutorial has to be checked and updated, most
of the more in-depth guides are still missing and we also want to add more
Ontje and Stefan
here is another SimPy 3 status update:
Ontje did some refactoring in SimPy’s core which led to some API changes.
The functions peek(), step() and simulate() are now methods of Environment.
simulate() has also been renamed to run(). We renamed it particularly because
Ontje is building a networking library (e.g., for multi-agent systems with
simulated and real communication) on top of SimPy and "simulate()" would not
make much sense in this case. The same applies more or less to real-time
simulation (because the time is "real" and not "virtual"). Furthermore, "run()"
is much shorter to type. ;-)
The SimPy 3 minimum example now looks like this:
>>> import simpy
>>> def clock(env):
... while True:
... yield env.timeout(1)
>>> env = simpy.Environment()
<Process(clock) object at 0x...>
We are currently working on improving out test-suite and the documentation as
well as some general clean-up.
We plan to release SimPy 3.0 until PyCon DE 2013 which starts on October 14th.
Ontje & Stefan