jxx123 / simglucose

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

Fix empty scenario bug #33

Closed hannesvoss closed 2 years ago

hannesvoss commented 3 years ago

The commit fixes an error that occurs when setting an empty list as a scenario parameter when creating a CustomScenario. At the moment you can either pass no list (input route) or a list with meals. But if you don't want to simulate meals you currently have to set CustomScenario(start_time=t, scenario=[[0,0]]) which doesn't seem very intuitive. This commit allows the use of CustomScenario(start_time=t, scenario=[]).

hannesvoss commented 2 years ago

No problem I am happy to collaborate on this great project. I implemented one of the requested changes but I had to omit the other one because of a failing test 👍🏼