The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
The Linear Chain System (Cao, Li, and Petzold 2004) consists of M chain reactions with M+1 species as follows:
S_1 --c1--> S_2
S_2 --c2--> S_3
...
S_M --cM--> S_(M+1)
Define parameters
library(GillespieSSA2)
<- "Linear Chain System"
sim_name <- 50
M <- c(c = 1)
params <- 5
final_time <- c(1000, rep(0, M))
initial_state names(initial_state) <- paste0("x", seq_len(M+1))
Define the reactions
<- lapply(
reactions seq_len(M),
function(i) {
<- c(-1, 1)
effect names(effect) <- paste0("x", c(i, i + 1))
reaction(paste0("c * x", i), effect)
} )
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 = .1),
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(mean_firings = 50),
sim_name = sim_name
) plot_ssa(out)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.