Author: Klaus G. Muller
Date: 2006-06-14

# HISTORY: SimPy

Author: | Klaus G. Muller
Contact: | kgmuller@users.sourceforge.net
Author: | Tony Vignaux
Contact: | vignaux@users.sourceforge.net
Date: | 2006-06-14
Revision: | 1.1.1.15
SimPy version: | 1.7.1
Web-site: | http://simpy.sourceforge.net/
SimpPy wiki: | http://www.mcs.vuw.ac.nz/cgi-bin/wiki/SimPy

# SimPy History

SimPy is based on ideas from Simula and Simscript but uses standard Python. It combines two previous packages, SiPy, in Simula-Style (Dr. Klaus Muller) and SimPy, in Simscript style (Tony.Vignaux and Chang Chui)

SimPy is based on efficient implementation of co-routines using Python's generators capability introduced by Python 2.2.

The package has been hosted on Sourceforge.net since 15 September 2002.

June 2006: Version 1.7.1

This is a maintenance release. The API has not been changed/added to.

- Repair of a bug in the _get methods of Store and Level which could lead to synchronization problems (blocking of producer processes, despite space being available in the buffer).
- Repair of Level __init__ method to allow initialBuffered to be of either float or int type.
- Addition of type test for Level get parameter 'nrToGet' to limit it to positive int or float.
- To improve pretty-printed output of 'Level' objects, changed attribute '_nrBuffered' to 'nrBuffered' (synonym for 'amount' property).
- To improve pretty-printed output of 'Store' objects, added attribute 'buffered' (which refers to '_theBuffer' attribute).

February 2006: Version 1.7

This is a major release.

- Addition of an abstract class Buffer, with two sub-classes Store and Level Buffers are used for modelling inter-process synchronization in producer/ consumer and multi-process cooperation scenarios.
- Addition of two new yield statements:
  - yield put for putting items into a buffer, and
  - yield get for getting items from a buffer.
- The Manual has undergone a major re-write/edit.
- All scripts have been restructured for compatibility with IronPython 1 beta2. This was doen by moving all import statements to the beginning of the scripts. After the removal of the first (shebang) line, all scripts (with the exception of plotting and GUI scripts) can run successfully under this new Python implementation.

September 2005: Version 1.6.1

This is a minor release.

- Addition of Tally data collection class as alternative to Monitor. It is intended for collecting very large data sets more efficiently in storage space and time than Monitor.
- Change of Resource to work with Tally (new Resource API is backwards-compatible with 1.6).
- Addition of function setHistogram to class Monitor for initializing histograms.
- New function allEventNotices() for debugging/teaching purposes. It returns a prettyprinted string with event times and names of process instances.
- Addition of function allEventTimes (returns event times of all scheduled events).

15 June 2005: Version 1.6

- Addition of two compound yield statement forms to support the modelling of processes reneging from resource queues.
- Addition of two test/demo files showing the use of the new reneging statements.
- Addition of test for prior simulation initialization in method activate().
- Repair of bug in monitoring thw waitQ of a resource when preemption occurs.
- Major restructuring/editing to Manual and Cheatsheet.

1 February 2005: Version 1.5.1

- MAJOR LICENSE CHANGE:

  > Starting with this version 1.5.1, SimPy is being release under the GNU Lesser General Public License (LGPL), instead of the GNU GPL. This change has been made to encourage commercial firms to use SimPy in for-profit work.

- Minor re-release

- No additional/changed functionality

- Includes unit test file'MonitorTest.py' which had been accidentally deleted from 1.5

- Provides updated version of 'Bank.html' tutorial.

- Provides an additional tutorial ('Bank2.html') which shows how to use the new synchronization constructs introduced in SimPy 1.5.

- More logical, cleaner version numbering in files.

1 December 2004: Version 1.5

- No new functionality/API changes relative to 1.5 alpha
- Repaired bug related to waiting/queuing for multiple events
- SimulationRT: Improved synchronization with wallclock time on Unix/Linux

