Skip to content

Conversation

@scottleibrand
Copy link
Contributor

@scottleibrand scottleibrand commented Dec 3, 2019

Basic usage: just run ~/src/oref0/bin/oref0-simulator.sh. the first time you run it, it will initialize a /tmp/oref0-simulator directory to work in. On subsequent runs it’ll randomly introduce BG noise (defaulting to +/- 10 mg/dL per 5m) and show how the loop responds to that.
If you specify any arguments, it’ll use the first argument as the 5m deviation (a positive or negative integer representing how much you want BG to rise or fall), the second argument as the magnitude of the random noise (a positive integer indicating the maximum absolute value of noise to introduce, which defaults to 10), and the third argument, if provided, as a carb entry. Note that you have to have over 30 simulated CGM readings before it stops reporting Not enough glucose data to calculate carb absorption and starts paying attention to carbs you enter.

oref0-backtest allows you to run the simulator on historical data from Nightscout, or from the deviations from an autotune log file:

Usage: NS mode: /usr/bin/oref0-backtest [--dir=/tmp/oref0-simulator] --ns-host=https://mynightscout.herokuapp.com [--start-days-ago=number_of_days] [--end-days-ago=number_of_days] [--start-date=YYYY-MM-DD] [--end-date=YYYY-MM-DD] [--preferences=/path/to/preferences.json] [--autosens-override=/path/to/autosens-override.json]

Usage: file mode: /usr/bin/oref0-backtest [--dir=/tmp/oref0-simulator] /path/to/autotune*.log [--profile=/path/to/profile.json] [--preferences=/path/to/preferences.json] [--autosens-override=/path/to/autosens-override.json]

scottleibrand and others added 30 commits June 10, 2018 23:18
Conflicts:
	lib/determine-basal/autosens.js
For now it just makes certain timeAsSeconds is present.
Move all such normalization to use this function.
Conflicts:
	lib/autotune-prep/categorize.js
	lib/determine-basal/autosens.js
	lib/determine-basal/determine-basal.js
Without it strange things can happen, like autotune trying to change ISF
from 56 to 700
@scottleibrand scottleibrand merged commit 95443cb into dev Dec 31, 2019
@scottleibrand scottleibrand deleted the simple-simulator branch December 31, 2019 22:06
@danamlewis danamlewis mentioned this pull request Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants