% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/solver.R
\name{seair_solve}
\alias{seair_solve}
\title{Solve the mobility-based SEAIR system}
\usage{
seair_solve(init, params, times, method = "lsoda", ...)
}
\arguments{
\item{init}{A \code{"seair_init"} object from \code{\link{seair_init}}.}

\item{params}{A \code{"seair_params"} object from
\code{\link{seair_params}}.}

\item{times}{Numeric vector of times at which the solution is
reported (must be increasing and include \code{0}).}

\item{method}{Integration method passed to \code{\link[deSolve]{ode}}
(default \code{"lsoda"}).}

\item{...}{Additional arguments passed to \code{\link[deSolve]{ode}}.}
}
\value{
A list of class \code{"seair_solution"} with entries
  \code{times}, \code{m_grid}, \code{S}, \code{E}, \code{A},
  \code{I}, \code{R} (each a matrix of dimension
  \code{length(times)} by \code{length(m_grid)}),
  together with the input \code{params} and \code{init}.
}
\description{
Discretises the mobility-based SEAIR system on the user-supplied
mobility grid (using the trapezoidal rule for the non-local
integral \eqn{\mathcal{K}}) and integrates the resulting coupled
ODE system over \code{times} with \pkg{deSolve}.
}
\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))

}
