Decrease probing budget after some limit#2512
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## latest #2512 +/- ##
==========================================
+ Coverage 79.48% 79.73% +0.24%
==========================================
Files 346 346
Lines 85869 85986 +117
==========================================
+ Hits 68251 68558 +307
+ Misses 17618 17428 -190 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
Great! |
fwesselm
approved these changes
Aug 25, 2025
Collaborator
fwesselm
left a comment
There was a problem hiding this comment.
Looks good, thanks @Opt-Mucca. I am going to test this now.
| probingEarlyAbort = | ||
| numDel > | ||
| std::max(HighsInt{1000}, (model->num_row_ + model->num_col_) / 20); | ||
| if (!tightenLimits) { |
Collaborator
There was a problem hiding this comment.
This is a question of taste, but if you would want to avoid the if-else, you could have the following here:
bool tightenLimits = (numProbed - oldNumProbed) >= 2500;
HighsInt multiplier = tightenLimits ? -1 : 1;
// when a large percentage of columns have been deleted, stop this round
// of probing
// if (numDel > std::max(model->num_col_ * 0.2, 1000.)) break;
probingEarlyAbort =
numDel >
multiplier *
std::max(multiplier * HighsInt{1000},
multiplier * (model->num_row_ + model->num_col_) / 20);
if (probingEarlyAbort) break;
Collaborator
Author
There was a problem hiding this comment.
Sorry for missing this comment! I'm happy with if-else logic. I find it easier to read than the double multiplier.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds stricter limits on probing after 2500 columns have been probed on. Specifically, it decreases the amount of deleted columns used as a stopping criteria, and changes the weights used to calculate the dynamic probing budget.
This fixes worst-case performance for #2478 where HiGHS was probing on everything for a huge amount of cliques / some deletions, despite the instance being easy to solve regardless.
I've run some experiments on 60 or so instances, with most being unaffected, and some minor improvements that I'd say are noise. This change is only likely to affect large instances. The PR needs to go through more rigorous computational experiments before being merged.
I decided on the numbers from playing around a bit on some instances. They're unlikely to be perfect (as the original ones aren't), so am open to any changes / new approaches. I tried to be conservative because I don't want to ruin probings effectiveness on other instances just to avoid these fringe cases.