jxx123 / simglucose

A Type-1 Diabetes simulator implemented in Python for Reinforcement Learning purpose
MIT License
232 stars 109 forks source link

Does this simulator has the property of time-delay? #69

Closed Tony-chenjw closed 10 months ago

Tony-chenjw commented 10 months ago

I'm interested in whether this simulator is time-delayed or not? In the provided gym environment, if the patient was injected with certain amount of insulin, would this affect the patient's subcutaneous glucose (or obs) in the following few env steps, other than just next step?

jxx123 commented 10 months ago

Yes, it is time-delayed. The dynamics are defined here https://github.com/jxx123/simglucose/blob/master/simglucose/patient/t1dpatient.py#L119-L208 The ODE follows the UVa/Padova Simulator, which models the insulin delay effect.