-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Use maxBolus to set automaticDosingIOBLimit #1871
Merged
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
5a4659c
Use maxBolus and ratio to set maxAutoIOB
marionbarker b022c4c
Merge branch 'dev' into wip/max-auto-iob
marionbarker a97e007
Merge branch 'dev' into wip/max-auto-iob
marionbarker 2afe19a
increase ratioMaxAutoInsulinOnBoardToMaxBolus to 2.0
marionbarker 0733eaf
remove print statements
marionbarker 90b0470
restore LoopContants
marionbarker 74fd253
modify name from maxAutoIOB to automaticDosingIOBLimit
marionbarker dd4ed94
Merge branch 'dev' into wip/max-auto-iob
marionbarker 34bf4cb
Code cleanup in DoseMath
marionbarker d6698c9
configure new optional commands with default nil
marionbarker 0c182a1
remove whitespace
marionbarker fc654ff
Add automaticIOBLimitTests
marionbarker 87478d8
DoseMathTests: add new args to all automated dosing tests
marionbarker fae59f4
remove defaults so new parameters are required
marionbarker 659a10d
Merge branch 'dev' into wip/max-auto-iob
marionbarker ea948df
Modify method for providing insulinOnBoard in LoopDataManager
marionbarker bdbd78f
Merge branch 'dev' into wip/max-auto-iob
marionbarker 800eba0
AlertManagerTests: add new parameter
marionbarker 9ac85c3
Merge branch 'dev' into wip/max-auto-iob
marionbarker 0ef5008
match whitespace
marionbarker c902fbe
`insulinOnBoardValue` -> `insulinOnBoard` for logging purposes
novalegra 8699730
Add test for autobolus clamping
novalegra 3c7c65b
Improve readability of dose clamping logic
novalegra 97b7d8d
Merge pull request #1 from novalegra/max-auto-iob
marionbarker 61bea9d
DoseMathTests: use non-zero value for insulinOnBoard
marionbarker 01c775c
DoseMathTests: move insulinOnBoard internal to test functions
marionbarker 027d5e8
Merge branch 'wip/max-auto-iob' of https://github.com/marionbarker/Lo…
ps2 c6323df
Move IOB limit handling into recommendedAutomaticDose, and recommende…
ps2 caf2709
Temp basals limited by iob max
ps2 374160f
Cleanup
ps2 e041840
Remove unintentional edit
ps2 6b83d2f
Fix maxThirtyMinuteRateToKeepIOBBelowLimit calculation
marionbarker cf808a8
Adjust IOB clamping for temp basals to be relative to scheduled basal
ps2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these and all the below 7.69? Seems an oddly specific number, and I don't think it's obvious why from reading the tests. If you're testing some IOB based limiting or trying to test that it's not limiting, then I think setting specific values here, makes sense. But otherwise, maybe we just keep them all at 0 when we're not actually trying to trigger some IOB level specific logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine returning all prior tests back to 0.0 U IOB - I only changed that because I thought you asked me too. Sorry for the misunderstanding.
The tests where the value of the insulinOnBoard needs to vary are the 7 new tests.
Of all the previously existing tests, the highest dose was 2.3 U, so I chose 7.69 U as IOB.
With that value, the XCTAssert for all the existing tests would pass.
I got lazy pasting in the new let insulinOnBoard into each test and at one point 7.69 was in my paste buffer.
I think I added it starting here because we don't have any clamping tests with OverrideActive.