Artificial-Pancreas / iAPS

MIT License
176 stars 720 forks source link

IOB limit on the profil doesn't limit at desire value #804

Closed charlesstyves closed 2 months ago

charlesstyves commented 2 months ago

20240807_113424000_iOS 20240807_113444000_iOS 20240807_113502000_iOS 20240807_113515000_iOS log.txt log_prev.txt NightScout

As discussed in the Discord Channel, the IOB limit on the profil seem to doesn't been take in consideration. On the example, the Night ("Nuit") profil as was active with a limit of 0.5. The algorithm as continue to give micro-bolus after this limit has been reach 02h15 in the morning. See iAPS screen shot, NightScout commented and logs files for more details.

If you need more information, dont hesitate.

Jon-b-m commented 2 months ago

Problem is your screenshot is from 7:34 with IOB 1.34U and not from 02:15 when you're claiming the IOB was exceeding 0.5 U.

Can you please tell me when the override was enabled and exactly for how long and also show me the Loopalyzer screenshot (to see the actual IOB before and during this period.

charlesstyves commented 2 months ago

You're right, LoopAnalyzer is better to show you the IOB value than de Nightscout with comments screen shot that I putted before. The override is enabled at 23h00 for 480 min. (until 07h00). The second graph is too confirm that the Night ("Nuit") profil was active. See below for the graphs.

LoopAnalyzer Nightscout

Jon-b-m commented 2 months ago

Thanks. Yes If Loopalyser is 100 accurate then it seems the 0.5 limit was slightly exceeded for a period of time (around 40 minutes). Can I please see your logs also, to see what oref0 decisions (loops) were made during this period and if perhaps some issues were preventing loops (out of contact etc.).

charlesstyves commented 2 months ago

See below the log files :

https://github.com/user-attachments/files/16536552/log.txt

https://github.com/user-attachments/files/16536553/log_prev.txt

Don’t know if it could change somethings, but I’m on iOS 16. Looking to change the iPhone to prevent some unwanted issue.

Jon-b-m commented 2 months ago

Your last log entry is at 01:19 08/07. Why? I need the logs for period of your issue, please. Unless I'm looking at the wrong date? Which date is it?

Did you cut pieces out from the logs? the log_prev is not containing the entire period (last entry is 22:17.29), meaning the override is not in the logs. It should end at end of day at 00:00 when logs are complete.

I unfortunately can't use these logs since the relevant time period is not included (cut out?)...

charlesstyves commented 2 months ago

I dont understand why the log period isn't there. No, I didn't cut anything. I had extract it in the morning, at the same time of the screen shot (07h34).

I just did a extraction of the log file again, just to see. It work as you describe, starting at 00:00 until now for log.txt file and the full yesterday period from 00:00 to 23:59 for the log_prev.txt. I suppose that the log file for 08/07 is now lost...

After the extraction, I did tonight the update to 4.8.0. I will continue to monitor the situation and if it happen again, I would came back here to put all the required file. If in some days I didn't see it happen again, I will probably made a test profil with a IOB limit of 0.1 to check if SMB/UAM are given or not.

Thanks.

charlesstyves commented 2 months ago

After swithching to V4.8.0, I did the monitoring as describe before. I still see that the profil IOB limit of 0.5 wasn't respected overt the night. So, I decided to made a test by creating a Test profil with an IOB limit of 0.1. Surprise, no SMB/UAM was delivered on a rise BG period.

To push deeper the test, I did the following test this morning on my iPhone iAPS simulator (iOS 17 with V.4.8.0) :

9h30 to 10h00 : No profil active. SMB/UAM are delivered. iPhone wasn't lock open, so some loop hasn't been executed. 10h00 : Lock iPhone open with iAPS app open. 10h00 to 10h33 : Profil test with IOB limit of 0.5 activated throught iAPS. No SMB/UAM are delivered. 10h33 to 11h15 : Same profil test, but this time, activated throught iPhone shortcut. SMB/UAM are delivared and IOB was over 0.5.

During the test, basal rate was set to 0.1 with SMB/UAM minutes of 120 minutes (max. SMB/UAM of 0.2). Profil SMB/UAM minutes was set to 60 minutes. During 10h33 to 11h15, SMB/UAM delivered was 0.1, so it confirmed that the profil was really activated. Simply don't know why it doesn't consider the IOB limit if it's activated throught a shortcut.

Profil configuration : 100% 60SMB 60UAM MAX IOB: 0.5

Hope this would help to find the problem.

Log file : log.txt

10h32 : Profil activated throught iAPS before activate him with the Shortcut app

10h56 : Profil activted throught iPhone shortcut

11h11 : Profil activted throught iPhone shortcut

Full period graph : Full periode graph

Jon-b-m commented 2 months ago

Resolved here https://github.com/Artificial-Pancreas/iAPS/commit/2c54e1bffbeee8776029e63423e42885bd6cdd70 in dev branch.

The Max IOB property wasn't saved when enabling override preset via shortcut.

charlesstyves commented 2 months ago

Thanks!