Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harmonise profile defaults with openaps/oref0 #28

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

bjornoleh
Copy link
Contributor

@bjornoleh bjornoleh commented Jun 9, 2024

This PR adresses observations made in #27, where several oref0 profile defaults were found to diverge from openaps/oref0.

Harmonised with openaps/oref0:

max_iob: 0 // if max_iob is not provided, will default to zero
, max_daily_safety_multiplier: 3
, current_basal_safety_multiplier: 4
, autosens_max: 1.2
, autosens_min: 0.7

, enableSMB_with_COB: false // enable supermicrobolus while COB is positive
, enableSMB_with_temptarget: false // enable supermicrobolus for eating soon temp targets

, allowSMB_with_high_temptarget: false // allow supermicrobolus (if otherwise enabled) even with high temp targets
, maxSMBBasalMinutes: 30 // maximum minutes of basal that can be delivered as a single SMB with uncovered COB
, maxUAMSMBBasalMinutes: 30 // maximum minutes of basal that can be delivered as a single SMB when IOB exceeds COB

, bolus_increment: 0.1 // minimum bolus that can be delivered as an SMB

, insulinPeakTime: 75 // number of minutes after a bolus activity peaks.  defaults to 55m for Fiasp if useCustomPeakTime: false

Moving these lines to harmonise the relative position in the file:

, enableSMB_high_bg: false // enable SMBs when a high BG is detected, based on the high BG target (adjusted or profile)
, enableSMB_high_bg_target: 110 // set the value enableSMB_high_bg will compare against to enable SMB. If BG > than this value, SMBs should enable.

Will keep these defaults different from openaps/oref0:

,sensitivity_raises_target: false ( openaps/oref0 = `true`

)

These settings still exist in openaps/oref0, but are not included in trio-oref, as they are obsolete and/or only relevant for rig setups, and not relevant for Trio:

,bolussnooze_dia_divisor: 2

, edison_battery_shutdown_voltage: 3050
, pi_battery_shutdown_percent: 2

Other profile variables related to dynamic ISF and smb_delivery_ratio which diverge from openaps/oref0 are kept:

, smb_delivery_ratio: 0.5 //Default value: 0.5 Used if flexible delivery ratio is not used. This is another key OpenAPS safety cap, and specifies what share of the total insulin required can be delivered as SMB. This is to prevent people from getting into dangerous territory by setting SMB requests from the caregivers phone at the same time. Increase this experimental value slowly and with caution.
, adjustmentFactor: 0.8
, adjustmentFactorSigmoid: 0.5
, useNewFormula: false
, enableDynamicCR: false
, sigmoid: false
, weightPercentage: 0.65 
, tddAdjBasal: false // Enable adjustment of basal based on the ratio of 24 h : 10 day average TDD
, threshold_setting: 60 // Use a configurable threshold setting

Removed this redundant comment:
// autoISF variables

Edit:
Changing enableUAM from true to false, to match the currently used defaults in Trio (defaults to true in openaps/oref0 since 2017)

Harmonised with openaps/oref0:

max_iob: 0 // if max_iob is not provided, will default to zero
    , max_daily_safety_multiplier: 3
    , current_basal_safety_multiplier: 4
    , autosens_max: 1.2
    , autosens_min: 0.7

    , enableSMB_with_COB: false // enable supermicrobolus while COB is positive
    , enableSMB_with_temptarget: false // enable supermicrobolus for eating soon temp targets

    , allowSMB_with_high_temptarget: false // allow supermicrobolus (if otherwise enabled) even with high temp targets
    , maxSMBBasalMinutes: 30 // maximum minutes of basal that can be delivered as a single SMB with uncovered COB
    , maxUAMSMBBasalMinutes: 30 // maximum minutes of basal that can be delivered as a single SMB when IOB exceeds COB

    , bolus_increment: 0.1 // minimum bolus that can be delivered as an SMB

    , insulinPeakTime: 75 // number of minutes after a bolus activity peaks.  defaults to 55m for Fiasp if useCustomPeakTime: false

Moving these lines to harmonise the relative position in the file:

    , enableSMB_high_bg: false // enable SMBs when a high BG is detected, based on the high BG target (adjusted or profile)
    , enableSMB_high_bg_target: 110 // set the value enableSMB_high_bg will compare against to enable SMB. If BG > than this value, SMBs should enable.

Will keep these defaults different from openaps/oref0:

    ,sensitivity_raises_target: false ( openaps/oref0 = `true`
)

Not included from openaps/oref0:

    ,bolussnooze_dia_divisor: 2

    , edison_battery_shutdown_voltage: 3050
    , pi_battery_shutdown_percent: 2


Other profile variables related to dynamic ISF and `smb_delivery_ratio` which diverge from openaps/oref0 are kept:

    , smb_delivery_ratio: 0.5 //Default value: 0.5 Used if flexible delivery ratio is not used. This is another key OpenAPS safety cap, and specifies what share of the total insulin required can be delivered as SMB. This is to prevent people from getting into dangerous territory by setting SMB requests from the caregivers phone at the same time. Increase this experimental value slowly and with caution.
    , adjustmentFactor: 0.8
    , adjustmentFactorSigmoid: 0.5
    , useNewFormula: false
    , enableDynamicCR: false
    , sigmoid: false
    , weightPercentage: 0.65 
    , tddAdjBasal: false // Enable adjustment of basal based on the ratio of 24 h : 10 day average TDD
    , threshold_setting: 60 // Use a configurable threshold setting

Removed this redundant comment:
     // autoISF variables
@bjornoleh bjornoleh linked an issue Jun 9, 2024 that may be closed by this pull request
@bjornoleh bjornoleh self-assigned this Jun 9, 2024
MikePlante1
MikePlante1 previously approved these changes Aug 15, 2024
Copy link
Contributor

@MikePlante1 MikePlante1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review looks good. I added a couple comments if you want to address them, otherwise LGTM. I tested in a simulator.

lib/profile/index.js Outdated Show resolved Hide resolved
lib/profile/index.js Outdated Show resolved Hide resolved
lib/profile/index.js Show resolved Hide resolved
@MikePlante1 MikePlante1 merged commit 363fd11 into nightscout:dev Aug 16, 2024
1 check passed
bjornoleh added a commit to bjornoleh/Trio that referenced this pull request Aug 16, 2024
Last commits in trio-oref:
363fd11 Merge pull request # 28 from bjornoleh/harmonise_defaults
2d695e1 index.js: set enableUAM to false, and remove whitespace in L11
8f5f820 Harmonise profile defaults with openaps/oref0

More details available in nightscout/trio-oref#28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Several oref0 profile defaults diverge from openaps/oref0
3 participants