Type Alias Fa

pub type Fa = fn(_: &Matrix<f64, Dyn, Const<1>, VecStorage<f64, Dyn, Const<1>>>) -> HashMap<usize, f64>;
Expand description

This closure represents the fraction absorbed (also called bioavailability or protein binding) of the model.

The fa term is used to adjust the amount of drug that is absorbed into the system.

§Parameters

  • p: The parameters of the model; Use the [fetch_params!] macro to extract the parameters

§Returns

  • A hashmap with the fraction absorbed for each compartment. If not present, it is assumed to be 1.

There is a convenience macro [fa!] to create the hashmap

§Example

use pharmsol::*;
let fa = |p| {
  fetch_params!(p, fa);
  fa! {0=>fa, 1=>0.3}
};

This will adjust the amount of drug absorbed into the first compartment by fa and the amount of drug absorbed into the second compartment by 0.3