Skip to main content

A tool for working with parameterized simulation models

Project description

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.

  • 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 (as of version 2.0 Python3 only).

  • 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, in any Python installation).

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

Installation

Parsim is available at the PyPI, the Python Package Index. It is installed in your ordinary Python environment using the pip installer.

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 pyDOE2, numpy and scipy libraries. The pandas library has also been included, so that the Python API can provide results and caselist data as pandas DataFrames.

It is recommended to first make a clean and fully functional installation of the NumPy, SciPy and pandas libraries. The best way to do this depends on which Python distribution you use. The anaconda Python distribution is highly recommended. It works well on both Windows and Linux. In an anaconda distribution, you simply install the conda packages for NumPy, SciPy and pandas. They are usually installed by default. Otherwise use the conda package manager:

conda install numpy scipy pandas

Then use pip to install parsim:

pip install parsim

This will install also the pyexpander and pyDOE2 packages, which in turn will check for NumPy and SciPy.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parsim-2.0.0.post1.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

parsim-2.0.0.post1-py2.py3-none-any.whl (60.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file parsim-2.0.0.post1.tar.gz.

File metadata

  • Download URL: parsim-2.0.0.post1.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for parsim-2.0.0.post1.tar.gz
Algorithm Hash digest
SHA256 d357a032fe5def94d069748d56083fe16d4089fcdd7f0a93422bd84e19aa1542
MD5 b8a871c5fd0ea208ea4d8b55a07af148
BLAKE2b-256 2d93cae7878bd1c9b601fc276e56bd699c4e96c49e1e8382fb2c56e22df31ad5

See more details on using hashes here.

File details

Details for the file parsim-2.0.0.post1-py2.py3-none-any.whl.

File metadata

  • Download URL: parsim-2.0.0.post1-py2.py3-none-any.whl
  • Upload date:
  • Size: 60.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for parsim-2.0.0.post1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6f81674ad71138a348f96ceac0036c53be91a9119e3faf733d322e9e20f9d295
MD5 6abf8702d5951b44fa8c4df85bfa0606
BLAKE2b-256 35be2ca85ab5c16522541e57ff3e4df83a09cfa59916b525a2cf651a3ee8978b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page