% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/evidPush.R
\name{bolus}
\alias{bolus}
\title{Administer a bolus dose inside a rxode2 model}
\usage{
bolus(amt, cmt = 1, ii = 0, addl = 0, ss = 0)
}
\arguments{
\item{amt}{Numeric dose amount (for dose events) or \code{0} for
observations.  When \code{rate > 0} this is interpreted as the total
infusion amount and the infusion duration is \code{amt / rate}.}

\item{cmt}{Integer compartment number (1-based) to which the dose is
applied.  Default is 1}

\item{ii}{Numeric inter-dose interval.  Used together with \code{addl} to
schedule repeat doses at \code{time}, \code{time + ii}, \code{time + 2*ii}, ...,
\code{time + addl*ii}.  Also required when \code{ss > 0}. Default 0}

\item{addl}{Integer number of \emph{additional} doses beyond the first.
The total number of doses pushed is \code{addl + 1}, spaced \code{ii} apart.
Each dose is pushed as a standalone event (not as a periodic
schedule in the event table).}

\item{ss}{Integer steady-state flag applied to the \emph{first} dose only
(\code{addl} repetitions always use \code{ss = 0}).
\describe{
\item{\code{0}}{No steady-state (default).}
\item{\code{1}}{Steady-state additive: add SS solution to current state.}
\item{\code{2}}{Steady-state replace: replace current state with SS solution.}
}}
}
\value{
This function is only meaningful inside an rxode2 model; it
returns \code{NULL} invisibly if called from R directly (after signaling
an error).
}
\description{
Administer a bolus dose inside a rxode2 model
}
\details{
\subsection{Behavior inside a model}{

\code{bolus()} is evaluated at every output time point (when the solver is
exactly at a scheduled event time).  The pushed event is inserted into
the individual's event timeline and the solver visits it now or at the
specified future time.

The number of events that may be pushed per individual is limited by
the \code{maxExtra} argument of \code{\link[=rxSolve]{rxSolve()}}.  When \code{maxExtra = 0}
(the default) there is no limit.  Exceeding the limit causes an
error.

Past-time pushes (where \code{time < t}) are silently ignored and counted;
a warning is issued after solving.
}
}
\author{
Matthew L. Fidler
}
