% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rxOom.R
\name{rxSolveChunked}
\alias{rxSolveChunked}
\title{Solve an ODE model in memory-safe chunks}
\usage{
rxSolveChunked(
  object,
  params = NULL,
  events = NULL,
  inits = NULL,
  ...,
  chunkSize,
  seed = NULL,
  parallel = 0L
)
}
\arguments{
\item{object}{rxode2 model}

\item{params}{model parameters}

\item{events}{event table or \code{rxEtFile}}

\item{inits}{initial conditions}

\item{...}{additional arguments passed to \code{rxControl()}}

\item{chunkSize}{number of subjects per chunk (auto-computed from free RAM if omitted)}

\item{seed}{random seed (sets before solving if not NULL)}

\item{parallel}{number of mirai daemons for parallel chunk solving (0 = serial)}
}
\value{
An \code{rxSolveOom} object
}
\description{
Splits subjects into chunks sized to fit in available RAM, solves each chunk,
and writes output to parquet (or rds) files. Returns an \code{rxSolveOom}
object that lazily reads chunks on demand.
}
\details{
The storage/query engine used by the resulting \code{rxSolveOom} object is
controlled by the \code{rxode2.oom.backend} option:
\describe{
\item{\code{"auto"}}{(default) DuckDB if installed, else arrow, else rds.}
\item{\code{"duckdb"}}{lazy DuckDB SQL queries over arrow-written parquet.}
\item{\code{"arrow"}}{arrow parquet reads/writes, no DuckDB.}
\item{\code{"rds"}}{plain rds files, no arrow or DuckDB.}
}
A requested engine that is not installed silently degrades
(duckdb \eqn{\to} arrow \eqn{\to} rds).
}
