simmer
by Bart Smeets (bartsmeets86@gmail.com), Iñaki Ucar (i.ucar86@gmail.com)
simmer is a Discrete-Event Simulation (DES) package for the R language designed to be a generic framework like SimPy or SimJulia. Although R alone is definitely not made for DES, we use Rcpp to boost the performance of simmer. This faces us with an important trade-off between flexibility and performance, depending on how much code remains in R or goes to C++ respectively.
Our implementation solves this problem by introducing the concept of trajectory: a common path in the simulation model for arrivals of the same type. As we will see, it is pretty flexible and simple to use, and leverages the chaining/piping workflow introduced by the magrittr package. In terms of performance, simmer is faster than SimPy when it comes to simulating queue networks.
Installation
The installation from GitHub requires the devtools package.
devtools::install_github("Bart6114/simmer")
Please note that the package contains some C++ code and you thus need a development environment to build the package (e.g. Rtools for Windows). If you don't want to build the package yourself and you're on Windows you could try a pre-built binary package here.
Learning simmer
To get started, please read the intro vignette:
vignette("introduction", package = "simmer")
Roadmap
- Refine queue discipline (add priorities).
- Time-specific resource availability.
Contact
For bugs and/or issues, create a new issue on GitHub. For other questions or comments, do not hesitate to contact us by email.