Skip to content

Handle appended rows in presolve (parallel rows reduction) - #3250

Merged
Opt-Mucca merged 15 commits into
latestfrom
postsolveInfrChanges2
Sep 2, 2026
Merged

Handle appended rows in presolve (parallel rows reduction)#3250
Opt-Mucca merged 15 commits into
latestfrom
postsolveInfrChanges2

Conversation

@fwesselm

@fwesselm fwesselm commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Description

  • Parallel rows and columns detection now removes the cut row (not the non-cut row) when two parallel rows have different row types. This prevents loss of original constraints when moveCutsToPool later moves cuts to the cut pool. Note that this change is needed when presolve is performed after a restart (including cuts) and rows are appended (e.g., Fourier-Motzkin reduction).
  • Replaced manual isOrigRow/isOrigCol/isCutRow loops across MIP code with new utility methods (getOrigRows(), getOrigCols(), getCutRows(), getNonCutRows()) on HighsPostsolveStack.
  • Don't perform intial sweep if options->presolve_rule_test is set.
  • Added a unit test.
  • Ran 100 MIPs to verify that code changes do not affect behavior.

Checklist

  • I have read the contributing guidelines
  • This PR targets the latest branch
  • Tests are passing
  • Documentation was updated where relevant
  • This PR is not primarily AI-generated (per the AI contributions policy in CONTRIBUTING.md)

@fwesselm
fwesselm requested a review from Opt-Mucca September 1, 2026 19:05
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.07692% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.25%. Comparing base (f1de972) to head (a47ac64).
⚠️ Report is 923 commits behind head on latest.

Files with missing lines Patch % Lines
highs/presolve/HPresolve.cpp 96.55% 2 Missing ⚠️
check/TestPresolveRules.cpp 98.46% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #3250      +/-   ##
==========================================
+ Coverage   73.16%   73.25%   +0.08%     
==========================================
  Files         430      445      +15     
  Lines      103967   108121    +4154     
  Branches    16719    17333     +614     
==========================================
+ Hits        76067    79199    +3132     
- Misses      27624    28646    +1022     
  Partials      276      276              

☔ 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.

@Opt-Mucca Opt-Mucca left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A very nice find with a very simple fix!

@Opt-Mucca
Opt-Mucca merged commit 65feaea into latest Sep 2, 2026
563 of 564 checks passed
@fwesselm
fwesselm deleted the postsolveInfrChanges2 branch September 2, 2026 11:42
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.

2 participants