-
Notifications
You must be signed in to change notification settings - Fork 557
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
Incorrect recommendations after turning on dynamic settings first time #393
Comments
Looking at the logs the first loop seems to be using a TDD of 1, when my past 24h TDD was actually 70.5U
|
Thanks for the report. You’ll find the relevant code around here, the oref0 for Trio is in a separate repository (although you’ll also find a copy of the JavaScript code in the Trio repo) |
I believe the issue comes from
My swift is a bit rusty, but looks as if something is causing
|
You might be onto something here. But why would the result change at the next loop? You’d still be missing the data from ten days ago? |
True. However previous to turning on the dynamic settings I was never able to see my TDD anywhere. And TDD looks like it defaults to 0.0 It now appears in the Suggestion/enacted popup since turning on the dynamic settings. Do we know where TDD is first saved to the store? Could it be that TDD does not have a value until after the first loop with dynamic settings on? |
The TDD data are stored in Trio/monitor/oref2_variables.json on the phone. Here is a sample after running with nearly 24 hours of sim pump data (with external insulin added to fake 24 hours of pump history)
And here is the initial state before running with 24 hours of data (or possibly on the first run, I’m not sure). Edit: the below is similar to what this file looks like with a clean install, no dynamic ISF and no pump history. After clean install:
|
But I think the raw TDD estimates per loop is being stored to core data, which I don’t know too much about. I did notice that the average TDD values were persisted when I tried to delete the json files. Someone else will probably be able to tell you more about the core data storage if you can’t figure it out yourself. |
Yeah I think what is happening is that the TDD that is fetched from core data doesn't have a value and defaults to 0. The only place I can see in the codebase where the TDD core data is saved is
But for that line to be hit, TDD has to be above 0 to begin with. |
Confirmed by looking at the logs for the loop before dynamic settings were enabled
You can see that TDD here is 0 and is not calculated until dynamic ISF is enabled in |
Proposed solution in nightscout/trio-oref#31 to always calculate the TDD whether dynamicISF is enabled or not |
hey 👋 - silence for 30 days 🤐 ... anybody? triage is required! |
closed 📴 because silencio 🤫 since an additional 14 days after staleness 📠 |
After a review on nightscout/trio-oref#31, this could be re-opened |
@dnzxy , is this related to |
I've missed this Discord discussion, which channel is it in? |
Oh, sorry, my bad. It was probably in a DM. |
Possibly, not entirely sure from the context here. |
The weighted average would defiitely be affected by this change, but only before dynamicISF is turned on for the first time |
Describe the bug
Turned on dynamic ISF/CR for the first time. Loop ran. My predicted BG was -1120 and I got a notification saying that I needed to eat 3658g of carbs. When the next loop ran everything was back to normal
Attach a Log
TrioLogs.txt
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A sensible recommendation
Setup Information (please complete the following information):
Smartphone:
Pump:
CGM:
Trio Version:
Technical Details
If applicable, provide any technical details that might help in diagnosing the problem. This could include logs, error messages, or relevant configuration details.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: