forked from tidepool-org/LoopAlgorithm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlgorithmInput.swift
More file actions
37 lines (33 loc) · 1.36 KB
/
Copy pathAlgorithmInput.swift
File metadata and controls
37 lines (33 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// AlgorithmInput.swift
// LoopAlgorithm
//
// Created by Pete Schwamb on 9/21/23.
// Copyright © 2023 LoopKit Authors. All rights reserved.
//
import Foundation
public protocol AlgorithmInput {
associatedtype CarbType: CarbEntry
associatedtype GlucoseType: GlucoseSampleValue
associatedtype InsulinDoseType: InsulinDose
var predictionStart: Date { get }
var glucoseHistory: [GlucoseType] { get }
var doses: [InsulinDoseType] { get }
var carbEntries: [CarbType] { get }
var basal: [AbsoluteScheduleValue<Double>] { get }
var sensitivity: [AbsoluteScheduleValue<LoopQuantity>] { get }
var carbRatio: [AbsoluteScheduleValue<Double>] { get }
var target: GlucoseRangeTimeline { get }
var suspendThreshold: LoopQuantity? { get }
var maxBolus: Double { get }
var maxActiveInsulinMultiplier: Double? { get } // Defaults to 2 (2x maxBolus)
var maxBasalRate: Double { get }
var useIntegralRetrospectiveCorrection: Bool { get }
var includePositiveVelocityAndRC: Bool { get }
var useMidAbsorptionISF: Bool { get }
var carbAbsorptionModel: CarbAbsorptionModel { get }
var recommendationInsulinModel: InsulinModel { get }
var recommendationType: DoseRecommendationType { get }
var automaticBolusApplicationFactor: Double? { get } // Defaults to 0.4
var gradualTransitionsThreshold: Double? { get }
}