This section addresses the difference between SimPy versions 2.1.0 and version 2.0.1 in terms of changes, additions and repairs.
Major re-structuring of SimPy code, resulting in much less SimPy code – great for the maintainers.
Checks have been added which test whether entities belong to the same Simulation instance. These can prevent obscure errors in using the advanced object oriented API which are caused by the omission of a sim parameter.. Example:
s = Simulation()
p = AProcess() ## missing 'sim = s'
s.activate(p, p.run())
Here, Aprocess does not belong to the Simulation instance s. In SimPy 2.1.0, this now leads to an informative error message and program termination. To reduce run time, the tests can be switched off after debugging programs by executing Python with the -O parameter. Example: python -O mySimulation.py
The Monitor and Tally methods timeAverage and timeVariance now calculate only with the observed time-series. No value is assumed for the period prior to the first observation.
Changed class Lister so that circular references between objects no longer lead to stack overflow and crash.
Revision: | $Revision: 493 $ |
---|---|
Date: | $Date: 2010-05-11 07:02:41 +0200 (Di, 11 Mai 2010) $ |