Extension of dual fixing for single equations#2869
Extension of dual fixing for single equations#2869fwesselm wants to merge 28 commits intoERGO-Code:latestfrom
Conversation
…FixingExtension
…FixingExtension
…FixingExtension
…into dualFixingExtension3
…FixingExtension3
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## latest #2869 +/- ##
==========================================
+ Coverage 80.35% 80.39% +0.04%
==========================================
Files 348 348
Lines 86522 86675 +153
==========================================
+ Hits 69527 69685 +158
+ Misses 16995 16990 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Opt-Mucca
left a comment
There was a problem hiding this comment.
Code looks good! I've got the one open question and if that's simply me being paranoid then this should be good to merge.
| bool backtrack = domain.infeasible(); | ||
| if (!backtrack) { | ||
| backtrack = solutionFound(numVars); | ||
| backtrack = findBranchVar(numVars) < 0; |
There was a problem hiding this comment.
Nice spot on duplicate code!
| // Programming, INFORMS Journal on Computing 32(2):473-506. | ||
| HPRESOLVE_CHECKED_CALL(handleSingleEquation(equationRow)); | ||
| if (colDeleted[col]) return Result::kOk; | ||
| } else if (mipsolver != nullptr && model->col_lower_[col] != -kHighsInf && |
There was a problem hiding this comment.
A quick sanity check: Is there a solution path where the single equation would not fix any cols, e.g. due to infinite activities, and we are now skipping the substitution that we could have done in the original code?
There was a problem hiding this comment.
To substitute the variable, we need to find a binary variable that, when set to zero, makes the row redundant. As far as I understand, setting a single binary variable to zero will not make an equation redundant. Therefore, to answer your question, the code should fail in finding a substitution in an equation anyway.
|
FYI (in case notifications for non-direct tags are turned off) @ZhaoWeiWang0319 |
Thank you, @Opt-Mucca! |
HPresolve::dualFixingto handle single equations (as described by Achterberg et al., Presolve Reductions in Mixed Integer Programming, see section 6.1).HPresolve::enumerateSolutionsto compute the overlap coefficient when comparing two sets of binary variables.