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 only the boluses going into a specific compartment.
§Parameters
p
: The parameters of the model; Use the [fetch_params!] macro to extract the parameters
§Returns
- A hashmap with the lag times for each compartment. If not present, lag 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