\inputencoding{utf8}
\HeaderA{ode.model}{Ordinary Differential Equations}{ode.model}
\keyword{method}{ode.model}
%
\begin{Description}\relax
\code{ode.model} is the system evaluation function called when an \$ODE block
is detected in the model file, indicating that the model is defined by 
ordinary differential equations. \code{ode.model} is typically not called 
directly by users
\end{Description}
%
\begin{Usage}
\begin{verbatim}
  ode.model(parms = NULL,
            derparms = NULL,
            code = NULL,
            bolus = NULL,
            infusion = NULL,
            xdata = NULL,
            covdata = NULL,
            issim = 0,
            check = FALSE,
            options = list(method='lsoda'))
\end{verbatim}
\end{Usage}
%
\begin{Arguments}
\begin{ldescription}
\item[\code{parms}] A vector of primary parameters.
\item[\code{derparms}] A list of derived parameters, specified in the \$DERIVED block
of code.
\item[\code{code}] A list of R code extracted from the model file. Depending on 
content of the model file, the levels of this list could be: template,
derived, lags, ode, dde, output, variance, and/or secondary.
\item[\code{bolus}] A data.frame providing the instantaneous inputs  entering the 
system of delay differential equations for the treatment and individual 
being evaluated.
\item[\code{infusion}] A data.frame providing the zero-order inputs entering the 
system of delay differential equations for the treatment and individual 
being evaluated.
\item[\code{xdata}] A vector of times at which the system is being evaluated.
\item[\code{covdata}] A data.frame of covariate data for the treatment and individual 
being evaluated.
\item[\code{issim}] An indicator for simulation or estimation runs.
\item[\code{check}] An indicator whether checks should be performed to validate 
function inputs.
\item[\code{options}] A list of differential equation solver options. Currently
not modifiable by users.
\end{ldescription}
\end{Arguments}
%
\begin{Details}\relax
\code{ode.model} evaluates the model for each treatment of each individual 
contained in the dataset using several utility functions: \code{derived.parms},
\code{init.cond}, \code{input.scaling}, \code{make.dosing}, \code{init.update},
and \code{de.output}.

The actual evaluation of the system is performed by \code{ode} from the 
\pkg{deSolve} package.
\end{Details}
%
\begin{Value}
Returns a matrix of system predictions.
\end{Value}
%
\begin{Author}\relax
Sebastien Bihorel (\email{sb.pmlab@gmail.com})
\end{Author}
%
\begin{SeeAlso}\relax
\code{\LinkA{ode}{ode}},
\code{\LinkA{init.cond}{init.cond}}, \code{\LinkA{input.scaling}{input.scaling}},
\code{\LinkA{make.dosing}{make.dosing}}, \code{\LinkA{init.update}{init.update}},
\code{\LinkA{de.output}{de.output}}
\end{SeeAlso}
