GillespieSSA: Gillespie’s Stochastic Simulation Algorithm (SSA)

GillespieSSA provides a simple to use, intuitive, and extensible interface to several stochastic simulation algorithms for generating simulated trajectories of finite population continuous-time model. Currently it implements Gillespie’s exact stochastic simulation algorithm (Direct method) and several approximate methods (Explicit tau-leap, Binomial tau-leap, and Optimized tau-leap).

The package also contains a library of template models that can be run as demo models and can easily be customized and extended. Currently the following models are included, decaying-dimerization reaction set, linear chain system, logistic growth model, Lotka predator-prey model, Rosenzweig-MacArthur predator-prey model, Kermack-McKendrick SIR model, and a metapopulation SIRS model.


You can install GillespieSSA from CRAN using


Or, alternatively, you can install the development version of GillespieSSA from GitHub using

devtools::install_github("rcannood/GillespieSSA", build_vignettes = TRUE)


The following example models are available:

Latest changes

Check out news(package = "GillespieSSA") or for a full list of changes.

Recent changes in GillespieSSA 0.6.2

Recent changes in GillespieSSA 0.6.1

This release contains a major rewrite of the internal code, to make sure the code is readable and that the algorithm doesn’t continuously update the local environment.