Skip to content

perf: run duplicate-column merging to its own fixpoint in one pass#962

Open
rasros wants to merge 1 commit into
mainfrom
perf/dup-columns-fixpoint
Open

perf: run duplicate-column merging to its own fixpoint in one pass#962
rasros wants to merge 1 commit into
mainfrom
perf/dup-columns-fixpoint

Conversation

@rasros

@rasros rasros commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Advances #937 (2DBinPacking).

What changed

  • mergeDuplicateColumns now iterates to its own fixpoint within a single invocation, folding a whole chain of duplicate columns in one pass instead of one pair per representative and relying on the round engine to re-invoke it.

Why

The pass folds at most one duplicate per representative per invocation; a chain of k duplicate columns therefore needed k−1 presolve rounds, and every one of those rounds also re-ran subsume, dual-fix, strengthen and an incremental re-propagation over the whole model. On 2DBinPacking that was 16 rounds — the factor count reaches its fixpoint after round 2, and rounds 3–16 do nothing but re-merge one more column pair while every other pass rescans fruitlessly. Converging the chain internally collapses those rounds: 2DBinPacking presolve drops from ~694ms to ~400ms (under 0.5s at budget=0).

Column duplication is a structural (row-support + coefficient) property, so re-propagation between the old rounds could not change which columns are duplicates; the internal fixpoint reaches the same merged problem in the same pairwise order the round engine did. Chained aggregates are reconstructed by undoing the merge batches in reverse (the order the round engine's foldRight produced).

Testing

  • Byte-identical presolve oracle (dry-run-presolve, budget=0) across all 130 mzn-bench instances.
  • New unit test: a chain of three duplicate columns collapses in one pass and every reconstruction is exhaustively feasible in the original.
  • Bench-parity solve on the budget-truncated instances: 2DBinPacking, ma-path-finding, bus_scheduling, oocsp, steelmillslab, is all identical; liner-sf differs only in which equally-timed anytime incumbent the (unchanged-optimum) search reaches. No wrong-optimum.

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