Skip to content

Refactor HighsRedcostFixing::addRootRedcost - #2660

Merged
jajhall merged 3 commits into
ERGO-Code:latestfrom
fwesselm:refactorAddRootRedcost
Nov 26, 2025
Merged

jajhall merged 3 commits into
ERGO-Code:latestfrom
fwesselm:refactorAddRootRedcost

Conversation

@fwesselm

Copy link
Copy Markdown
Collaborator
  • This PR is a by-product of debugging and removes duplicate code from HighsRedcostFixing::addRootRedcost().
  • The new code behaves slightly different due to the fact that the lower bound check now uses a tolerance for both directions (i.e., mipsolver.mipdata_->lower_bound + mipsolver.mipdata_->feastol).
  • I ran 850+ MIPs and the relative geometric means for solution times and numbers of branching nodes are 0.99 and 1.01 respectively, indicating that the impact on HiGHS' performance is very small.

@codecov

codecov Bot commented Nov 21, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.24%. Comparing base (e4632db) to head (dbe2d8a).
⚠️ Report is 64 commits behind head on latest.

Additional details and impacted files
@@            Coverage Diff             @@
##           latest    #2660      +/-   ##
==========================================
+ Coverage   81.20%   81.24%   +0.03%     
==========================================
  Files         349      349              
  Lines       85465    85767     +302     
==========================================
+ Hits        69406    69681     +275     
- Misses      16059    16086      +27     

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

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

What do you mean by the second point? Isn't lower_bound already accounting for feastol? From what I understood you're now doubling the tolerance in your check.

@fwesselm

fwesselm commented Nov 21, 2025

Copy link
Copy Markdown
Collaborator Author

What do you mean by the second point? Isn't lower_bound already accounting for feastol? From what I understood you're now doubling the tolerance in your check.

Thanks for checking the code. I do not think lower_bound includes a tolerance. I was trying to explain that the former if-part did not use a tolerance when comparing lower_bound and cutoff bound while the else-part did.

@Opt-Mucca

Copy link
Copy Markdown
Collaborator

I'm blind. All good! The lower_bound in HighsPrimalHeuristics is not mipsolver->mipdata_.......

@jajhall
jajhall merged commit 44252ee into ERGO-Code:latest Nov 26, 2025
237 checks passed
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.

3 participants