These are chat archives for nightscout/intend-to-bolus
Thank you! I can send it to you @bustavo. I am about to private message you.
I also happened to find MATLAB code of the controller I wanted to use, and it's very close to "all of the code". It is designed to minimize risk of hypoglycemia and hyperglycemia and is the only controller that can adjust for "missed meals" (I forget to bolus like once a month). The thesis with the MATLAB code can be found here, and the target is set to 112.5 (it's a nice number geometrically), https://stacks.stanford.edu/file/druid:jf647rq8653/Thesis-augmented.pdf . However, the risk of hypoglycemia is minimized at 140, and has been used as a target of 140, as seen here, with unannounced meals http://online.liebertpub.com/doi/abs/10.1089/dia.2014.0093 . I am going for 112.5 though.