Skip to content

Commit

Permalink
chore: limit ndl output to 99
Browse files Browse the repository at this point in the history
  • Loading branch information
KG32 committed Aug 23, 2024
1 parent 438cc21 commit e45d8c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/buehlmann/buehlmann_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl DecoModel for BuehlmannModel {
}

fn ndl(&self) -> Minutes {
let mut ndl: Minutes = Minutes::MAX;
let mut ndl: Minutes = NDL_CUT_OFF_MINS;

// create a simulation model based on current model's state
let mut sim_model = self.fork();
Expand Down
4 changes: 2 additions & 2 deletions tests/buehlmann_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ fn test_ndl_cut_off() {
let air = Gas::new(0.21, 0.);

model.record(0., 0, &air);
assert_eq!(model.ndl(), Minutes::MAX);
assert_eq!(model.ndl(), 99);

model.record(10., 10*60, &air);
assert_eq!(model.ndl(), Minutes::MAX);
assert_eq!(model.ndl(), 99);
}

#[test]
Expand Down

0 comments on commit e45d8c1

Please sign in to comment.