Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse Vensim/Stella models into MIRA template models #272

Merged
merged 50 commits into from
Jan 30, 2024

Conversation

nanglo123
Copy link
Contributor

@nanglo123 nanglo123 commented Jan 17, 2024

This PR makes use of the pysd library to parse Vensim and Stella models represented by the .mdl and .stmx, .xmile, or .itmx file extensions repsectively and turns them into an equivalent MIRA template model.

Currently, only a limited number of vensim models are able to be successfully parsed. This module cannot parse vensim models that incorporate series data, MACROs, conditional statements (IF-ELSE), and vensim specific functions (e.g. ZIDZ, PULSE). Additionally, pysd cannot parse Stella models with the .itmx extension and its dependency: parsimonious errors when processing certain stella models with valid file extensions (.stmx or .xmile).

Additionally, for now, we cannot process Vensim models with flows that contain multiple input or output states.

@bgyori bgyori force-pushed the add-vensim-digestion branch from f3c932b to 20352b6 Compare January 23, 2024 16:37
mira/sources/vensim.py Outdated Show resolved Hide resolved
mira/sources/vensim.py Outdated Show resolved Hide resolved
mira/sources/vensim.py Outdated Show resolved Hide resolved
mira/sources/vensim.py Outdated Show resolved Hide resolved
mira/sources/vensim.py Outdated Show resolved Hide resolved
mira/sources/vensim.py Outdated Show resolved Hide resolved
… and vensim models and add initials to vensim tm
@nanglo123 nanglo123 force-pushed the add-vensim-digestion branch from 845d77f to 71d0fc5 Compare January 24, 2024 18:37
…dule, remove main method from stockflow sources and change display name for variables in stockflow modeling
@bgyori bgyori changed the title Parse Vensim models into MIRA template models Parse Vensim/Stella models into MIRA template models Jan 30, 2024
Copy link
Member

@bgyori bgyori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@bgyori bgyori merged commit 7d41dcf into gyorilab:main Jan 30, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants