Skip to content

Complete remaining ILP overhead predictions and normalize scheduling bounds - #1184

Closed
isPANN wants to merge 2 commits into
fix/augmentation-ilp-overheadfrom
fix/remaining-ilp-overhead
Closed

isPANN wants to merge 2 commits into
fix/augmentation-ilp-overheadfrom
fix/remaining-ilp-overhead

Conversation

@isPANN

@isPANN isPANN commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Superseded by #1174. This PR’s changes were included in the combined squash commit 8bdddd45 on fix/exact-reduction-parameters. Continue review and fixes in #1174. The original description below is retained for reference.


Motivation

This PR completes the remaining 20 direct integer-coefficient ILP prediction contracts relative to #1183. A graph audit now finds 126/126 complete direct contracts, up from 106/126 on the base branch.

These reductions already predicted structural counts, but left numeric constraint magnitudes unavailable. Binary encoding and ILP → QUBO need those magnitudes to bound the variables introduced by the construction. Consequently, a missing field on an incoming ILP edge could prevent an end-to-end size prediction even when the reduction itself was implemented.

The changes supply coarse, sound bounds using intrinsic source data and propagate the necessary parameters through incoming edges. Each rule keeps its prediction contract explicit and local, with only source parameters on the right-hand side.

Stack: targets fix/augmentation-ilp-overhead (#1183). Related to #1175; unavailable contracts elsewhere in the graph remain outside this PR's scope.

Changes

Predict numeric magnitudes from source data

Add magnitude getters for the numeric inputs actually needed by the affected rules: delays, weights and capacities, processing times, resource requirements, costs, and circuit lengths. They reuse the existing helper that computes the smallest h >= 1 with each absolute magnitude strictly below 2^h.

  • Complete the CapacityAssignment, PartiallyOrderedKnapsack, ShortestWeightConstrainedPath, BoundedComponentSpanningForest, AcyclicPartition, MultipleChoiceBranching, MinimumCapacitatedSpanningTree, MinMaxMulticenter, DecisionLongestCircuit, and scheduling/sequencing ILP contracts.
  • Keep objective-only values out of these parameters where they do not affect the constraints or variable domains.
  • Propagate copied or bounded magnitudes through incoming Partition, ThreePartition, ThreeDimensionalMatching, KSatisfiability, HamiltonianCircuit, OptimalLinearArrangement, path-partition, and dominating-set reductions.
  • Preserve the repository's uniform parameter schema across variants; the unit-length MinimumTardinessSequencing variant exposes the constant processing magnitude 1.

Normalize constructions where source bounds suffice

Reduction Before After and consequence
MinimumTardinessSequencing → ILP, both variants A negative deadline could make an otherwise valid scheduling problem infeasible in the target. Clip deadlines to the possible completion-time interval. This preserves the optimum and removes any need for a deadline-magnitude parameter. Compute the normalized bound once per task.
ResourceConstrainedScheduling → ILP The implementation allocated n × deadline assignment variables and evaluation scanned every time slot. Compress occupied slots into at most n slots and cap useful processor capacity at n. The ILP has at most n² variables; source evaluation visits only occupied slots.
DecisionLongestCircuit → ILP The acceptance row copied an arbitrary decision threshold. Thresholds at or below zero produce a redundant row; thresholds above the sum of edge lengths produce an impossible row. Other thresholds are bounded by that sum. The generic Decision API needs no new parameter.
MinMaxMulticenter → ILP Shortest-path addition could overflow unchecked. Model evaluation and reduction construction return typed overflow errors.

The size contracts, mathematical explanations, and regression tests cover these changes. Constructors and reduction signatures retain their existing APIs.

Verified CLI behavior

The following checks ran through pred inspect, pred path, pred reduce, pred solve --solver ilp, and pred evaluate, including recovery of the original source solution.

Source instance Predicted QUBO upper bounds: variables / quadratic terms Constructed QUBO: variables / quadratic terms Recovered source result
ResourceConstrainedScheduling: two tasks, two processors, resource requirements [1,1], capacity 1, deadline i64::MAX 46 / 2,116 10 / 18 Or(true), schedule [1,0]
MinimumTardinessSequencing: one task of length 1, deadline i64::MIN 17 / 289 3 / 3 Min(1)
PartiallyOrderedKnapsack: weights [2,3], values [1,9], precedence (0,1), capacity 3 10 / 100 5 / 8 Max(1)

The old resource-scheduling allocation behavior in the table above is established from the base implementation; it was not executed with i64::MAX.

Validation

  • cargo test --workspace --all-features: 6,967 passed before the final behavior-preserving cleanup.
  • After cleanup: 72 focused tests passed, covering overhead contracts, QUBO solution recovery, multicenter validation, tardiness, and circuit reductions.
  • cargo clippy --workspace --all-targets --all-features -- -D warnings: passed.
  • Formatting and git diff --check: passed.
  • make paper and the final Typst build: passed.
  • Graph export: 126 complete direct integer-coefficient ILP contracts, zero incomplete, and zero parameter-contract errors across the graph.

Tests compare predicted parameters against constructed targets and recovered source objectives against brute-force reference solutions. Large ThreeDimensionalMatching numeric gadgets are checked for incoming contracts and symbolic composition; their full QUBO solve is not claimed here. Fixed-width construction can still return typed numeric errors even when a symbolic size bound is available.

Stack refresh

Merged the updated parent #1183, carrying the construction-derived bounds and validation fixes from #1174 through the stack. Preserved this PR's bounded ILP types, numeric-magnitude fields, and algorithms; no instance fixtures were added. The PR remains based on its immediate parent.

Validation of the updated head: make check passed (formatting, all-target/all-feature Clippy, and workspace tests including ignored tests). GitHub CI is restricted to PRs targeting main or develop, so these stack branches were checked locally.

@isPANN
isPANN added this pull request to stack #1181 September 28, 2026 07:29
@codecov

codecov Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.06542% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.78%. Comparing base (02c30cd) to head (e36915e).

Files with missing lines Patch % Lines
src/rules/minimumtardinesssequencing_ilp.rs 54.54% 5 Missing ⚠️
src/rules/resourceconstrainedscheduling_ilp.rs 71.42% 2 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                        @@
##           fix/augmentation-ilp-overhead    #1184      +/-   ##
=================================================================
+ Coverage                          96.76%   96.78%   +0.01%     
=================================================================
  Files                               1072     1073       +1     
  Lines                             140769   141472     +703     
=================================================================
+ Hits                              136216   136922     +706     
+ Misses                              4553     4550       -3     

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

isPANN added a commit that referenced this pull request Sep 29, 2026
Squash the combined changes from PRs #1180, #1182, #1183, #1184, and #1185 into #1174. Preserve the complete stack-tip tree so subsequent corrections can be maintained on one branch.
@isPANN isPANN closed this Sep 29, 2026
@isPANN
isPANN removed this pull request from stack #1181 September 29, 2026 12:24
@isPANN
isPANN deleted the fix/remaining-ilp-overhead branch September 29, 2026 12:31
@isPANN

isPANN commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

Merged to #1174.

GiggleLiu added a commit that referenced this pull request Oct 3, 2026
* Make derivable reduction parameters exact

* Check every field in exact reduction transforms

* Verify exact reduction parameters on randomized instances

* Check exact and upper-bound reduction parameters

* Document and simplify parameter formula validation

* Improve parameter prediction contracts and bound integer ILP reductions

* Derive reduction parameter bounds from constructed targets

Correct exactness claims, count sparse coefficients by construction block, reject negative flow capacities, and verify metadata using existing behavior inputs and real executors.

* Consolidate bounded ILP and parameter prediction stack

Squash the combined changes from PRs #1180, #1182, #1183, #1184, and #1185 into #1174. Preserve the complete stack-tip tree so subsequent corrections can be maintained on one branch.

* Correct ILP parameter bounds and simplify reduction code

* Calibrate parity and universe-size reduction bounds

Derive upper bounds from conditional even padding and the set-packing endpoint universe. Preserve the exact edge-to-set count and verify the registered promises in existing parity and isolated-vertex tests.

* Remove invalid reduction catalog edges

* Add direct binary ILP pipelines for exact-one SAT and graph kernels

* Preserve scheduling semantics with compact ILP constructions

* Simplify scheduling solution extraction

* Tighten ILP nonzero bounds using construction counts

* Compact exact reductions and register missing solver pipelines

Replace oversized formulations with compact constructions for partition,
register, matrix, graph, and ordering problems. Add direct bounded ILP
pipelines and reuse exact customized subset-sum and clique-cover solvers.

Preserve signed weights and costs, avoid artificial partition-bound
overflow, and align overhead contracts, rule targets, tests, and proofs
with the resulting constructions.

Validated with make check, make paper, independent reduction audits, and
CLI solver and extraction round trips.

* Remove redundant reduction parameters and derive bounds from model inputs

* Fix exact verification bottlenecks in reduction targets

* Simplify reduction results and exact solver bookkeeping

* fix: bound solver precomputation by small witness budgets

* fix: remove needless borrow flagged by current CI clippy

* fix: cap solver preprocessing and handle large union chains

---------

Co-authored-by: GiggleLiu <cacate0129@gmail.com>
GiggleLiu added a commit that referenced this pull request Oct 3, 2026
…1190)

