diff --git a/ftl/core/deck-config.ftl b/ftl/core/deck-config.ftl index 4930dbe0e..f4aca0ec1 100644 --- a/ftl/core/deck-config.ftl +++ b/ftl/core/deck-config.ftl @@ -513,9 +513,8 @@ deck-config-save-options-to-preset-confirm = Overwrite the options in your curre # to show the total number of cards that can be recalled or retrieved on a # specific date. deck-config-fsrs-simulator-radio-memorized = Memorized -deck-config-fsrs-simulator-radio-ratio = Time / Memorized Ratio -# $time here is pre-formatted e.g. "10 Seconds" -deck-config-fsrs-simulator-ratio-tooltip = { $time } per memorized card +deck-config-fsrs-simulator-radio-ratio2 = Memorized / Time Ratio +deck-config-fsrs-simulator-ratio-tooltip2 = { $time } memorized cards per hour ## Messages related to the FSRS scheduler’s health check. The health check determines whether the correlation between FSRS predictions and your memory is good or bad. It can be optionally triggered as part of the "Optimize" function. @@ -536,6 +535,9 @@ deck-config-fsrs-good-fit = Health Check: ## NO NEED TO TRANSLATE. This text is no longer used by Anki, and will be removed in the future. +deck-config-fsrs-simulator-radio-ratio = Time / Memorized Ratio +# $time here is pre-formatted e.g. "10 Seconds" +deck-config-fsrs-simulator-ratio-tooltip = { $time } per memorized card deck-config-unable-to-determine-desired-retention = Unable to determine a minimum recommended retention. deck-config-predicted-minimum-recommended-retention = Minimum recommended retention: { $num } diff --git a/proto/anki/scheduler.proto b/proto/anki/scheduler.proto index 34b350642..85ae0f5c3 100644 --- a/proto/anki/scheduler.proto +++ b/proto/anki/scheduler.proto @@ -420,8 +420,9 @@ message SimulateFsrsReviewResponse { message SimulateFsrsWorkloadResponse { map cost = 1; - map memorized = 2; - map review_count = 3; + float reviewless_end_memorized = 2; + map memorized = 3; + map review_count = 4; } message ComputeOptimalRetentionResponse { diff --git a/rslib/src/scheduler/fsrs/simulator.rs b/rslib/src/scheduler/fsrs/simulator.rs index b18e86a77..0e700bfef 100644 --- a/rslib/src/scheduler/fsrs/simulator.rs +++ b/rslib/src/scheduler/fsrs/simulator.rs @@ -300,7 +300,11 @@ impl Collection { )) }) .collect::>>()?; + let reviewless_end_memorized = cards.iter().fold(0., |p, c| { + p + c.retention_on(&req.params, req.days_to_simulate as f32) + }); Ok(SimulateFsrsWorkloadResponse { + reviewless_end_memorized, memorized: dr_workload.iter().map(|(k, v)| (*k, v.0)).collect(), cost: dr_workload.iter().map(|(k, v)| (*k, v.1)).collect(), review_count: dr_workload.iter().map(|(k, v)| (*k, v.2)).collect(), diff --git a/ts/routes/deck-options/SimulatorModal.svelte b/ts/routes/deck-options/SimulatorModal.svelte index c60f90455..434001f6f 100644 --- a/ts/routes/deck-options/SimulatorModal.svelte +++ b/ts/routes/deck-options/SimulatorModal.svelte @@ -212,6 +212,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html x: parseInt(dr), timeCost: resp!.cost[dr], memorized: v, + reviewless_end_memorized: resp!.reviewlessEndMemorized, count: resp!.reviewCount[dr], label: simulationNumber, learnSpan: simulateFsrsRequest.daysToSimulate, @@ -570,7 +571,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html value={SimulateWorkloadSubgraph.ratio} bind:group={simulateWorkloadSubgraph} /> - {tr.deckConfigFsrsSimulatorRadioRatio()} + {tr.deckConfigFsrsSimulatorRadioRatio2()}