You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace hardcoded canonical rule examples with ILPSolver calls (#775)
* Replace hardcoded canonical rule examples with ILPSolver calls
Convert 46 ILP reduction rules from hardcoded SolutionPair to dynamic
ILPSolver::new().solve() calls, ensuring canonical examples actually
verify the ILP solver can solve the reduction.
Also adds a z upper bound constraint in MinMaxMulticenter ILP formulation
to prevent HiGHS from stalling on unbounded [0, 2^31) domain.
Closes#772
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: extract rule_example_via_ilp helper, eliminating 60x boilerplate
Add `rule_example_via_ilp<S, V>()` to `example_db::specs` that performs
reduce → ILP solve → extract → assemble in one call. This replaces
the 8-line block that was copy-pasted across 60 ILP rule files, and
also eliminates the double `reduce_to()` call (once explicit, once
inside `rule_example_with_witness`).
Also fixes stale docstring on `build_example_db()` which incorrectly
claimed no solver is called.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address PR #775 review comments
- Fix indentation in ~32 canonical_rule_example_specs functions (cargo fmt)
- Fix incorrect overhead in minmaxmulticenter_ilp: num_constraints
formula was 2n²+4n+2, correct is 2n²+3n+2 (matching actual constraint
count: 1 cardinality + n assignment + n² link + n x-bounds + n² y-bounds
+ 1 z-bound + n minimax)
- Fix Vec::with_capacity hint to match corrected formula
- Remove 6 unused `use crate::rules::ReduceTo as _;` imports in files
that switched to rule_example_via_ilp
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: zazabap <sweynan@icloud.com>
0 commit comments