Commit 183b19a
feat: add 38 problem models (#960)
* feat: add MinimumInternalMacroDataCompression model (#442)
Implement the internal macro data compression problem (GJ SR23) with
direct ILP reduction, CLI support, canonical example, and paper entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: generalize MinimumTardinessSequencing with weight parameter (#495)
Add W type parameter to MinimumTardinessSequencing: W=One for unit-length
tasks (existing behavior), W=usize for arbitrary task lengths. Includes
ILP reduction for both variants, canonical examples, and updated tests.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add SequencingToMinimizeTardyTaskWeight model (#496)
Implement the weighted tardy task scheduling problem (GJ SS3) with
direct ILP reduction, CLI support, canonical example, and paper entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add SequencingWithDeadlinesAndSetUpTimes model (#499)
Implement the scheduling feasibility problem with compiler-class setup
times (GJ SS6) with direct ILP reduction, CLI support, and paper entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add PreemptiveScheduling model (#504)
Implement multiprocessor preemptive scheduling (GJ SS12) with binary
time-slot assignment, direct ILP<i32> reduction, CLI support, and paper entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix #506: Add OpenShopScheduling model and direct ILP rule
Implements the Open Shop Scheduling optimization model (minimize makespan)
with a direct ILP reduction using disjunctive formulation (binary ordering
variables + integer start times + makespan objective). Canonical example
uses the 4 jobs × 3 machines instance with true optimal makespan = 8.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: add QuadraticCongruences model (#536)
Implement the quadratic congruences feasibility problem (GJ AN1) with
brute-force solver, CLI support, canonical example, and paper entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add SimultaneousIncongruences model (#537)
Implement the simultaneous incongruences feasibility problem (GJ AN2)
with brute-force solver, CLI support, canonical example, and paper entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add EquilibriumPoint model (#549)
Implement the discrete Nash equilibrium existence problem (GJ AN15)
with brute-force solver, CLI support, canonical example, and paper entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add DirectedHamiltonianPath model (#813)
Implement directed Hamiltonian path feasibility problem with ILP
reduction, CLI support, canonical example, and paper entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add SetSplitting model (#830)
Implement hypergraph 2-colorability / set splitting feasibility problem
(GJ SP4) with ILP reduction, CLI support, canonical example, and paper entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add HamiltonianPathBetweenTwoVertices model (#831)
Implement the fixed-endpoint Hamiltonian path problem (GJ Chapter 3)
with brute-force solver, CLI support, canonical example, and paper entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add MinimumMaximalMatching model (#832)
Implement minimum maximal matching / minimum edge dominating set (GJ GT10)
with ILP reduction, CLI support, canonical example, and paper entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add PartitionIntoForests model (#833)
Implement vertex arboricity / partition into forests feasibility problem
(GJ GT14) with brute-force solver, CLI support, canonical example, and
paper entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: resolve clippy needless_range_loop in OpenShopScheduling ILP
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: use i32 instead of usize for MinimumTardinessSequencing weight parameter
Replace standalone `usize` weight type with `i32`, which integrates into
the existing One → i32 → f64 variant hierarchy. This enables natural
edges between MinimumTardinessSequencing<One> and <i32> variants in the
reduction graph. Remove now-unnecessary WeightElement and VariantParam
impls for usize from types.rs.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add 24 new problem models with tests, paper entries, and CLI support
Models span all categories: graph (10), formula (3), algebraic (3),
set (1), and misc (7). Each model includes unit tests (7-19 per model),
canonical examples, paper problem-def entries, and CLI create handlers.
Also fixes: Typst compile error in MinimumMatrixDomination example,
missing bouchez2006 bib entry, sect→inter deprecation warning.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: resolve clippy needless_range_loop in MinimumWeightSolutionToLinearEquations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: code quality improvements for batch models
- Fix feasible_register_assignment: reject num_registers==0 with vertices,
correct complexity from num_vertices^2*2^num_vertices to factorial(num_vertices)
- Fix numerical_3_dimensional_matching complexity: 3^num_groups -> num_groups^(2*num_groups)
- Fix subset_product complexity: 2^(num_elements/2) -> 2^num_elements
- Extract duplicated config_to_assignment to shared formula/mod.rs utility
- Use is_disjoint() in minimum_intersection_graph_basis
- Remove redundant is_valid_solution from ThreeDimensionalMatching
- Gate SubsetProduct::new_unchecked with #[cfg(test)]
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* refactor: improve code quality across batch models
- Cache globally_dead in NonLivenessFreePetriNet constructor (was
recomputed on every evaluate() call)
- Precompute dependencies/dependents in FeasibleRegisterAssignment
constructor (was rebuilt on every is_feasible() call)
- Remove dead has_input vector in NonLivenessFreePetriNet::enabled_transitions
- Extract shared BigUint serde modules from SubsetSum/SubsetProduct into
biguint_serde.rs (was duplicated verbatim in both files)
- Add early exit in SubsetProduct::evaluate when product exceeds target
- Single-pass grouping in MinimumCoveringByCliques::is_valid_cover
(was O(max_group * num_edges), now O(num_edges))
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address agentic review findings for PR #960
Must-fix:
- S1: Add 4 missing re-exports in models/mod.rs and lib.rs prelude
(QuadraticCongruences, OpenShopScheduling, PreemptiveScheduling,
SequencingWithDeadlinesAndSetUpTimes)
- S2: Add OpenShopScheduling CLI create handler
- S3: Fix DirectedHamiltonianPath→ILP overhead (2n→3n constraints)
- S4/Q1: Fix PreemptiveScheduling→ILP overhead (num_tasks→d_max)
- S5: Fix SequencingWithDeadlinesAndSetUpTimes→ILP overhead
(3*(n-1) → n^2*(n-1) switch detection constraints)
Should-fix:
- S7: Fix MinimumInternalMacroDataCompression→ILP overhead
(2n+1 → n+1 constraints)
- Q2: Fix setup_times field description ("away from" → "to")
- Q3: Extract duplicated decode_permutation to shared misc/mod.rs
Low:
- A1: Remove unused EquilibriumPoint import in create.rs
- A2: Fix redundant closure in create.rs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 0f51be6 commit 183b19a
112 files changed
Lines changed: 19312 additions & 371 deletions
File tree
- docs/paper
- problemreductions-cli/src
- commands
- src
- models
- algebraic
- formula
- graph
- misc
- set
- rules
- unit_tests
- models
- algebraic
- formula
- graph
- misc
- set
- rules
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
1 | 13 | | |
2 | 14 | | |
3 | 15 | | |
| |||
658 | 670 | | |
659 | 671 | | |
660 | 672 | | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
661 | 684 | | |
662 | 685 | | |
663 | 686 | | |
| |||
1570 | 1593 | | |
1571 | 1594 | | |
1572 | 1595 | | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
| |||
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| 231 | + | |
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
| |||
247 | 249 | | |
248 | 250 | | |
249 | 251 | | |
| 252 | + | |
250 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
251 | 257 | | |
| 258 | + | |
252 | 259 | | |
| 260 | + | |
253 | 261 | | |
| 262 | + | |
254 | 263 | | |
255 | 264 | | |
256 | 265 | | |
| |||
260 | 269 | | |
261 | 270 | | |
262 | 271 | | |
| 272 | + | |
263 | 273 | | |
264 | 274 | | |
265 | 275 | | |
| |||
312 | 322 | | |
313 | 323 | | |
314 | 324 | | |
| 325 | + | |
315 | 326 | | |
316 | 327 | | |
| 328 | + | |
317 | 329 | | |
| 330 | + | |
318 | 331 | | |
319 | 332 | | |
320 | 333 | | |
321 | 334 | | |
| 335 | + | |
322 | 336 | | |
323 | 337 | | |
324 | 338 | | |
| 339 | + | |
325 | 340 | | |
326 | 341 | | |
327 | 342 | | |
| |||
469 | 484 | | |
470 | 485 | | |
471 | 486 | | |
472 | | - | |
| 487 | + | |
473 | 488 | | |
474 | 489 | | |
475 | 490 | | |
| |||
589 | 604 | | |
590 | 605 | | |
591 | 606 | | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
592 | 610 | | |
593 | 611 | | |
594 | 612 | | |
| |||
755 | 773 | | |
756 | 774 | | |
757 | 775 | | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
758 | 782 | | |
759 | 783 | | |
760 | 784 | | |
| |||
767 | 791 | | |
768 | 792 | | |
769 | 793 | | |
770 | | - | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
771 | 801 | | |
772 | 802 | | |
773 | | - | |
| 803 | + | |
774 | 804 | | |
775 | 805 | | |
776 | | - | |
| 806 | + | |
777 | 807 | | |
778 | 808 | | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
779 | 827 | | |
780 | 828 | | |
781 | 829 | | |
| |||
0 commit comments