diff --git a/Cargo.lock b/Cargo.lock index 9e4f170..5481a97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1077,7 +1077,7 @@ dependencies = [ [[package]] name = "fsrs" -version = "1.4.6" +version = "1.4.7" dependencies = [ "burn", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 46af09b..52ce055 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fsrs" -version = "1.4.6" +version = "1.4.7" authors = ["Open Spaced Repetition"] categories = ["algorithms", "science"] edition = "2021" diff --git a/src/optimal_retention.rs b/src/optimal_retention.rs index 87f430f..20cb6ec 100644 --- a/src/optimal_retention.rs +++ b/src/optimal_retention.rs @@ -238,7 +238,7 @@ pub fn simulate( card_priorities.pop(); continue; } - if (review_cnt_per_day[day_index] + 1 > review_limit) + if (!is_learn && review_cnt_per_day[day_index] + 1 > review_limit) || (is_learn && learn_cnt_per_day[day_index] + 1 > learn_limit) || (cost_per_day[day_index] + fail_cost > max_cost_perday) {