oref0 icon indicating copy to clipboard operation
oref0 copied to clipboard

Test openaps using Matlab simulink

Open dehengcai opened this issue 4 years ago • 3 comments

Hello all, I want to test the glucose control performance of the openaps using Matlab simulink. But I am confused about how to connect the openaps to Matlab. Is there any way to achieve this?

dehengcai avatar Apr 23 '21 09:04 dehengcai

I’ve never used Matlab, so you’ll have to be more specific about what it needs.

scottleibrand avatar Apr 23 '21 15:04 scottleibrand

Thank you for your timely reply. More specifically, I want to use Matlab simulink as a virtual patient, which can produce the virtual CGM data to the openaps, and execute the basal rate recommended by the openaps. I have read the source codes of the openaps, but am still confused about the codes. Is the basal rate recommendation algorithm only programmed in the determine-basal.js? If yes, is that say if I can feed the correct inputs into the determine-basal.js, I can get the recommended basal rate from the openaps? Moreover, how do I program the basic information (e.g, ISF, carb ratio and basal rate) of the virtual patient into the openaps.

dehengcai avatar Apr 24 '21 00:04 dehengcai

Take a look at https://github.com/openaps/oref0/blob/dev/bin/oref0-simulator.sh and https://github.com/openaps/oref0/blob/dev/bin/oref0-backtest.sh to see how we did something similar.

scottleibrand avatar Apr 24 '21 04:04 scottleibrand