Skip to content

Add 39 Tier 3 ILP reductions + shared linearization helpers#767

Merged
GiggleLiu merged 6 commits intomainfrom
feat/tier3-ilp-reductions
Mar 24, 2026
Merged

Add 39 Tier 3 ILP reductions + shared linearization helpers#767
GiggleLiu merged 6 commits intomainfrom
feat/tier3-ilp-reductions

Conversation

@GiggleLiu
Copy link
Contributor

Summary

  • Adds 39 new ILP reductions for Tier 3 problems spanning graph, scheduling, flow, sequencing, matrix, and miscellaneous categories
  • Adds shared ilp_helpers module with reusable linearization primitives (McCormick products, MTZ ordering, flow conservation, big-M activation, abs-diff, minimax, one-hot assignment)
  • Each reduction includes closed-loop round-trip unit tests and canonical example database entries
  • 81 files changed, ~10,000 lines of new code

Test plan

  • make check passes (fmt + clippy + all tests)
  • All 3368 tests pass (128+ new tests across 39 reductions + helpers)
  • example_db coverage test verifies all registered reductions have canonical examples
  • Solution pair consistency test verifies all canonical examples produce valid solutions

🤖 Generated with Claude Code

GiggleLiu and others added 6 commits March 24, 2026 15:43
…entation plan

- 39 new reduction-rule entries in reductions.typ with standardized
  multiline ILP equation blocks (variables, constraints, objective)
- Expanded 9 complex entries with full variable indexing, big-M values,
  and flow schemes (MixedChinesePostman, StackerCrane, AcyclicPartition,
  BiconnectivityAugmentation, BoundedComponentSpanningForest,
  StrongConnectivityAugmentation, ConsecutiveOnesMatrixAugmentation,
  StringToStringCorrection, RootedTreeStorageAssignment)
- Added equation blocks to all existing Tier 1/2 ILP entries
- Fixed ShortestWeightConstrainedPath MTZ constraint inversion
- Fixed 10 undefined/mismatched symbols across entries
- Standardized ILP problem-def with multiline equation
- Design spec: docs/superpowers/specs/2026-03-24-tier3-ilp-reductions-design.md
- Implementation plan: docs/superpowers/plans/2026-03-24-tier3-ilp-reductions.md

2 problems deferred: PartialFeedbackEdgeSet (no poly-size ILP for L<n),
RootedTreeArrangement (compound vec![n;2*n] config).

Ref #762.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…-M, abs-diff, minimax, one-hot)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements all remaining Tier 3 ILP reductions covering graph, scheduling,
flow, sequencing, matrix, and miscellaneous NP-hard problems. Each reduction
includes unit tests with closed-loop round-trip verification and canonical
example specs for the example database.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Mar 24, 2026

Codecov Report

❌ Patch coverage is 99.20976% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.84%. Comparing base (b98d3b0) to head (a40ba65).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/rules/stringtostringcorrection_ilp.rs 95.18% 14 Missing ⚠️
src/rules/mixedchinesepostman_ilp.rs 97.65% 6 Missing ⚠️
src/rules/stackercrane_ilp.rs 95.71% 6 Missing ⚠️
src/rules/rootedtreestorageassignment_ilp.rs 98.29% 5 Missing ⚠️
src/rules/ruralpostman_ilp.rs 97.24% 4 Missing ⚠️
src/rules/consecutiveonessubmatrix_ilp.rs 98.30% 2 Missing ⚠️
src/rules/lengthboundeddisjointpaths_ilp.rs 98.44% 2 Missing ⚠️
src/rules/consecutiveonesmatrixaugmentation_ilp.rs 99.01% 1 Missing ⚠️
src/rules/flowshopscheduling_ilp.rs 99.24% 1 Missing ⚠️
src/rules/integralflowhomologousarcs_ilp.rs 98.27% 1 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #767      +/-   ##
==========================================
+ Coverage   97.63%   97.84%   +0.21%     
==========================================
  Files         503      583      +80     
  Lines       59714    65521    +5807     
==========================================
+ Hits        58299    64112    +5813     
+ Misses       1415     1409       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GiggleLiu GiggleLiu merged commit 8f05a2f into main Mar 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant