How to use SIMPACT

Simpact can be used in a number of ways. Besides the core C++ program, which can be run from the command line, there also exists a Python interface and an R interface. The basic Simpact program is a standalone command-line program. To be able to run a simulation, you need to prepare a configuration file, and provide the filename of this file as a command-line argument. However, preparing such a configuration file manually is time-consuming work.

So, to make it easier to prepare and run simulations, there’s a Python module that you can use to control Simpact from Python, or alternatively there’s a R library that you can install in R that provides a similar interface. The Python module is included when you install the Simpact binaries, but the R library must be installed separately from within an R session.

Step-wise instructions for installation are here.

To run post-simulation analyses in R with the RSimpactHelper package, installation of the readcsvcolumns R package is necessary. This can be done by running:

devtools::install_github("j0r1/readcsvcolumns/pkg")

The RSimpactHelper package itself can be installed by running:

devtools::install_github("wdelva/RSimpactHelp”, dependencies = TRUE)

Finally, to test if all software was installed correctly, you can run this simple script:

simpact.run(configParams = list(), destDir = "/tmp")

Close menu