The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

sdbuildR: Easily Build, Simulate, and Visualise Stock-and-Flow Models in R

R-CMD-check Codecov test coverage

Model systems as stock-and-flow models in R. Stock-and-flow models are foundational to system dynamics, and help to understand systems complicated by nonlinearities, delays, and feedback loops. sdbuildR aims to make stock-and-flow modeling accessible and effortless, enabling you to dedicate your expertise to what matters most: building insightful, high-quality models. Get started at https://kcevers.github.io/sdbuildR/!

Features

All package capabilities are described in the vignettes:

Installation

The release version can be installed from CRAN:

install.packages("sdbuildR")

The development version can be installed from GitHub:

if (!require("remotes")) install.packages("remotes")
remotes::install_github("KCEvers/sdbuildR")

sdbuildR offers two simulation engines: R and Julia (supported by JuliaConnectoR). If you would like to run ensemble simulations and use units, you will need to install and set up the Julia environment. See this vignette for guidance.

Citation

To cite sdbuildR, please use:

citation("sdbuildR")
#> To cite package 'sdbuildR' in publications use:
#> 
#>   Evers K (2025). _sdbuildR: Easily Build, Simulate, and Visualise
#>   Stock-and-Flow Models_. R package version 1.0.3,
#>   https://github.com/KCEvers/sdbuildR,
#>   <https://kcevers.github.io/sdbuildR/>.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {sdbuildR: Easily Build, Simulate, and Visualise Stock-and-Flow Models},
#>     author = {Kyra Caitlin Evers},
#>     year = {2025},
#>     note = {R package version 1.0.3, https://github.com/KCEvers/sdbuildR},
#>     url = {https://kcevers.github.io/sdbuildR/},
#>   }

Limitations

Other system dynamics software

sdbuildR is heavily based on common system dynamics software such as Vensim, Powersim, Stella, and Insight Maker. To translate xmile models to R, see the R package readsdr. To build stock-and-flow models with the R package deSolve, the book System Dynamics Modeling with R by Jim Duggan will prove useful. In Python, stock-and-flow models are supported by PySD.

Troubleshooting

sdbuildR is under active development. While thoroughly tested, the package may have bugs, particularly in complex model translations. We encourage users to report issues on GitHub - your input helps the package improve! Use debugger() to diagnose model errors, and use the vignettes for guidance.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.