PD models¶
- class BIS_model(hill_model: str = 'Bouillon', hill_param: list | None = None, random: bool | None = False, truncated: float | None = None, ts: float = 1, **kwargs)¶
Bases:
objectModel to link Propofol effect site concentration to BIS.
The equation is:
\[BIS = E0 - Emax * \frac{U^\gamma}{1+U^\gamma}\]If only the effect of propofol is considered the equation represents a sigmoid function, where:
\[U = \frac{C_{p,es}}{C_{p,50}}\]If the interaction with remifentanil is considered the equation represents a Surface Response model, where:
\[U = \frac{U_p + U_r}{1 - \beta \theta + \beta \theta^2}\]for Minto-type surface model and:
\[U = U_p + U_r + \beta U_p U_r\]for Greco-type surface model, with:
\[U_p = \frac{C_{p,es}}{C_{p,50}}\]\[U_r = \frac{C_{r,es}}{C_{r,50}}\]\[\theta = \frac{U_p}{U_r+U_p}\]- Parameters:
- hill_modelstr, optional
‘Vanluchene’[Vanluchene2004], do not consider the synergistic effect of remifentanil. ‘Eleveld’[Eleveld2018], do not consider the synergistic effect of remifentanil. ‘Bouillon’[Bouillon2004], considers the synergistic effect of remifentanil (Minto-type surface model). ‘Fuentes’[Fuentes2018], considers the synergistic effect of remifentanil (Greco-type surface model). ‘Yumuk’[Yumuk2024], considers the synergistic effect of remifentanil (Greco-type). Ignored if hill_param is specified. Default is ‘Bouillon’.
- hill_paramlist, optional
Parameters of the model list [c50p_BIS, c50r_BIS, gamma_BIS, beta_BIS, E0_BIS, Emax_BIS, Delay_BIS]:
c50p_BIS: Concentration at half effect for propofol effect on BIS (µg/mL).
c50r_BIS: Concentration at half effect for remifentanil effect on BIS (ng/mL). If it is equal to zero the interaction with remifentanil is not considered.
gamma_BIS: Slope coefficient for the BIS model.
beta_BIS: Interaction coefficient for the BIS model (beta_BIS = 0 signifies an additive interaction, beta_BIS > 0 indicates synergy).
E0_BIS: Initial BIS.
Emax_BIS: Max effect of the drugs on BIS.
Delay_BIS: Delay affecting the BIS (s)
The default is None. If Delay_BIS is not provided it is assumed equal to 0.
- randombool, optional
Add uncertainties in the parameters. Ignored if hill_param is specified. The default is False.
- tsfloat
Sampling time, in s.
- truncatedfloat, optional
If not None it correspond to the number of standard deviation after which the distribution are truncated for generating uncertain parameters. The default is None.
- Attributes:
- c50pfloat
Concentration at half effect for propofol effect on BIS (µg/mL).
- c50rfloat
Concentration at half effect for remifentanil effect on BIS (ng/mL). If it is equal to zero the interaction with remifentanil is not considered.
- gammafloat
Slope coefficient for the BIS model.
- betafloat
Interaction coefficient for the BIS model (beta_BIS = 0 signifies an additive interaction, beta_BIS > 0 indicates synergy).
- E0float
Initial BIS.
- Emaxfloat
Max effect of the drugs on BIS.
- bis_delayfloat
Delay time on the output of the BIS model (s)
- hill_paramlist
Parameters of the model list [c50p_BIS, c50r_BIS, gamma_BIS, beta_BIS, E0_BIS, Emax_BIS, Delay_BIS]
- c50p_initfloat
Initial value of c50p, used for blood loss modelling.
- hill_modelstr
‘Vanluchene’[Vanluchene2004], do not consider the synergistic effect of remifentanil. ‘Eleveld’[Eleveld2018], do not consider the synergistic effect of remifentanil. ‘Bouillon’[Bouillon2004], considers the synergistic effect of remifentanil (Minto-type). ‘Fuentes’[Fuentes2018], considers the synergistic effect of remifentanil (Greco-type). ‘Yumuk’[Yumuk2024], considers the synergistic effect of remifentanil (Greco-type).
- tsfloat
Sampling time, in s.
References
[Bouillon2004] (1,2)T. W. Bouillon et al., “Pharmacodynamic Interaction between Propofol and Remifentanil Regarding Hypnosis, Tolerance of Laryngoscopy, Bispectral Index, and Electroencephalographic Approximate Entropy,” Anesthesiology, vol. 100, no. 6, pp. 1353–1372, Jun. 2004, doi: 10.1097/00000542-200406000-00006.
[Vanluchene2004] (1,2)A. L. G. Vanluchene et al., “Spectral entropy as an electroencephalographic measure of anesthetic drug effect: a comparison with bispectral index and processed midlatency auditory evoked response,” Anesthesiology, vol. 101, no. 1, pp. 34–42, Jul. 2004, doi: 10.1097/00000542-200407000-00008.
[Eleveld2018] (1,2)D. J. Eleveld, P. Colin, A. R. Absalom, and M. M. R. F. Struys, “Pharmacokinetic–pharmacodynamic model for propofol for broad application in anaesthesia and sedation” British Journal of Anaesthesia, vol. 120, no. 5, pp. 942–959, mai 2018, doi:10.1016/j.bja.2018.01.018.
- compute_bis(c_es_propo, c_es_remi=None)¶
Compute BIS function from propofol (and optionally remifentanil) effect site concentration.
If the BIS model chosen considers only the effect of propofol the effect site concentration of remifentanil is ignored. Inputs can be either nd.array or float, the format of the output will be the same as the input
- Parameters:
- c_es_propofloat
Propofol effect site concentration µg/mL.
- c_es_remifloat, optional
Remifentanil effect site concentration ng/mL. The default is 0.
- Returns:
- BISfloat
Bis value.
- full_sim(c_es_propo: ndarray, c_es_remi: ndarray | None = None) ndarray¶
Simulate BIS model with a given input.
- Parameters:
- c_es_proponp.ndarray
List of propofol effect site concentrations (µg/ml).
- c_es_reminp.ndarray, optional
List of remifentanil effect site concentrations (ng/ml).
- Returns:
- np.ndarray
List of the output BIS values during the simulation.
- inverse_hill(BIS: float, c_es_remi: float | None = 0) float¶
Compute Propofol effect site concentration from BIS (and optionally Remifentanil effect site concentration if the BIS model chosen takes into acount interaction) .
- Parameters:
- BISfloat
BIS value.
- cerfloat, optional
Effect site Remifentanil concentration (ng/mL). The default is 0.
- Returns:
- cepfloat
Effect site Propofol concentration (µg/mL).
- one_step(c_es_propo: float, c_es_remi: float | None = 0) float¶
Compute one step time of the BIS model
- Parameters:
- c_es_propofloat
Propofol effect site concentration (µg/mL).
- c_es_remifloat, optional
Remifentanil effect site concentration (ng/mL). The default is 0.
- Returns:
- BISfloat
Bis value.
- plot_surface()¶
Plot the 3D-Hill surface of the BIS related to Propofol and Remifentanil effect site concentration or the 2-D Hill curve of the BIS related to Propofol effect site concentration according to the BIS model chosen
- update_param_blood_loss(v_ratio: float)¶
Update PK coefficient to mimic a blood loss.
Update the c50p parameters thanks to the blood volume ratio. The values are estimated from [Johnson2003].
- Parameters:
- v_lossfloat
blood volume as a fraction of init volume, 1 mean no loss, 0 mean 100% loss.
- Returns:
- None.
References
[Johnson2003]K. B. Johnson et al., “The Influence of Hemorrhagic Shock on Propofol: A Pharmacokinetic and Pharmacodynamic Analysis,” Anesthesiology, vol. 99, no. 2, pp. 409–420, Aug. 2003, doi: 10.1097/00000542-200308000-00023.
- class Hemo_meca_PD_model(age: float, ts: float, model: str = 'Su', nore_model: str = 'Beloeil', random: bool = False, truncated: bool = False, hr_base: float = None, sv_base: float = None, map_base: float = None)¶
Bases:
objectThis class implements the mechanically based model of Haemodynamics proposed in [Su2023].
See section Hemodynamics for detail about the model implemented here.
- Parameters:
- agefloat
Age of the patient in years.
- tsfloat
Sampling time in seconds.
- modelstr, optional
Model to use, ‘Su’ (see [Su2023]) and ‘VitalDB’ (see Disturbance Modelling and Identification) are available. The default is ‘Su’.
- nore_modelstr, optional
Model to use for norepinephrine, ‘Beloeil’ and ‘Oualha’ are available. The default is ‘Beloeil’.
- randombool, optional
Add uncertainties in the parameters. The default is False.
- hr_basefloat, optional
Baseline heart rate (bpm). The default is None, which will use the value from the Su model.
- sv_basefloat, optional
Baseline stroke volume (mL). The default is None, which will use the value from the Su model.
- map_basefloat, optional
Baseline mean arterial pressure (mmHg). The default is None, which will use the value from the Su model.
- truncatedbool, optional
Use truncated normal distribution (between [-3, +3] std) for the random parameters. The default is False.
References
[Su2023] (1,2)H. Su, J. V. Koomen, D. J. Eleveld, M. M. R. F. Struys, and P. J. Colin, “Pharmacodynamic mechanism-based interaction model for the haemodynamic effects of remifentanil and propofol in healthy volunteers,” British Journal of Anaesthesia, vol. 131, no. 2, pp. 222–233, Aug. 2023. doi:10.1016/j.bja.2023.04.043.
[Beloeil2005]H. Beloeil, J.-X. Mazoit, D. Benhamou, and J. Duranteau, “Norepinephrine kinetics and dynamics in septic shock and trauma patients,” BJA: British Journal of Anaesthesia, vol. 95, no. 6, pp. 782–788, Dec. 2005. doi:10.1093/bja/aei259.
[Oualha2014]M. Oualha et al., “Population pharmacokinetics and haemodynamic effects of norepinephrine in hypotensive critically ill children,” British Journal of Clinical Pharmacology, vol. 78, no. 4, pp. 886–897, 2014. doi:10.1111/bcp.12412.
- continuous_dynamic(x: ndarray, u: ndarray) ndarray¶
Define the continuous dynamic of the haemodynamic system.
For implementation details see supplementary material nb 6 of the paper of Su and co-authors.
- Parameters:
- xnp.ndarray
state array composed of tpr, sv, hr, ltde_sv, ltde_hr.
- u: np.ndarray
u = [cp_propo, cp_remi, map_wanted, sv_wanted, tpr_stim, sv_stim, hr_stim], plasma concentration of propofol (µg/ml) and remifentanil (ng/ml), map wanted (for norepinephrine simulation), sv_wanted (for blood loss simulation) and stimuli value for stimuli application.
- Returns:
- d x / dtnp.ndarray
temporal derivative of the state array.
- continuous_dynamic_sys(t, x, u)¶
Same as continuous_dynamic but with time as first arguments (for scipy simulation).
- full_sim(cp_propo: ndarray, cp_remi: ndarray, cp_nore: ndarray, disturbances: ndarray = None, x0: ndarray | None = None) ndarray¶
Simulate hemodynamic model with a given input.
- Parameters:
- c_proponp.ndarray
list of plasma concentration of propofol (µg/ml).
- cp_reminp.ndarray
list of plasma concentration of remifentanil (ng/ml).
- cp_norenp.ndarray
list of plasma concentration of norepinephrine (ng/ml).
- disturbancenp.ndarray
N*3 array of distrubance signal for TPR, SV and HR.
- x0np.ndarray, optional
Initial state. The default is None.
- Returns:
- np.ndarray
List of the output value during the simulation.
- initialized_at_given_concentration(cp_propo_eq: float = 0, cp_remi_eq: float = 0, cp_nore_eq: float = 0) None¶
Initialize the haemodynamic model at a given concentration.
- Parameters:
- c_propofloat
plasma concentration of propofol at equilibrium (µg/ml).
- cp_remifloat
plasma concentration of remifentanil at equilibrium (ng/ml).
- cp_norefloat
plasma concentration of norepinephrine at equilibrium (ng/ml).
- Returns:
- None
The haemodynamic model is initialized at the given concentration.
- nore_map_effect(cp_nore: float)¶
Compute Norepinephrine effect on MAP.
- Parameters:
- c_norefloat
Concentration of Norepinephrine (ng/mL)
- one_step(cp_propo: float = 0, cp_remi: float = 0, cp_nore: float = 0, v_ratio: float = 1, disturbances: list = None) ndarray¶
Compute one step time of the hemodynamic system.
It use Runge Kutta 4 to compute the non-linear integration.
- Parameters:
- c_propofloat
current plasma concentration of propofol (µg/ml), default is 0.
- cp_remifloat
current plasma concentration of remifentanil (ng/ml), default is 0.
- cp_norefloat
current plasma concentration of norepinephrine (ng/ml), default is 0.
- v_ratiofloat
blood volume as a fraction of init volume, 1 mean no loss, 0 mean 100% loss, default is 1.
- disturbanceslist
disturbance on TPR, SV, and HR (in this order). The default is [0]*3.
- output_function(x: ndarray, dist: ndarray = array([0., 0., 0.])) ndarray¶
Compute final signals value from state and disturbance value.
- Parameters:
- xnp.ndarray
state of the system
- Returns:
- np.ndarray
Total peripheral resistance (mmHg min/ mL), Stroke volume (ml), heart rate (beat / min), mean arterial pressure (mmHg), cardiac output (L/min)
- state_at_equilibrium(cp_propo_eq: float = 0, cp_remi_eq: float = 0, cp_nore_eq: float = 0, disturbances: list = None, x0: ndarray = None) ndarray¶
Solve the problem f(x,u)=0 for the continuous dynamique with a given u.
- Parameters:
- c_propofloat
plasma concentration of propofol at equilibrium (µg/ml).
- cp_remifloat
plasma concentration of remifentanil at equilibrium (ng/ml).
- cp_norefloat
plasma concentration of norepinephrine at equilibrium (ng/ml).
- disturbance: list
disturbance on TPR, SV, and HR (in this order). The default is [0]*3.
- x0np.ndarray, optional
Initial state. The default is None.
- Returns:
- np.ndarray
List of the output value at equilibrium.
- class LOC_model(hill_model: str = 'Kern', hill_param: list | None = None, random: bool | None = False, ts: float = 1, truncated: float | None = None)¶
Bases:
objectPropofol + Remifentanil -> LOC (Loss of Consciousness) model (Greco-type interaction).
The equation is:
\[LOC = \frac{U^\gamma}{1+U^\gamma}\]with the Greco-type surface response model:
\[U = U_p + U_r + \beta U_p U_r\]where
\[U_p = \frac{C_{p,es}}{C_{p,50}}\]\[U_r = \frac{C_{r,es}}{C_{r,50}}\]- Parameters:
- hill_modelstr, optional
‘Kern’[Kern2004], considers the synergistic effect of remifentanil (Greco-type surface model). ‘Mertens’[Mertens2003], considers the synergistic effect of remifentanil (Greco-type surface model). ‘Johnson’[Johnson2008], considers the synergistic effect of remifentanil (Greco-type surface model). Ignored if hill_param is specified. Default is ‘Kern’.
- hill_paramlist, optional
Parameters of the model list [c50p_LOC, c50r_LOC, gamma_LOC, beta_LOC]: - c50p_LOC: Concentration at half effect for propofol effect on LOC (µg/mL). - c50r_LOC: Concentration at half effect for remifentanil effect on LOC (ng/mL). - gamma_LOC: Slope coefficient for the LOC model. - beta_LOC: Interaction coefficient for the LOC model (beta_LOC = 0 signifies an additive interaction, beta_LOC > 0 indicates synergy).
- randombool, optional
Add uncertainties in the parameters. Ignored if hill_param is specified. The default is False.
- tsfloat
Sampling time, in s.
- truncatedfloat, optional
If not None it correspond to the number of standard deviation after which the distribution are truncated for generating uncertain parameters. The default is None.
- Attributes:
- c50pfloat
Concentration at half effect for propofol effect on LOC (µg/mL).
- c50rfloat
Concentration at half effect for remifentanil effect on LOC (ng/mL).
- gammafloat
Slope coefficient for the LOC model.
- betafloat
Interaction coefficient for the LOC model (beta_LOC = 0 signifies an additive interaction, beta_LOC > 0 indicates synergy).
- hill_paramlist
Parameters of the model list [c50p_LOC, c50r_LOC, gamma_LOC, beta_LOC]
- hill_modelstr
‘Kern’ [Kern2004], considers the synergistic effect of remifentanil (Greco-type). ‘Mertens’ [Mertens2003], considers the synergistic effect of remifentanil (Greco-type). ‘Johnson’ [Johnson2008], considers the synergistic effect of remifentanil (Greco-type).
- tsfloat
Sampling time, in s.
References
[Kern2004] (1,2)S. E. Kern et al. “A response surface analysis of propofol-remifentanil pharmacodynamic interaction in volunteers.” Anesthesiology 100.6 (2004): 1373-1381. doi : 10.1097/00000542-200406000-00007
- compute_loc(c_es_propo, c_es_remi)¶
Compute LOC function (0-1) from propofol and remifentanil effect site concentration.
LOC = 0 means fully awake, LOC = 1 deep LOC
- Parameters:
- c_es_propofloat
Propofol effect site concentration µg/mL.
- c_es_remifloat, optional
Remifentanil effect site concentration ng/mL.
- Returns:
- LOCfloat
LOC value.
- plot_surface()¶
Plot the 3D-Hill surface of the LOC related to Propofol and Remifentanil effect site concentration
- class TOF_model(hill_model: str = 'Weatherley', hill_param: dict | None = None)¶
Bases:
objectModel to link Atracurium effect site concentration to train-of-four (TOF).
The equation is:
\[TOF = \frac{100*C_{50}^\gamma}{C_{50}^\gamma + C_e^\gamma}\]- Parameters:
- hill_modelstr, optional
‘Weatherley’ [Weatherley1983] Ignored if hill_param is specified. Default is ‘Weatherley’.
- hill_paramdict, optional
Parameters of the model:
‘c50’: Half effect concentration (µg/mL).
‘gamma’: Stepness of the Hill curve.
If it is not provided default values are used.
- Attributes:
- c50pfloat
Concentration at half effect for atracurium effect on TOF (µg/mL).
- gammafloat
slope coefficient for the Hill curve.
- hill_modelstr
‘Weatherley’ [Weatherley1983]
References
- compute_tof(Ce)¶
Compute TOF from atracurium effect site concentration.
- Parameters:
- Cefloat
Atracurium effect site concentration (µg/mL).
- Returns:
- TOFfloat
TOF value.
- plot_surface()¶
Plot the 2D-Hill curve of the train-of-four (TOF) related to Atracurium effect site concentration
- class TOL_model(model: str | None = 'Bouillon', model_param: list | None = None, random: bool | None = False, truncated: float | None = None)¶
Bases:
objectHierarchical model to link drug effect site concentration to Tolerance of Laringoscopy.
The equation are:
\[postopioid = preopioid * \left(1 - \frac{C_{r,es}^{\gamma_r}}{C_{r,es}^{\gamma_r} + (C_{r,50} preopioid)^{\gamma_r}}\right)\]\[TOL = \frac{C_{p,es}^{\gamma_p}}{C_{p,es}^{\gamma_p} + (C_{p,50} postopioid)^{\gamma_p}}\]- Parameters:
- modelstr, optional
Only ‘Bouillon’ is available. Ignored if model_param is specified. The default is ‘Bouillon’.
- model_paramlist, optional
Model parameters, model_param = [c50p, c50p, gammaP, gammaR, Preopioid intensity]. The default is None.
- randombool, optional
Add uncertainties in the parameters. Ignored if model_param is specified. The default is False.
- truncatedfloat, optional
If not None it correspond to the number of standard deviation after which the distribution are truncated for generating uncertain parameters. The default is None.
- Attributes:
- c50pfloat
Concentration at half effect for propofol effect on BIS (µg/mL).
- c50rfloat
Concentration at half effect for remifentanil effect on BIS (ng/mL).
- gamma_pfloat
Slope of the Hill function for propofol effect on TOL.
- gamma_rfloat
Slope of the Hill function for remifentanil effect on TOL.
- pre_intensityfloat
Preopioid intensity.
- compute_tol(c_es_propo: float, c_es_remi: float) float¶
Return TOL from Propofol and Remifentanil effect site concentration.
Compute the output of the Hirarchical model to predict TOL from Propofol and Remifentanil effect site concentration. TOL = 1 mean very relaxed and will tolerate laryngoscopy while TOL = 0 mean fully awake and will not tolerate it.
- Parameters:
- cepfloat
Propofol effect site concentration µg/mL.
- cerfloat
Remifentanil effect site concentration ng/mL
- Returns:
- TOLfloat
TOL value.
- plot_surface()¶
Plot the 3D-Hill surface of the BIS related to Propofol and Remifentanil effect site concentration.
- fsig(x, c50, gam)¶