25 September 2004: Version 1.5alpha

- New functionality/API additions

  > - SimEvents and signalling synchronization constructs, with 'yield waitevent' and 'yield queueevent' commands.
  > - A general "wait until" synchronization construct, with the 'yield waituntil' command.

- No changes to 1.4.x API, i.e., existing code will work as before.

19 May 2004: Version 1.4.2

- Sub-release to repair two bugs:

  > - The unittest for monitored Resource queues does not fail anymore.
  > - SimulationTrace now works correctly with "yield hold,self" form.

- No functional or API changes

29 February 2004: Version 1.4.1

- Sub-release to repair two bugs:

  > - The (optional) monitoring of the activeQ in Resource now works correctly.
  > - The "cellphone.py" example is now implemented correctly.

- No functional or API changes

1 February 2004: Version 1.4 published on SourceForge

22 December 2003: Version 1.4 alpha

- New functionality/API changes

  > > - All classes in the SimPy API are now new style classes, i.e., they inherit from object either directly or indirectly.
  > > - Module Monitor.py has been merged into module Simulation.py and all SimulationXXX.py modules. Import of Simulation or any SimulationXXX module now also imports Monitor.
  > > - Some Monitor methods/attributes have changed. See Manual!
  > > - Monitor now inherits from list.

  > - A class Histogram has been added to Simulation.py and all SimulationXXX.py modules.
  > - A module SimulationRT has been added which allows synchronization between simulated and wallclock time.
  > - A moduleSimulationStep which allows the execution of a simulation model event-by-event, with the facility to execute application code after each event.
  > - A Tk/Tkinter-based module SimGUI has been added which provides a SimPy GUI framework.
  > - A Tk/Tkinter-based module SimPlot has been added which provides for plot output from SimPy programs.

22 June 2003: Version 1.3

- No functional or API changes
- Reduction of sourcecode linelength in Simulation.py to <= 80 characters

9 June 2003: Version 1.3 alpha

- Significantly improved performance

- Significant increase in number of quasi-parallel processes SimPy can handle

- New functionality/API changes:

  > - Addition of SimulationTrace, an event trace utility
  > - Addition of Lister, a prettyprinter for instance attributes
  > - No API changes

- Internal changes:

  > - Implementation of a proposal by Simon Frost: storing the keys of the event set dictionary in a binary search tree using bisect. Thank you, Simon! SimPy 1.3 is dedicated to you!

- Update of Manual to address tracing.

- Update of Interfacing doc to address output visualization using Scientific Python gplt package.

29 April 2003: Version 1.2

- No changes in API.

- Internal changes:
    - Defined "True" and "False" in Simulation.py to support Python 2.2.

22 October 2002:

- Re-release of 0.5 Beta on SourceForge.net to replace corrupted file __init__.py.
- No code changes whatever!

18 October 2002:

- Version 0.5 Beta-release, intended to get testing by application developers and system integrators in preparation of first full (production) release. Released on SourceForge.net on 20 October 2002.

- More models

- Documentation enhanced by a manual, a tutorial ("The Bank") and installation instructions.

- Major changes to the API:

  - Introduced 'simulate(until=0)' instead of 'scheduler(till=0)'. Left 'scheduler()' in for backward compatibility, but marked as deprecated.

  - Added attribute "name" to class Process. Process constructor is now:

        def __init__(self,name="a_process")

    Backward compatible if keyword parameters used.

  - Changed Resource constructor to:

        def __init__(self,capacity=1,name="a_resource",unitName="units")

    Backward compatible if keyword parameters used.

27 September 2002:

- Version 0.2 Alpha-release, intended to attract feedback from users
- Extended list of models
- Upodated documentation

17 September 2002

- Version 0.1.2 published on SourceForge; fully working, pre-alpha code
- Implements simulation, shared resources with queuing (FIFO), and monitors for data gathering/analysis.
- Contains basic documentation (cheatsheet) and simulation models for test and demonstration.