% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/params.R
\name{seair_init}
\alias{seair_init}
\title{Build initial conditions for the SEAIR system}
\usage{
seair_init(m_grid, f_vals, I_seed = 1e-04)
}
\arguments{
\item{m_grid}{Numeric vector of mobility grid points in \eqn{[0,1]}.}

\item{f_vals}{Numeric vector of densities \eqn{f(m)} evaluated at
\code{m_grid}.  It is renormalised internally so that the
trapezoidal integral over \code{m_grid} equals 1.}

\item{I_seed}{Non-negative fraction of the population seeded in the
symptomatic compartment (default \code{1e-4}).}
}
\value{
A list of class \code{"seair_init"} with entries
  \code{m_grid}, \code{f}, \code{S}, \code{E}, \code{A}, \code{I},
  \code{R}, and \code{I_seed}.
}
\description{
Constructs initial profiles \eqn{(S_0, E_0, A_0, I_0, R_0)} on the
mobility grid from a user-supplied mobility density \eqn{f(m)} and a
seed fraction \eqn{I_{\mathrm{seed}}} placed in the symptomatic
compartment.  The initial condition is "proportional":
\eqn{S_0 = (1 - I_{\mathrm{seed}}) f},
\eqn{I_0 = I_{\mathrm{seed}} f},
\eqn{E_0 = A_0 = R_0 = 0}.
}
\examples{
m <- seq(0, 1, length.out = 101)
f <- dbeta(m, 2, 2)
seair_init(m, f, I_seed = 1e-4)

}
