This model is also known as the irreversible isomerization reaction set (Gillespie 1977). It consists of a single species and single reaction channels,
X --c--> 0
Define parameters
library(GillespieSSA2)
<- "Radioactive Decay model"
sim_name <- c(k = 0.5)
params <- 20
final_time <- c(N = 1000) initial_state
Define reactions
<- list(
reactions reaction("k * N", c(N = -1))
)
Run simulations with the Exact method
set.seed(1)
<- ssa(
out initial_state = initial_state,
reactions = reactions,
params = params,
final_time = final_time,
method = ssa_exact(),
sim_name = sim_name
) plot_ssa(out)
Run simulations with the Explict tau-leap method
set.seed(1)
<- ssa(
out initial_state = initial_state,
reactions = reactions,
params = params,
final_time = final_time,
method = ssa_etl(tau = .003),
sim_name = sim_name
) plot_ssa(out)
Run simulations with the Binomial tau-leap method
set.seed(1)
<- ssa(
out initial_state = initial_state,
reactions = reactions,
params = params,
final_time = final_time,
method = ssa_btl(),
sim_name = sim_name
) plot_ssa(out)