Skip to content

Commit

Permalink
Revert "Preferences edits (#1039)"
Browse files Browse the repository at this point in the history
This reverts commit 3a6667f.
  • Loading branch information
scottleibrand committed Sep 29, 2017
1 parent bd615b7 commit 929c0fe
Showing 1 changed file with 11 additions and 45 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Understanding your preferences and safety settings

All of the settings specific to OpenAPS (that can't be read from the pump) will live in this file, so when running the setup scripts or building your loop, you will have the `preferences.json` file built for the system to read, in addition to your pump profile settings. Many of these are important safety settings, with reasonable default settings, so other than described below, you likely won’t need to adjust these. If you do decide to adjust a setting, the best practice is to adjust one setting at a time, and observe the impact for 3 days. Changing multiple variables at once is a recipe for a lot of headaches and a lot of painful troubleshooting.

(*Note that there are some preferences that show up by default; these are the most commonly adjusted. There are additional preferences available to set that are not used by everyone, and are described below - any of these can also be added to the preferences.json*)
All of the settings specific to OpenAPS (that can't be read from the pump) are in this file, so when running the setup scripts or building your loop, you will have the preferences.json file built for the system to read, in addition to your pump profile settings. Many of these are important safety settings, with reasonable default settings, so other than described below, you likely won’t need to adjust these. If you do decide to adjust a setting, the best practice is to adjust one setting at a time, and observe the impact for 3 days. Changing multiple variables at once is a recipe for a lot of headaches and a lot of painful troubleshooting.

## Editing your preferences.json

Expand Down Expand Up @@ -39,53 +37,21 @@ When you run the OpenAPS setup script, it will prompt you to set your `max_iob`.

The setting you choose during the setup script will be saved in the oref-runagain script and can be used again if you need to rerun the script.

#### the most commonly confused safety variables that are also the most important

Note: The next two variables `max_daily_safety_multiplier` and `current_basal_safety_multiplier` work together, along with your pump's max basal rate setting (set on your pump), as a safety setting for your loop. **The system will use whichever of these three values is the lowest, at any given time, as the ceiling for the temp basal rates it will set.** So, if your pump’s max basal is 1.0u, but 3x your highest daily basal or 4x your current basal would be higher, the system will not set any temps higher than 1.0u, even if it thinks you need more insulin. On the flip side, if your 4x current multiplier says you can have max 1.6u/hr and your pump's max basal is 2u/hr; the maximum set temp at that time will be 1.6u/hr.

You can be able to alerted to being restricted by the max basal setting by looking at the OpenAPS pill message in Nightscout (or in pump-loop log), which will say "adj. req. rate: XX to maxSafeBasal: XX"

![max safe basal message](../Images/max-safe-basal.jpg)

#### max_daily_safety_multiplier:

This is an important OpenAPS safety limit. The default setting (which is unlikely to need adjusting) is 3. This means that OpenAPS will never be allowed to set a temporary basal rate that is more than 3x the highest hourly basal rate programmed in a user's pump.
This is a key OpenAPS safety cap. What this does is limit your basals to be 3x (in this example, which is the default and works for most people) your biggest basal rate. You likely will not need to change this, but you should be aware that’s what is discussed about “3x max daily; 4x current” for safety caps.

#### current_basal_safety_multiplier:

This is another important OpenAPS safety limit. The default setting (which is also unlikely to need adjusting) is 4. This means that OpenAPS will never be allowed to set a temporary basal rate that is more than 4x the current hourly basal rate programmed in a user's pump.

----
>### Important Note About Safety Multipliers:
>
>`max_daily_safety_multiplier` and `current_basal_safety_multiplier` work together, along with your pump's max basal rate safety setting (set on your pump), as a safety limits.
>
>OpenAPS will use whichever of those three values is the lowest, at any given time, as the ceiling for the temp basal rate it will set.**
>
>#### A few examples:
>
>| | Example 1 | Example 2 | Example 3 | Example 4 |
>|------------------------------------------------------------|---------------|--------------|--------------|--------------|
>| user's max basal safety setting (in pump) | 2 .0 | 2.0 | 3.0 | 2.5 |
>|`max_daily_safety_multiplier` | 3 | 3 | 3 | 3 |
>|`current_basal_safety_multiplier` | 4 | 4 | 4 | 4 |
>| user's current basal rate | 1.0 | 0.4 | 1.2 | 0.7 |
>|user's highest programmed basal rate | 1.5 | 1.0 | 1.2 | 0.8 |
>|OpenAPS recommended temp basal rate | 3.0 | 1.8 | 2.4 | 2.6 |
>|Actual temp basal rate allowed | 2.0 | 1.6 | 2.4 | 2.4 |
>
>In **Example 1**, the user's max basal safety setting is the constraining limit on the OpenAPS recommended temp basal rate.
>In **Example 2**, 4x the user's current basal rate is the constraining limit on the OpenAPS recommended temp basal rate.
>In **Example 3**, the user's current basal rate is at his/her highest programmed rate, but none of the safety constraints are binding; the OpenAPS recommended temp basal rate is delivered.
>In **Example 4**, 3x the user's highest programmed basal rates is the constraining limit on the OpenAPS recommended temp basal rate.
>
>If the temporary basal rate setting recommended by OpenAPS (as determined in [`oref0/lib/determine-basal/determine-basal.js`](https://github.com/openaps/oref0/blob/master/lib/determine-basal/determine-basal.js)) exceeds either:
>
>* the user's max basal rate setting (which is set in the user's pump), or
>* `max_daily_safety_multiplier` \* the highest programmed basal rate (as specified by the basal rates in the user's pump), or
>* `current_basal_safety_multiplier` \* the user's current basal rate (as specified by the current basal rate programmed in the user's pump), then
>
> the following message will be reported to the *pump-loop.log*:
>
> adj. req. rate: X.X to maxSafeBasal: Y.Y
>
>You can also view this message in the Nightscout OpenAPS pill (which pops up a detailed message about recent OpenAPS activity if you hover your mouse over the OpenAPS pill):
>
>![max safe basal message](../Images/max-safe-basal.jpg)
----

This is the other half of the key OpenAPS safety caps, and the other half of “3x max daily; 4x current” of the safety caps. This means your basal, regardless of max basal set on your pump, cannot be any higher than this number times the current level of your basal. This is to prevent people from getting into dangerous territory by setting excessively high max basals before understanding how the algorithm works. Again, the default is 4x; most people will never need to adjust this and are instead more likely to need to adjust other settings if they feel like they are “running into” this safety cap.

#### autosens_max:

Expand Down

0 comments on commit 929c0fe

Please sign in to comment.