Scientific Model and Formula Registry¶
Scientific rule¶
The equations in this chapter are not calculated by a language model. They are
registered as immutable documentation in
src/iints/core/formula_registry.py and evaluated by deterministic Python code.
The local AI receives the registry only as read-only explanation context.
Registry version: iints-formula-registry-v6
Registered formulas: 15
What 'implemented' means
Implemented means that the equation or stated approximation exists in the cited runtime path. It does not mean that every parameter has been clinically identified for every patient, or that the combined model is a certified clinical simulator.
Model families¶
| Model | Purpose | Strength | Limitation |
|---|---|---|---|
| Custom patient | Fast scenario sweeps and transparent demos | Simple, fast and inspectable | Lower physiological detail |
| Bergman-style model | Compact glucose-insulin ODE research | Familiar minimal-model structure | Extensions go beyond the original minimal model |
| Hovorka-style model | Richer compartmental research physiology | Separates glucose mass, insulin depots and action channels | More parameters and stronger calibration burden |
State and observation separation¶
flowchart LR
I["Inputs<br/>meal, insulin, exercise, stress"] --> P["Latent physiological state<br/>ODE integration"]
P --> B["Blood glucose"]
B --> S["ISF lag + sensor model"]
S --> C["CGM-like observation"]
C --> A["Algorithm input"]
This distinction matters: the algorithm can observe delayed and noisy CGM-like data while the simulator preserves a separate latent physiological state.
Formula catalogue¶
F01 - Bergman-style glucose concentration balance¶
Meaning: glucose moves toward an effective basal state, remote insulin action lowers glucose, and meal, dawn, exercise and renal terms add or remove glucose.
Units: \(G\) in mg/dL; rates in mg/dL/min.
Runtime: src/iints/core/patient/bergman_model.py:_ode
Boundary: a research extension of the Bergman minimal-model structure.
F02 - Remote insulin action¶
Meaning: plasma insulin relative to the pump-supported fasting reference does not act instantly; it builds a slower remote action state that also decays over time. The signed deviation preserves loss of action during basal interruption.
Units: \(X\) in 1/min; \(I\) in mU/L.
Runtime: src/iints/core/patient/bergman_model.py:_ode
F03 - Plasma insulin balance with optional experimental secretion¶
Meaning: plasma insulin is cleared, subcutaneous insulin appears through the absorption chain, and an optional experimental graft term can be enabled.
Units: \(I\) in mU/L; \(R_{a,I}\) in mU/min; \(V_I\) in L.
Runtime: src/iints/core/patient/bergman_model.py:_ode
Boundary: the graft term is disabled by default for T1D profiles and is an
experimental abstraction, not a transplant outcome predictor.
F04 - Two-depot subcutaneous insulin absorption¶
Meaning: delivered insulin enters two subcutaneous depots before reaching the plasma/effect model, creating a physiological delay.
Units: depot mass in mU; input and appearance in mU/min.
Runtime: bergman_model.py:_ode, hovorka_model.py:_ode
Boundary: the absorption time constant is a configured research parameter,
not a molecule-level diffusion simulation.
F05 - Three-compartment meal absorption¶
Meaning: carbohydrate passes through solid stomach, liquid stomach and gut compartments before appearing as glucose.
Units: carbohydrate mass in mg; appearance in mg/min or concentration rate
after volume scaling.
Runtime: bergman_model.py:_ode, hovorka_model.py:_ode
Boundary: inspired by published meal models, but not a complete digestive
or incretin model.
F06 - Hovorka-style glucose mass balance¶
Meaning: accessible and non-accessible glucose masses exchange glucose while insulin action, endogenous production, meals, exercise-related uptake and renal loss alter the balance.
Units: \(Q_1,Q_2\) in mg; fluxes in mg/min; \(G\) in mg/dL.
Runtime: src/iints/core/patient/hovorka_model.py:_ode
Boundary: Hovorka-style research RHS with explicitly documented
extensions.
F07 - Hovorka insulin-action channels¶
Meaning: insulin effects on distribution, disposal and endogenous glucose production have separate response channels and time constants.
Runtime: src/iints/core/patient/hovorka_model.py:_ode
Boundary: configured sensitivity scalars are scenario assumptions. Protein
confidence or ClinVar classification is not allowed to calculate these values.
F08 - Stress and exercise modifiers¶
Meaning: scenario inputs pass through first-order pseudo-hormone states instead of changing sensitivity instantaneously.
Units: dimensionless states; time constants in minutes.
Runtime: src/iints/core/patient/hovorka_model.py:_ode
Boundary: this is a stress/exercise abstraction, not a measured cortisol or
adrenaline assay model.
F09 - Exercise-driven GLUT4/NIMGU state¶
Meaning: exercise can increase non-insulin-mediated glucose uptake through a bounded activation state.
Runtime: src/iints/core/patient/hovorka_model.py:_ode
Boundary: educational systems-level approximation, not a cell-level
translocation simulation.
F10 - Circadian and dawn EGP multiplier¶
Meaning: a small gated Fourier series can modulate endogenous glucose production by time of day.
Runtime: src/iints/core/patient/hovorka_model.py:_ode
Boundary: off or weak by default; it is not a personalised circadian model.
F11 - Endogenous hypoglycaemia rescue multiplier¶
Meaning: low glucose can increase endogenous rescue, while a high HAAF memory state blunts the response.
Runtime: bergman_model.py:_ode, hovorka_model.py:_ode
Boundary: captures a concept of counterregulation; it is not a diagnostic
model of hypo awareness.
F12 - HAAF memory¶
Meaning: repeated low-glucose exposure increases a bounded memory state that slowly decays.
Units: dimensionless state; rates in 1/min.
Runtime: bergman_model.py:_ode, hovorka_model.py:_ode
Boundary: research memory only; never report it as a patient diagnosis.
F13 - Exogenous glucagon PK/PD¶
Meaning: a research glucagon request passes through two subcutaneous depots, plasma appearance and a slower action state affecting endogenous glucose production.
Runtime: bergman_model.py:_ode, hovorka_model.py:_ode
Boundary: dual-hormone simulation only; not a real pump recommendation.
F14 - Smooth renal glucose clearance¶
Meaning: glucose loss above an approximate renal threshold increases smoothly instead of switching on at a discontinuous hard cutoff.
Runtime: src/iints/core/patient/physiology.py:smooth_threshold_excess,
bergman_model.py:_ode, hovorka_model.py:_ode
Boundary: the threshold and splay are configurable research
approximations.
F15 - CGM blood-to-ISF observation¶
Meaning: the algorithm sees a delayed interstitial signal with configured bias, drift, seeded noise and optional compression artifact rather than perfect blood glucose.
Units: mg/dL.
Runtime: src/iints/core/devices/models.py:SensorModel.read
Boundary: models qualitative CGM behaviour; it does not reproduce a named
commercial sensor exactly.
Numerical solution and reproducibility¶
The ODE-based models use scipy.solve_ivp over simulator steps. Runtime guards
check finite values and constrain implausible transitions. Controlled
stochastic components, such as sensor noise or synthetic populations, use
explicit seeds and preserved local random state.
The same configuration, software version and seed should reproduce the same run path. Reproducibility is checked through replay and golden-vector tests, but floating-point and dependency changes must still be recorded in manifests.
Scientific sources behind the registry¶
The main foundations are:
- Bergman et al., minimal-model insulin sensitivity, DOI 10.1152/ajpendo.1979.236.6.E667.
- Hovorka et al., nonlinear model predictive control and T1D physiology, DOI 10.1088/0967-3334/25/4/010.
- Dalla Man et al., meal glucose-insulin model, DOI 10.1109/TBME.2007.893506.
- Cryer, hypoglycaemia-associated autonomic failure, DOI 10.1056/NEJMra1215228.
- Hummel et al., renal glucose handling, DOI 10.1007/s00125-018-4656-5.
- Richter and Hargreaves, exercise and GLUT4, DOI 10.1152/physrev.00038.2012.
The complete source legend and the validation wording are maintained in Scientific Evidence and Source Legend.
How to explain the mathematics to a jury¶
Use this sequence:
- Food does not enter the blood instantly; it passes through meal compartments.
- Delivered insulin does not act instantly; it passes through subcutaneous and action compartments.
- The patient model calculates hidden physiological state.
- The sensor adds interstitial delay and measurement effects.
- The algorithm sees the sensor observation, not perfect glucose.
- Fixed safety rules check the proposed action.
- Every value shown in the report comes from recorded deterministic output, not from an LLM.