Add protect/storage lists, dynamic trash thresholds, tie resolution
Protect & storage lists: - protect.csv: unlocked garage cars (state != 0, locked == false) worth locking more copies of. Needed copies = best configs surviving the RQ-band thresholds (prize cars and RQ >= 80 always count); already locked copies (copy_count) are subtracted, surplus drops off the list. - storage.csv: Keep/Trash recommendation for storage cars (state == 0) using the same copy-count logic; surplus unlocked copies are fusion material. - user_data.rs now parses card state (garage vs storage), garage slots (user.garageSlots/garageSlotsUsed), and unlocked card maps. Dynamic trash thresholds: - TrashThresholds derive RQ 20-29/30-39 as half/a quarter of a base value (--trash-base-count, default 4); RQ 40+ never covered. - plan_trash_rules escalates the base automatically while projected free garage slots (capacity - used + unlocked non-best copies + new trash candidates, copies counted per card) stay below --garage-min-free (default 20), stopping when no further cars qualify. Effective thresholds and projection are printed. - Improve-based low-value cars (best target count at or below the band threshold) land in trash.csv; collect_improve_entries is shared with improve.csv and computed once per run. Same-car tie resolution: - resolve_tied_configs collapses tie-equivalent configs of the same car per track (compute_car_counts, write_details_csv), preferring the player's owned final-build config. Fixes phantom rows like the Mercedes 280 SL 332 entry tied at 61.31 by its owned 323, inflated per-config track counts, and pointless second-copy recommendations. Wishlist: - Prize cars are excluded from the ideal wishlist and surface in remove.csv via the ideal-set difference. CLI: new protect command; --trash-base-count/--garage-min-free on trash/protect/all; details command reuses counts for tie resolution. README updated for all new files, flags, and criteria.
This commit is contained in:
parent
ec8be9d138
commit
293a8d7707
12 changed files with 1684 additions and 120 deletions
|
|
@ -16,8 +16,8 @@ pub async fn run_details(
|
|||
output_dir: &str,
|
||||
) -> Result<(), AppError> {
|
||||
let my_data = load_my_cars_or_warn(my_cars_path)?;
|
||||
let (ctx, _counts) = run_analysis(my_data, cars_db_path, times_dir).await?;
|
||||
write_details_csv(output_dir, &ctx)?;
|
||||
let (ctx, counts) = run_analysis(my_data, cars_db_path, times_dir).await?;
|
||||
write_details_csv(output_dir, &ctx, &counts)?;
|
||||
println!("Written: details.csv");
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue