Type Alias Lag
pub type Lag = fn(_: &Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>) -> HashMap<usize, f64>;
Expand description
This closure represents the lag time of the model, the lag term delays the only the boluses going into an specific comparment. Params:
- p: The parameters of the model; Use the [fetch_params!] macro to extract the parameters Returns:
- A hashmap with the lag times for each comparment, if not presennt it is assumed to be 0. There is a convenience macro [lag!] to create the hashmap Example:
ⓘ
use pharmsol::*;
let lag = |p| {
fetch_params!(p, tlag);
lag! {0=>tlag, 1=>0.3}
};
This will lag the bolus going into the first compartment by tlag and the bolus going into the second compartment by 0.3