Skip to content

Regarding the maxCOBPredBG calculation logic in the DetermineBasalSMB algorithm #1474

Open

Description

@doudou-ux

As highlighted in the red box:The code is comparing with maxIOBPredBG rather than maxCOBPredBG when recording the maximum COB prediction.

My questions are:
1、Is this an intentional design choice to only record COB predictions that exceed the maximum IOB prediction? Or should it have been comparing COBpredBG > maxCOBPredBG to simply track the absolute maximum of COB predictions?
2、2、If this is intentional, what is the purpose of this design? Is it to highlight the additional blood glucose rise caused by carbohydrates?

I appreciate your insights on this matter.

Image

Activity

  1. scottleibrand commented on Apr 13, 2025

    @scottleibrand
    Contributor

    It looks like that variable was updated as part of 7c8556f, which has a commit comment of "fix minPredBG logic for high-temping based on minIOBPredBG". Previous to that it was introduced in 44e54fb with the comment
    "output predBGs as an object with three different predictive arrays"

    Beyond that, I don't remember why I changed that particular variable (back in April 2017).

  2. scottleibrand commented on Apr 21, 2025

    @scottleibrand
    Contributor

    o3, which just came out last week, also does a good job of contextualizing that safety check and explaining how it helps make SMB safe/possible: https://chatgpt.com/share/680577e9-3d04-8007-83b1-36d104cb809d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions