This repository contains the code for Guard-Evo, a safety-aware online RL framework for Type~1 Diabetes management. Guard-Evo first meta-trains a data-driven prior policy using randomized simulations based on the Bergman Minimal Model, then adapts the policy online to patient-specific dynamics. To reduce unsafe interactions during adaptation, a Simplex-style safety guard monitors the adaptive policy and invokes a model-based backup controller synthesized from a linearized Bergman Minimal Model through an LMI-based optimization problem.
This project is using the following settings:
- Ubuntu: 24.04 / 22.04
- python: > 3.9
conda create -n evo python==3.11
conda activate evopip install -r requirement.txtPlease follow the instructions provided in the original simglucose code base at: https://github.com/jxx123/simglucose
python job/env_test/test_env_simglucose.py python job/env_test/test_env_glucose.pyAll scripts to reproduce the results in the paper are included in job/script. One can start any job by following the example below:
bash job/script/simglucos.sh