Gillespie (SSA)

The Gillespie algorithm 1 , also known as the Stochastic Simulation Algorithm (SSA), is an exact Monte Carlo method for numerically generating time trajectories of the system state populations in accordance with the chemical master equation (CME), which is the governing probability distribution of all possible states in time in homogeneously mixed population. The Gillespie solver features the Direct Method (DM) implementation, which is the most commonly used. The other variant of the algorithm, First Reaction Method (FRM), is theoretically equivalent to the DM but differs in implementation. FRM is implemented in GillespieFirstReaction.

While these methods are exact, both the Gillespie and the GillespieFirstReaction solvers are computationally expensive as every reaction and its firing time are explicitly computed.


Data type




Gillespie, GillespieDirect, and SSA are all valid names to run this solver.


    "duration": 100,
    "runs": 10000,
    "solver": "Gillespie",
    "prng_seed": 0,
    "samples": 50,
    "output": {
        "prefix": "SSA",
        "writecsv": true,
        "compress": false,
        "writeMatFile": true,
        "writeSampleTimes": false

Gillespie, Daniel T. “Exact stochastic simulation of coupled chemical reactions” The Journal of Physical Chemistry 81.25 (1977): 2340-361.