Python Tools for Vensim
This package provides a pure Python wrapper to the Vensim system dynamics simulation software through the Vensim DLL. The Vensim DLL provides the ability to develop interfaces for pre-existing models by allowing access to some of the tools and functions used in the software itself.
- Provide easy access to existing Vensim functionality in Python. This will help to facilitate:
- Batch processing of simulation runs under a range of exogenously driven scenarios, parameter sets, or events.
- Incorporation of changes in model structure over time.
- Allow for the inclusion of non-existant Vensim features such as:
- Communication and data exchange with external programs through Python subprocesses.
- Easy integration of 3rd party Python libraries.
- Ability to run multiple Vensim models simultaneously and exchange data between them.
A guide for basic usage of VenPy is provided here
The goals of this project are very much in line with PySD and is in no way a replacement for this effort. In this project there is a specific focus on Vensim models through the DLL. This includes the use of all Vensim functions (depending on whether the DSS or PLE versions are installed) and features which are not available in other system dynamics simulation programs such as Stella, Simulink, MapleSim, etc.
Due to the dependence on Vensim's DLL functionality there comes a set of limitations with the project which must be kept in mind:
- The use of the Vensim DLL through this package can only support Windows (as far as I know)
- The version of Python must match the bitness of the Vensim version (which mainly provides 32-bit)
- Larger models will have the same performance limitations as the Vensim software
- Only constants and 'Gaming' type auxiliary variables can be set before and during simulations respectively
- Those who have Vensim PLE installed will only be able to modify model constants prior to simulation
- Potential compatibility issues with future versions of Vensim
- Likely more to come...
Although these limitations do exist, the Vensim DLL has been used in many successful applications to extend Vensim functionality. Some of these include the works of: