Gillespie-based stochastic simulation of reaction networks
SIR Epidemic Network
S: 100
I: 5
R: 0
t: 0.0
SIR as Petri Net:
Places: S, I, R (token counts = population).
Transitions:
• S + I → 2I (rate β·S·I/N)
• I → R (rate γ·I)
Gillespie SSA: next event time τ ~ Exp(Σrᵢ); event chosen by propensity weight. Exact stochastic simulation of master equation.