Fix #765: Upgrade 17 decision models to optimization (Group A + B)#771
Fix #765: Upgrade 17 decision models to optimization (Group A + B)#771
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…Min<usize>) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…::Sum>) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…<i64>) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…to optimization (Min<i64>) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… (Min<i64>) + ILP rewrite Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…<f64>) + ILP rewrite Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…<i64>) + ILP rewrite Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…Max<usize>) + ILP rewrite + config redesign Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n (Min<usize>) + config redesign Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove bound parameter from 8 model constructor calls in CLI create - Remove associated bound parsing/validation code and CLI tests - Fix SumOfSquaresPartition canonical example (optimal is 226, not 230) - Fix StackerCrane example-db test assertion (no longer has bound field) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…(Min<W::Sum>) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ion (Min<N::Sum>) + ILP rewrite Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…28>) + ILP rewrite Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…Sum>) + minimax ILP rewrite Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… (Max<usize>) + config redesign Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ptimization-765 # Conflicts: # docs/paper/reductions.typ
… merge - Convert 10 ILP rules from feasibility to optimization (remove bound, add objective) - Fix SCS ILP: add contiguous padding constraint, fix alphabet_size field - Mark OLA ILP<i32> tests as ignored (ILP solver too slow for integer variables) - Fix sequencing ILP test to use ILPSolver instead of brute-force on ILP<i32> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nces - model_specs_are_optimal now tries brute-force first for instances with search space ≤ 2^20, avoiding HiGHS hangs on ILP<i32> reductions - Hardcode OLA and Sequencing ILP canonical example solutions (avoid calling ILPSolver at example-db build time for ILP<i32> targets) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Root cause: ILP<i32> variables default to domain [0, 2^31], causing HiGHS to hang on even tiny instances. Two fixes: 1. ILP solver: derive tighter per-variable upper bounds from single-variable ≤ constraints before passing to HiGHS (covers x and p variables) 2. OLA ILP: add z_e ≤ n-1 bound (max position difference) 3. Sequencing ILP: add z ≤ Σ|costs| bound (max cumulative cost) Restores ILPSolver calls in canonical rule examples (removes hardcoded solutions) and reverts model_specs_are_optimal to ILP-first strategy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lver test Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #771 +/- ##
========================================
Coverage 97.82% 97.82%
========================================
Files 588 588
Lines 66422 66198 -224
========================================
- Hits 64976 64760 -216
+ Misses 1446 1438 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Finding: ILP solver hangs due to unbounded variable domainsDuring this PR, we discovered that Root causeThe ILP solver sets variable upper bounds from v = v.max((V::DIMS_PER_VAR - 1) as f64); // i32 → 2,147,483,647For This particularly affects auxiliary variables that lack explicit single-variable
Fix (3 parts)
ImpactBefore fix: Recommendation for future ILP rulesAlways add explicit |
…verage - Remove #[ignore] from OLA ILP tests (HiGHS is fast now with z bounds) - Add rural_postman tests: wrong config length, is_weighted, solver aggregate - Add SWCP test: weight bound exceeded - Covers codecov gaps in rural_postman, shortest_weight_constrained_path, and optimallineararrangement_ilp Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Value = Or+ threshold to true optimization (Value = Max<T>/Min<T>)createcommands, canonical examples, paper entries, and all testsGroup A — single-threshold models (12)
Max<W::Sum>Min<usize>Min<W::Sum>Min<W::Sum>Min<i32>Min<i64>Min<i64>Min<i64>Min<f64>Min<i64>Max<usize>Min<usize>Group B — constrained-optimization models (5)
size_boundMin<W::Sum>weight_boundMin<N::Sum>delay_budgetMin<u128>k(centers)Min<W::Sum>max_lengthMax<usize>Test plan
make check(fmt + clippy + test) passescargo test --lib --features example-db— 3206 passedcargo test -p problemreductions-cli— 17 passedcargo test --test main(integration + doc tests) — all passedcargo clippy --all-targets— 0 warningsCloses #765
🤖 Generated with Claude Code