Flow cover cuts - #2496
Closed
Opt-Mucca wants to merge 44 commits into
Closed
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## latest #2496 +/- ##
==========================================
+ Coverage 79.48% 79.93% +0.44%
==========================================
Files 346 346
Lines 85869 86645 +776
==========================================
+ Hits 68251 69256 +1005
+ Misses 17618 17389 -229 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
Closing this because it's close to finished, and I don't want to spam everyone with notifications for minor performance changes as I experiment. I plan to open a non-draft PR in the next few days. |
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 adds the lifted simple generalised flow cover cut from https://link.springer.com/content/pdf/10.1007/s101070050067.pdf
Currently a flow cover cut is only generated for
HighsPathSeparator. I've been playing around with enabling it forHighsTableauSeparator, but can't decide if that has some performance loss. I've avoided doing anything formod-kandconflictsbecause they already have a "dont-spend-much-time" cut flag attached to them.The general workflow of how the cut is generated (and which bits of the code does what):
preprocessSNFRelaxation-> check whether the aggregated row can be used for a flow coverinitSNFRelaxation-> initialise some data structurestransLp.transformSNFRelaxation-> create the single-node flow relaxation (SNFR). That is, turn\sum c_i x_i + \sum a_i y_i <= a_0(x_i binary, y_i real non-neg) into\sum_{j \in N+} y'_j - \sum_{j \in N-} y'_j <= b, wherey'_j <= u_j x_j.computeFlowCover-> Get sets C+ subset N+ and C- subset N- withsum_{j in C+} u_j - sum_{j in C-} u_j = b + lambda, lambda > 0(C+ and C- are then the "flow cover")separateLiftedFlowCover-> compute the actual cut (half of the code is creating data for the lifting function and functions for determining coefficients related to the lifting function)transLp.cleanup-> Remove slack, small coefficients, and calculate the efficacyMy smaller performance runs are showing a nice improvement on reducing the number of nodes, but it's still slightly slower than the baseline w.r.t. time. I'd say it's too heavily swayed by outliers currently. This needs to be more rigorously tested performance-wise before being merged.
I opened the PR to get any feedback from a design perspective, and in case anyone wanted to contribute. I also need to test whether or not this is helpful for the energy instances specifically.
Potential TODO: I am currently just taking the
bestVlborbestVubthat is already stored fortransformSNFRelaxation. Such a variable bound does not necessarily satisfy the requirements to be used intransformSNFRelaxationthough, and could be blocking a candidate. It might be well worth it to either change the function that getsbestVlb / bestVubor to create a second search.Edit: And more checks for correctness.... Although they do pass locally!