- transitions
character vector containing transitions on the
form "X -> ... -> Y"
. The left (right) side is the
initial (final) state and the propensity is written in between
the ->
-signs. The special symbol @
is reserved
for the empty set. For example, transitions =
c("S -> k1*S*I -> I", "I -> k2*I -> R")
expresses a SIR
model.
- compartments
contains the names of the involved
compartments, for example, compartments = c("S", "I",
"R")
.
- ldata
optional data for the nodes. Can be specified either
as a numeric matrix where column ldata[, j]
contains
the local data vector for the node j
or as a
data.frame
with one row per node. If it's specified as
a matrix, it must have row names to identify the parameters in
the transitions. If it's specified as a data.frame, each
column is one parameter. The local data vector is passed as an
argument to the transition rate functions and the post time
step function.
- gdata
optional data that are common to all nodes in the
model. Can be specified either as a named numeric vector or as
as a one-row data.frame. The names are used to identify the
parameters in the transitions. The global data vector is
passed as an argument to the transition rate functions and the
post time step function.
- u0
A data.frame
(or an object that can be coerced to
a data.frame
with as.data.frame
) with the
initial state i.e. the number of individuals in each
compartment in each node when the simulation starts..
- v0
optional data with the initial continuous state in each
node. Can be specified either as a data.frame
with one
row per node or as a numeric matrix where column v0[,
j]
contains the initial state vector for the node
j
. If v0
is specified as a data.frame
,
each column is one parameter. If v0
is specified as a
matrix, the row names identify the parameters. The 'v' vector
is passed as an argument to the transition rate functions and
the post time step function. The continuous state can be
updated in the post time step function.
- tspan
A vector (length >= 1) of increasing time points
where the state of each node is to be returned. Can be either
an integer
or a Date
vector. A Date
vector is coerced to a numeric vector as days, where
tspan[1]
becomes the day of the year of the first year
of tspan
. The dates are added as names to the numeric
vector.
- events
A data.frame
with the scheduled
events. Default is NULL
i.e. no scheduled events in the
model.
- E
matrix to handle scheduled events, see
SimInf_events
. Default is NULL
i.e. no scheduled events in the model.
- N
matrix to handle scheduled events, see
SimInf_events
. Default is NULL
i.e. no scheduled events in the model.
- pts_fun
optional character vector with C code for the post
time step function. The C code should contain only the body of
the function i.e. the code between the opening and closing
curly brackets.