VenPy is a Python wrapper for the Vensim dll, created by Patrick Breach. We've recently forked and updated the project at https://github.com/VensimOfficial/venpy. The new version supports sensitivity analysis and is a little more forgiving of variable naming, since Vensim is case insensitive.
VenPy takes a model, parameters, and basically anything you can issue as a dll command and returns Pandas dataframes of simulation output. Dataframes are super convenient because you can perform all kinds of analysis, plotting, aggregation, etc. with just a couple lines of code.
Probably of greatest interest is a new sample model+code that demonstrates how to automate a suite of experiments. We used this code to automate the creation of consequence tables for Structured Decision Making (https://www.structureddecisionmaking.or ... equences2/) about Chronic Wasting Disease (https://metasd.com/2022/02/modeling-chr ... g-disease/).
The code specifies a series of runs, with or without uncertainty, and generates heatmapped tables comparing metrics of interest across scenarios:
It also demonstrates use of seaborn (https://seaborn.pydata.org/) to visualize uncertainty in the outcomes:
New VenPy fork (Vensim + Python)
New VenPy fork (Vensim + Python)
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/