{"schemaVersion":"1.0","record":{"label":"PySD","description":"Python system-dynamics translation and simulation library for Vensim and XMILE models.","aliases":[],"kind":"software","website":"https://pysd.readthedocs.io/","overview":"PySD is a library for translating system-dynamics models into Python and running them alongside Python analysis tools. It reads Vensim and XMILE models, providing programmatic access to parameters, simulation runs and outputs rather than a replacement diagram editor.","license":"MIT","lifecycle":"active","example":false,"features":[{"name":"Vensim/XMILE execution","status":"limited","detail":"Translation supports many models but not every function or feature.","useCase":"Dynamic system modeling and simulation","platforms":["Python environment"],"region":"Edition, deployment and model dependencies affect availability","evidence":[{"url":"https://pysd.readthedocs.io/en/master/","locator":"Vensim/XMILE translation and unsupported functions","retrievedAt":"2026-10-07T09:42:32Z","kind":"vendor"},{"url":"https://pysd.readthedocs.io/en/master/structure/xmile_translation.html","locator":"XMILE/Vensim support gap and unsupported XMILE macros","retrievedAt":"2026-10-07T09:42:23Z","kind":"vendor"}]},{"name":"Analysis-friendly outputs","status":"supported","detail":"Returns data frames or CSV/TAB/netCDF results with dependency differences.","useCase":"Dynamic system modeling and simulation","platforms":["Python environment"],"region":"Edition, deployment and model dependencies affect availability","evidence":[{"url":"https://pysd.readthedocs.io/en/master/getting_started.html","locator":"Data inputs, results formats, parameters and initial conditions","retrievedAt":"2026-10-07T09:42:56Z","kind":"vendor"}]},{"name":"XMILE macros","status":"unsupported","detail":"Current XMILE translation guide identifies macros as unsupported.","useCase":"Dynamic system modeling and simulation","platforms":["Python environment"],"region":"Edition, deployment and model dependencies affect availability","evidence":[{"url":"https://pysd.readthedocs.io/en/master/structure/xmile_translation.html","locator":"XMILE/Vensim support gap and unsupported XMILE macros","retrievedAt":"2026-10-07T09:42:23Z","kind":"vendor"}]}],"alternatives":[],"slug":"pysd","draftAlternatives":[{"targetSlug":"vensim","status":"limited","detail":"Can replace execution and Python-based analysis of supported translated models; numerical checks and graphical-authoring alternatives remain necessary.","useCase":"Dynamic system modeling and simulation","platforms":["Python environment"],"region":"Edition, deployment and model dependencies affect availability","evidence":[{"url":"https://pysd.readthedocs.io/en/master/","locator":"Vensim/XMILE translation and unsupported functions","retrievedAt":"2026-10-07T09:42:32Z","kind":"vendor"},{"url":"https://pysd.readthedocs.io/en/master/getting_started.html","locator":"Data inputs, results formats, parameters and initial conditions","retrievedAt":"2026-10-07T09:42:56Z","kind":"vendor"},{"url":"https://vensim.com/software/","locator":"Dynamic feedback, causal tracing and analysis","retrievedAt":"2026-10-07T09:32:43Z","kind":"vendor"}]}],"evidence":[{"url":"https://pysd.readthedocs.io/en/master/","locator":"Vensim/XMILE translation and unsupported functions","retrievedAt":"2026-10-07T09:42:32Z","kind":"vendor"},{"url":"https://pysd.readthedocs.io/en/master/getting_started.html","locator":"Data inputs, results formats, parameters and initial conditions","retrievedAt":"2026-10-07T09:42:56Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://github.com/SDXorg/pysd/blob/master/LICENSE","locator":"MIT license","retrievedAt":"2026-10-07T09:42:51Z","id":"ps-license","title":"PySD license","kind":"vendor"},{"url":"https://pysd.readthedocs.io/en/master/","locator":"Vensim/XMILE translation and unsupported functions","retrievedAt":"2026-10-07T09:42:32Z","id":"ps-home","title":"PySD overview","kind":"vendor"},{"url":"https://pysd.readthedocs.io/en/master/getting_started.html","locator":"Data inputs, results formats, parameters and initial conditions","retrievedAt":"2026-10-07T09:42:56Z","id":"ps-start","title":"PySD getting started","kind":"vendor"},{"url":"https://github.com/SDXorg/pysd/blob/master/README.md","locator":"Python requirements and community-maintained simulation library","retrievedAt":"2026-10-07T09:42:40Z","id":"ps-readme","title":"PySD repository","kind":"vendor"},{"url":"https://pysd.readthedocs.io/en/master/structure/xmile_translation.html","locator":"XMILE/Vensim support gap and unsupported XMILE macros","retrievedAt":"2026-10-07T09:42:23Z","id":"ps-xmile","title":"PySD XMILE translation","kind":"vendor"},{"url":"https://vensim.com/software/","locator":"Dynamic feedback, causal tracing and analysis","retrievedAt":"2026-10-07T09:32:43Z","id":"vs-about","title":"Vensim software","kind":"vendor"},{"url":"https://www.vensim.com/documentation/file_types.html","locator":"Native model, packaged model and result formats","retrievedAt":"2026-10-07T09:32:31Z","id":"vs-files","title":"Vensim file types","kind":"vendor"}],"overviewCitations":["ps-home","ps-start"],"licenseCitations":["ps-license"],"sections":[{"id":"workflow","heading":"Translation and analysis","paragraphs":[{"id":"workflow-detail","content":[{"text":"A model is parsed and translated into a reusable Python representation. Users can inspect model documentation, choose returned variables and align result timestamps with observed data. This makes PySD useful where a system-dynamics model is one component of a larger analysis script. The project's current repository requires Python 3.9 or later."}],"citations":["ps-home","ps-start","ps-readme"]}]},{"id":"compatibility","heading":"Translation limits","paragraphs":[{"id":"compatibility-detail","content":[{"text":"PySD does not implement every Vensim or XMILE function. A translated model may fail or run only partially when unsupported constructs remain. Its XMILE documentation specifically identifies a development gap relative to Vensim support and says XMILE macros are unsupported. Compatibility therefore has to be checked against the actual equations and functions used, not simply the file extension."}],"citations":["ps-home","ps-xmile"]}]},{"id":"data","heading":"Inputs and outputs","paragraphs":[{"id":"data-detail","content":[{"text":"Results can be returned as pandas data frames or written as CSV, tab-separated or netCDF files. The guide prefers tab-separated output for some subscripted data and netCDF when preserving metadata is important; netCDF needs an optional dependency. For Vensim DATA-type inputs, the documented Python route accepts tabular CSV or TAB files rather than directly relying on the original binary dataset."}],"citations":["ps-start"]}]},{"id":"experiments","heading":"Parameters and initial state","paragraphs":[{"id":"experiments-detail","content":[{"text":"Setting a parameter and setting an initial condition have different effects. The guide warns that parameter changes persist in the loaded model, while initial-state options can restart or continue a run. Repeated scenarios should explicitly control those choices. PySD's MIT license covers the library, while imported models and data remain subject to their own rights."}],"citations":["ps-start","ps-license"]}]},{"id":"substitution","heading":"When it substitutes","paragraphs":[{"id":"substitution-detail","content":[{"text":"PySD can replace selected "},{"text":"Vensim","targetSlug":"vensim"},{"text":" execution and data-analysis workflows when a supported model can be translated and numerical behavior checked. It is particularly useful for scripted experiments within Python. This does not establish a complete replacement for Vensim's graphical authoring, every native function or its deployment formats."}],"citations":["ps-home","ps-start","vs-about","vs-files"]}]}]},"id":"Q589","revision":637,"updatedAt":"2026-10-12T23:29:50Z","sourceUrl":"https://substitutefor.net/entities/Q589?revision=637"}}