gillespied {smfsb} | R Documentation |
Simulate a sample path from a stochastic kinetic model described by a stochastic Petri net
Description
This function simulates a single realisation from a discrete stochastic kinetic model described by a stochastic Petri net and discretises the output onto a regular time grid.
Usage
gillespied(N, T=100, dt=1, ...)
Arguments
N |
An R list with named components representing a stochastic
Petri net (SPN). Should contain |
T |
The required length of simulation time. Defaults to 100 time units. |
dt |
The grid size for the output. Note that this parameter simply determines the volume of output. It has no bearing on the correctness of the simulation algorithm. Defaults to one time unit. |
... |
Additional arguments will be passed into the function |
Value
An R ts
object containing the simulated realisation of the process.
See Also
simpleEuler
, rdiff
,
discretise
, gillespie
, StepGillespie
Examples
# load LV model
data(spnModels)
# simulate and plot a realisation
plot(gillespied(LV,T=100,dt=0.01))