pmcore::prelude

Type Alias SecEq

pub type SecEq = fn(_: &mut Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>, _: f64, _: &Covariates);
Expand description

This closure represents the secondary equation of the model, secondary equations are used to update the parameter values based on the covariates. Params:

  • p: The parameters of the model; Use the [fetch_params!] macro to extract the parameters
  • t: The time at which the secondary equation is evaluated
  • cov: A reference to the covariates at time t; Use the [fetch_cov!] macro to extract the covariates Example:
use pharmsol::*;
let sec_eq = |p, _t, cov| {
   fetch_params!(p, ka, ke);
   fetch_cov!(cov, t, wt);
   ka = ka * wt;
};