Description of the algorithm for Trio before oref0 call : override, temp target and TDD #214
Replies: 3 comments 1 reply
-
In regard of the documentation, I noticed :
To check @MikePlante1 @bjornoleh and others oref0 experts |
Beta Was this translation helpful? Give feedback.
-
Thanks for the analysis! Just a quick note for now:
|
Beta Was this translation helpful? Give feedback.
-
Great summary Pierre, thanks for collecting all that info 👏 Around profiles and SMB enablement / disablement, iAPS also introduced a hard limit for HIGH glucose readings (it’s hidden from the actual configs of the overrides in the UI and swift code, but present in JS):
Found here in Just to add to this - it’s somewhat connected to overrides, but only indirectly. Wanted to mention it here. |
Beta Was this translation helpful? Give feedback.
-
I analysed the different part of code where Trio prepares data to send to oref0 algorithms. It seems important to check the specification is correct before any eventual changes in the code. I also checked in iAPS V4 where a part of code has moved in prepare.js :
Override
Override UX allows to define :
Override is used to modify the profile before oref0 call :
- if new max IOB, change the value of max IOB in the profile (not in Trio)
Temp Target
Temp target allows to define :
Temp target is used to modify the profile before oref0 call :
Except : ((140-100)/1,2)-140+200 = 116
Guard : if$\frac{HBT-100}{\text{pourcentage Of Insulin}} * (HBT-100) \lt 0$ ➡️ maxAutosens is used as %
the date allows to manage temp target in the future (or in the past).
TDD
the algo integrates the TDD as explained here in the documentation.
TDD is calculated with values modified by override (ISF, basal…)
If BG target > 118 and exercice mode activated (highTemptargetRaisesSensitivity or exerciseMode) ➡️ No Dynamic ISF.
if autosens max = min or if max < 1 or min > 1 ➡️ no dynamic ISF.
Calculation of factor dISF in function of peak insulin :
Calculation of weight average of Insulin (TDD)
Algo logarithm
Except: 60 * 0,8 * 52 * log(100/55 + 1) / 1800 = 0,62
Algo Sigmoid
autosens max <> 1 :
autosens max = 1 :
Check the ratio is in the range of autosens min / max.
Others :
in iAPS, a dynamic variable is available : disable flat CGM errors :
- if the difference between BG(n) and BG(n-1) is less than 5 mg/l, then change BG(n-1) with + or - 5 mg/l (in function of the sense) avoided oref0 to consider to be a flat change
Beta Was this translation helpful? Give feedback.
All reactions