rxSolveAdjointRk4: Solve a model with an in-engine discrete-adjoint ('s') method

View source: R/adjointDiscrete.R

rxSolveAdjointRk4R Documentation

Solve a model with an in-engine discrete-adjoint (s) method

Description

Applies the (cached) adjoint expansion, solves with the requested adjoint method, and drops the internal ⁠rx__adj*⁠ lhs, returning the full-trajectory ⁠rx__sens_<state>_BY_<param>__⁠ columns. The stiff analytic Jacobian is emitted into the expansion automatically, inferred from method.

Usage

rxSolveAdjointRk4(
  object,
  events,
  params = NULL,
  calcSens,
  method = "rk4s",
  ...
)

Arguments

object

model definition accepted by rxode2().

events

an rxode2 event table / data set.

params

optional named parameter vector or data frame (per subject).

calcSens

character vector of parameters to differentiate w.r.t.

method

adjoint solve method (default "rk4s"). May be a composite ("dop853s+ros4s").

...

passed to rxSolve().

Value

the solved data frame with ⁠rx__sens_<state>_BY_<param>__⁠ columns.

Author(s)

Matthew L. Fidler


rxode2 documentation built on July 28, 2026, 5:08 p.m.