Skip to main content

Introduction

Parsim is a tool for working with parameterized simulation models. The primary objective is to facilitate quality assurance of simulation projects. The tool supports a scripted and automated workflow, where verified and validated simulation models are parameterized, so that they can be altered/modified in well-defined ways and reused with minimal user invention. All events are logged on several levels, to support traceability, project documentation and quality control.

Parsim provides basic functionality for generating studies based on common design-of experiments (DOE) methods, for example using factorial designs, response surface methods or random sampling, like Monte Carlo or Latin Hypercube.

Parsim can also be used as an interface to the Dakota library; Dakota is run as a subprocess, generating cases from a Parsim model template.

How it works

Once a prototype simulation case has been developed, a corresponding simulation model template is created by collecting all simulation input files, data files and scripts into a template directory. The text files in a model template can then be parameterized by replacing numerical values, or text strings with macro names. Parsim uses the pyexpander macro processing library, which supports embedding of arbitrarly complex Python code in the template files. This can be used for advanced parameterization needs, for example to compute data tables from functions, generate graphs for reports, generate content in loops or conditionals, etc.

When a simulation case is created, the model template directory is recursively replicated to create a case directory. Parsim operations can also be carried out on a study, containing multiple cases. A study is a directory containing multiple case directories.

You operate on your cases (either individually or on all cases of a study at once) by executing scripts written to perform specific tasks, e.g. meshing operations, starting a simulation, or post-processing of results.

Your simulation project lives in a Parsim project directory, which holds all cases and studies of the project. The project directory holds Parsim configuration settings and logs project events, like creation of cases and studies, serious errors, change of configuration settings, etc.

Summary of features:

  • Flexible and full-featured support for parameterization of text-based simulation models.

  • Cases and parameter studies kept together in projects.

  • Scripted workflow can be applied to individual cases as well as to large parameter studies.

  • Logging and error handling, for traceability and project documentation.

  • Python API can be conveniently used for post-processing and analysis, with input parameters and output available as pandas DataFrames.

  • Built-in support for many common design-of-experiments (DOE) methods.

  • Can be used as an interface to the Dakota library, for complex uncertainty quantification and optimization tasks.

  • Based on Python.

  • One simple workflow for any kind of simulation application.

  • Platform independent: Works in both Linux, Windows and MacOS environments.

  • Simple installation from public Python repositories (install with pip or conda).

  • Available under open-source license (GNU Public License v. 3)

Installation

Parsim is available at both PyPI, the Python Package Index and as a conda package through the conda-forge repository, depending on which Python distribution and package manager you use (pip and conda, respectively).

The Parsim installation requires and automatically installs the Python library pyexpander, which is used for macro and parameter expansion (parameterization of input files). The DOE (Design of Experiments) functionality is provided by the pyDOE3, numpy and scipy libraries. The pandas library is used, so that the Python API can provide results and caselist data as pandas DataFrames. If you want to use the Dakota toolkit, it is installed separately; the dakota executable should be in your PATH.

Installation from PyPI

Use the package installer pip to install:

pip install parsim

Installation with conda

Note that you need to select the conda-forge channel to find parsim with conda.

To install in your base environment:

conda install -c conda-forge parsim

Alternatively, create a separate conda environment (here called psm-env) for using parsim:

conda create -n psm-env -c conda-forge parsim
conda activate psm-env

Documentation

The Parsim documentation is hosted at ReadTheDocs.

Author

Parsim was developed by Ola Widlund, RISE Research Institutes of Sweden, to provide basic and generic functionality for uncertainty quantification and quality assurance of parameterized simulation models.

Licensing

Parsim is licensed under the GNU Public License, GPL, version 3 or later. Copyright belongs to RISE Research Institutes of Sweden AB.

Source code and reporting of issues

The source code is hosted at GitLab.com. Here you can also report issues and suggest improvements.

Release files for parsim 2.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parsim 2.3.0
File Size Uploaded
parsim-2.3.0.tar.gz 205.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for parsim 2.3.0
File Interpreter ABI Platform
parsim-2.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 266.6 kB

Release files / parsim-2.3.0.tar.gz

Download URL parsim-2.3.0.tar.gz
Size 205.6 kB
Tags Source
SHA-256 checksum
How to use checksums
215859d4ca54250c41ce745cb319f3bd0b5009a6c255ee89942eb1d04010ddba
BLAKE2b-256 checksum
How to use checksums
f59fd8c626357ec418e10ee50cbeb26e0086344e0ec5bd25c9a7d5d5a555c7fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / parsim-2.3.0-py3-none-any.whl

Download URL parsim-2.3.0-py3-none-any.whl
Size 61.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0742e82392912f53ca90ecb67fc3d666b3fc3fd6fe55ab34c030564a27f7e31c
BLAKE2b-256 checksum
How to use checksums
501177e11d71930a748ccf5fcb8af864115605c3cc84e98178c8f78da3fcc79a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release history Release notifications | RSS feed

This release

2.3.0 This release

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.0

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page