- y
the initial (state) values for the DAE system, a vector. If
y has a name attribute, the names will be used to label the
output matrix.
- times
time sequence for which output is wanted; the first
value of times must be the initial time.
- parms
vector or list of parameters used in res
- dy
the initial derivatives of the state variables of the DAE
system.
- func
to be used if the model is an ODE, or a DAE written in linearly
implicit form (M y' = f(t, y)).
func should be an R-function that computes the
values of the derivatives in the ODE system (the model
definition) at time t.
func must be defined as: func <- function(t, y, parms,...).
t is the current time point in the
integration, y is the current estimate of the variables in
the ODE system. If the initial values y has a names
attribute, the names will be available inside func, unless
ynames is FALSE. parms is a vector or list of
parameters. ... (optional) are any other arguments passed to
the function.
The return value of func should be a list,
whose first element is a vector containing the derivatives of
y with respect to time, and whose next elements are
global values that are required at each point in times.
The derivatives should be specified in the same order as the specification
of the state variables y.
- res
either an R-function that computes the
residual function F(t,y,y') of the DAE system (the model
defininition) at time t, or a character string giving the
name of a compiled function in a dynamically loaded shared library.
If res is a user-supplied R-function, it must be defined as:
res <- function(t, y, dy, parms, ...).
Here t is the current time point in the integration, y
is the current estimate of the variables in the DAE system,
dy are the corresponding derivatives. If the initial
y or dy have a names attribute, the names will be
available inside res, unless ynames is FALSE.
parms is a vector of parameters.
The return value of res should be a list, whose first element
is a vector containing the residuals of the DAE system,
i.e. delta = F(t,y,y'), and whose next elements contain output
variables that are required at each point in times.
If res is a string, then dllname must give the name of
the shared library (without extension) which must be loaded before
dae() is called (see deSolve package vignette "compiledCode"
for more information).
- method
the solver to use, either a string ("mebdfi",
"daspk"), "radau", "gamd" or a function that performs integration.
- ...
additional arguments passed to the solvers.