Skip to main content
. 2013 Feb 21;8(2):e51174. doi: 10.1371/journal.pone.0051174

Table 2. Algorithm 1 Gillespie Stochastic Simulation Algorithm [38], [39].

1: Input: initial time t 0, state x 0 and final time T;
2: set xx 0 and tt 0;
3: while t<T do
4: define Inline graphic
5: let Inline graphic, r 2U [0,1];
6: determine next jump as Inline graphic;
7: determine next reaction as Inline graphic
8: set xx+νj and tt+τ;
9: end while