* Make derivable reduction parameters exact

* Check every field in exact reduction transforms

* Verify exact reduction parameters on randomized instances

* Check exact and upper-bound reduction parameters

* Document and simplify parameter formula validation

* Improve parameter prediction contracts and bound integer ILP reductions

* Derive reduction parameter bounds from constructed targets

Correct exactness claims, count sparse coefficients by construction block, reject negative flow capacities, and verify metadata using existing behavior inputs and real executors.

* Consolidate bounded ILP and parameter prediction stack

Squash the combined changes from PRs #1180, #1182, #1183, #1184, and #1185 into #1174. Preserve the complete stack-tip tree so subsequent corrections can be maintained on one branch.

* Correct ILP parameter bounds and simplify reduction code

* Calibrate parity and universe-size reduction bounds

Derive upper bounds from conditional even padding and the set-packing endpoint universe. Preserve the exact edge-to-set count and verify the registered promises in existing parity and isolated-vertex tests.

* Remove invalid reduction catalog edges

* Add direct binary ILP pipelines for exact-one SAT and graph kernels

* Preserve scheduling semantics with compact ILP constructions

* Simplify scheduling solution extraction

* Tighten ILP nonzero bounds using construction counts

* Compact exact reductions and register missing solver pipelines

Replace oversized formulations with compact constructions for partition,
register, matrix, graph, and ordering problems. Add direct bounded ILP
pipelines and reuse exact customized subset-sum and clique-cover solvers.

Preserve signed weights and costs, avoid artificial partition-bound
overflow, and align overhead contracts, rule targets, tests, and proofs
with the resulting constructions.

Validated with make check, make paper, independent reduction audits, and
CLI solver and extraction round trips.

* Remove redundant reduction parameters and derive bounds from model inputs

* Fix exact verification bottlenecks in reduction targets

* Simplify reduction results and exact solver bookkeeping

* Tighten construction overhead bounds and expose required source statistics

* Use lattice geometry and cached rectangle incidence to tighten remaining bounds

* Sum individual coefficient width bounds for lattice encodings

* Reuse constructed parameters in overhead count tests

* fix: bound solver precomputation by small witness budgets

* fix: remove needless borrow flagged by current CI clippy

* fix: cap solver preprocessing and handle large union chains

---------

Co-authored-by: GiggleLiu <cacate0129@gmail.com>
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