% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/solver.R
\name{seair_aggregate}
\alias{seair_aggregate}
\title{Aggregate a SEAIR solution over mobility}
\usage{
seair_aggregate(sol)
}
\arguments{
\item{sol}{A \code{"seair_solution"} object returned by
\code{\link{seair_solve}}.}
}
\value{
A data frame with columns \code{time}, \code{S}, \code{E},
  \code{A}, \code{I}, \code{R} (aggregate ratios).
}
\description{
Computes the aggregate time series
\eqn{\int_0^1 S(m,t)\,dm}, \eqn{\int_0^1 E(m,t)\,dm}, etc., using
the trapezoidal rule on the solver's mobility grid.
}
\examples{
m <- seq(0, 1, length.out = 31)
f <- dbeta(m, 2, 2)
init <- seair_init(m, f, I_seed = 1e-4)
pars <- seair_params(beta = 1.5, sigma = 0.3, kappa = 0.2,
                     gamma_A = 0.1, gamma_I = 0.13,
                     alpha = 0.5, delta = 0.3)
sol <- seair_solve(init, pars, times = seq(0, 30, by = 2))
agg <- seair_aggregate(sol)
head(agg)

}
