Description Usage Arguments Value Examples
This function allows users to simulate the model (i.e., solve ODEs) using Gillespie stochastic simulation algorithm (using the "ssa" function from the GillespieSSA package).
1 2 3 4 | solveStoch(x, times = 10, method = "D", simName = "", tau = 0.3,
f = 10, epsilon = 0.03, nc = 10, hor = NaN, dtf = 10, nd = 100,
ignoreNegativeState = TRUE, consoleInterval = 0, censusInterval = 0,
verbose = FALSE, maxWallTime = Inf)
|
x |
model name (required) |
times |
time points in which model will be simulated |
method |
text string indicating the SSA method to use (see ?GillespieSSA::ssa for more details) |
simName |
see ?GillespieSSA::ssa for more details |
tau |
see ?GillespieSSA::ssa for more details |
f |
see ?GillespieSSA::ssa for more details |
epsilon |
see ?GillespieSSA::ssa for more details |
nc |
see ?GillespieSSA::ssa for more details |
hor |
see ?GillespieSSA::ssa for more details |
dtf |
see ?GillespieSSA::ssa for more details |
nd |
see ?GillespieSSA::ssa for more details |
ignoreNegativeState |
see ?GillespieSSA::ssa for more details |
consoleInterval |
see ?GillespieSSA::ssa for more details |
censusInterval |
see ?GillespieSSA::ssa for more details |
verbose |
see ?GillespieSSA::ssa for more details |
maxWallTime |
see ?GillespieSSA::ssa for more details |
Data frame where each row corresponds to a time point in which model was simulated. First column corresponds to time, while the rest of columns correspond to model species, i.e., values assigned to those species at a given time point.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | exmp <- newModel("This is an example of a new model")
addMAreaction(exmp, react="A = null", "rf", "rb")
addMAreaction(exmp, react="A + B -> 2*AB", "k", name="Forward AB")
addMAreaction(exmp, react="AB -> null", "rAB")
addMAreactRate(exmp, "rf", "fixed", "1")
addMAreactRate(exmp, "rb", "fixed", "0.75")
addMAreactRate(exmp, "k", "fixed", "0.5")
addMAreactRate(exmp, "rAB", "assigned", "p1*A")
addParameters(exmp, "p1", 0.75)
addSpecies(exmp, "A", 10)
addSpecies(exmp, "B", 10)
addSpecies(exmp, "AB", 0)
addRule(exmp, "rule B", "ODEs", "B=-0.1*AB")
makeModel(exmp)
simResults.stoch <- solveStoch(exmp)
plotResults(simResults.stoch, title="Simulation results (stochastic)")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.