Skip to content

IINTS-AF SDK v1.5.14 Release Notes

Release date: 2026-06-12

v1.5.14 is a realism hardening release for the scientific-overhaul branch. It keeps the SDK pre-clinical and research-oriented, but fixes the places where the implementation, tests, and public explanation had drifted apart.

What Changed

1. AdvancedMetabolicModel Runtime Fix

The 18-state AdvancedMetabolicModel can now be created through PatientFactory using:

PatientFactory.create_patient(patient_type="advanced")
PatientFactory.create_patient(patient_type="advanced_metabolic")

The model update path now accepts both the modern simulator argument names and the older scratch-script aliases:

model.update(time_step=5.0, delivered_insulin=0.8, carb_intake=30.0)
model.update(dt_minutes=5.0, delivered_glucagon=0.0, current_time_minutes=60.0)

This prevents the previous TypeError where the advanced model called the parent Bergman model with mismatched keyword names.

2. 18-State Mathematical Core

The documented state vector now matches the code:

\[ y = [G, X, I, Q_{sto1}, Q_{sto2}, Q_{gut}, S_1, S_2, Y_1, Y_2, \Gamma, x_{gluc}, HAAF, F, K, \beta, Q_{fat}, Q_{prot}] \]

Key equations implemented in the model include:

\[ \frac{dF}{dt}=\ell_0 e^{-\ell_1 I}-k_fF \]
\[ \frac{dK}{dt}=k_0Fe^{-k_1I}-k_2K \]
\[ L(F)=\frac{0.4}{\max(0.4,F)} \]
\[ p_{3,eff}=p_3 M_{exercise} M_{stress} L(F) M_{illness} M_{cycle} \]
\[ \frac{d\beta}{dt}=-a\beta \]
\[ \frac{dQ_{fat}}{dt}=-\frac{Q_{fat}}{240} \]
\[ \frac{dQ_{prot}}{dt}=-\frac{Q_{prot}}{300} \]
\[ R_{a,prot}=\frac{0.5\,Q_{prot}}{300}\cdot\frac{1000}{V_g} \]
\[ \frac{dG}{dt}=-XG+EGP+R_a+R_{a,prot}-U_{exercise}-RGC \]

3. Supervisor Safety Math Kept Backward-Compatible

The IndependentSupervisor still exposes the same action text expected by existing tests and dashboards, while documenting the stricter pharmacodynamic cap:

\[ B_{safe}=\max(0, IOB_{max}-IOB_t) \]

For predicted momentum risk, the supervisor checks the 30-minute no-new-insulin trajectory:

\[ \hat{G}_{t+30}=G_t+30\cdot\frac{dG}{dt} \]

If that trajectory crosses the severe hypoglycemia boundary, insulin is blocked:

\[ \hat{G}_{t+30}\le 54 \Rightarrow B_{final}=0 \]

4. Realism Validator Tuned for Pump-Like Data

The realism validator now distinguishes large meals from small snack/noise annotations. Large meals are assessed for meal-insulin-glucose causality; small snacks no longer make the whole trace fail spuriously.

The validator also allows realistic correction windows while still rejecting clearly late meal boluses:

\[ -90 \le t_{meal}-t_{insulin} \le 75 \]

A bolus first appearing about two hours after a meal is still flagged as a causal mismatch.

5. Simulator Event Routing

Scenario illness events now call start_illness() on models that support it. Older models still fall back to stress behavior, so existing scenarios remain compatible.

6. Scientific Claims Clean-Up

The docs no longer present the simulator as clinically validated or "true-to-life". The corrected framing is:

  • pre-clinical simulation
  • controlled assumptions
  • physiological stress testing
  • not a medical device and not patient-care software

Verification

The full local test suite passed:

PYTHONPATH=src python3 -m pytest -q -p no:cacheprovider
# 549 passed, 4 skipped

Focused realism and scientific-fidelity checks also passed:

PYTHONPATH=src python3 -m pytest -q -p no:cacheprovider tests/data/test_realism_validator.py tests/test_presets_realism.py
# 16 passed

PYTHONPATH=src python3 -m pytest -q -p no:cacheprovider tests/core/test_advanced_metabolic_model.py tests/test_scientific_fidelity.py

Build verification:

python3 -m build

Generated artifacts:

  • dist/iints_sdk_python35-1.5.14.tar.gz
  • dist/iints_sdk_python35-1.5.14-py3-none-any.whl

Notes

The build still emits non-fatal setuptools warnings for legacy entry-point names containing spaces. Those names are kept for compatibility and should be cleaned up in a separate deprecation release.