Skip to content

Remove continuous singletons from double-sided rows#2962

Open
Opt-Mucca wants to merge 1 commit intolatestfrom
zero-obj-singleton-double-sided-row
Open

Remove continuous singletons from double-sided rows#2962
Opt-Mucca wants to merge 1 commit intolatestfrom
zero-obj-singleton-double-sided-row

Conversation

@Opt-Mucca
Copy link
Copy Markdown
Collaborator

@Opt-Mucca Opt-Mucca commented Apr 10, 2026

General idea: We currently have no explicit reduction for a column s, with 0 cost, and that only appears in a single double-sided row b_0 <= a^Tx + cs <= b_1. Dual fixing removes all cases where b_0 == -kHighsInf or b_1 == kHighsInf, but the column is left alone if b_0 and b_1 are finite. Removing the column may allow additional reductions to be made.

Motivation: I was playing around with an instance, trying to figure out why HiGHS wasn't making a reduction, and thought this would help (spoiler: it did not), but while doing so I stumbled upon an old TODO in the code with the exact suggestion.

@fwesselm Three major questions:

  • Do you think this is worth adding? I haven't performance tested this.
  • If so should this be kept behind a MIP-only flag?
  • I'm currently skipping the case where s has infinite bounds, but in theory we could handle that here. The issue is I'm not sure what to do with infinite values in postsolve.

Edit: Need to look into the failing tests (they're passing locally.....). Windows does not like this change at all.

@Opt-Mucca Opt-Mucca requested a review from fwesselm April 10, 2026 09:18
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 84.33735% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.32%. Comparing base (9d3c86f) to head (9cce723).
⚠️ Report is 22 commits behind head on latest.

Files with missing lines Patch % Lines
highs/presolve/HighsPostsolveStack.cpp 78.37% 8 Missing ⚠️
highs/presolve/HighsPostsolveStack.h 70.58% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #2962      +/-   ##
==========================================
+ Coverage   81.28%   81.32%   +0.04%     
==========================================
  Files         358      358              
  Lines       88720    88724       +4     
==========================================
+ Hits        72119    72159      +40     
+ Misses      16601    16565      -36     

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

@fwesselm
Copy link
Copy Markdown
Collaborator

This is great, @Opt-Mucca! I would like to experiment with this a llittle more. Also, there is HPresolve::removeSlacks which handles a "similar" case. If you are OK with it, I would make some more changes (on top of your change).

@Opt-Mucca
Copy link
Copy Markdown
Collaborator Author

@fwesselm I was worried that I was missing something, so please make any changes you want.

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