C++ Reference: class ZeroHalfCutHelper
Note: This documentation is automatically generated.
Heuristic to find a good sums of rows from the LP (with coeff -1, +1) that can lead to a violated zero-half cut (i.e. after integer rounding with a divisor 2).For this, all that matter is the parity of the coefficients and the rhs in the linear combination of the original problem constraint. So this class maintain a copy of the LP matrix modulo 2 on which simplification and heuristic are performed to find good cut candidates(s).
Most of what is done here is described in the paper "Algorithms to Separate {0, 1/2}-Chvátal-Gomory Cuts", Arie M. C. A. Koster, Adrian Zymolka, Manuel Kutschka.
Method | |
---|---|
AddBinaryRow | Return type: Arguments: |
AddOneConstraint | Return type: Arguments: |
EliminateVarUsingRow | Return type: Arguments: Visible for testing. Adds the given row to all other rows having an odd cofficient on the given column. This then eliminate the entry (col, row) that is now a singleton by incresing the slack of the given row. |
InterestingCandidates | Arguments: |
MatrixCol | Return type: Arguments: |
MatrixRow | Return type: Arguments: |
ProcessVariables | Return type: Arguments: Public API: ProcessVariables() must be called first and then constraints can be added one by one. Finally GetZeroHalfInterestingCuts() will return a set of good candidates. TODO(user): This is a first implementation, both the heuristic and the code performance can probably be improved uppon. |
Reset | Return type: Arguments: Visible for testing. |
SymmetricDifference | Return type: Arguments: Visible for testing.
Like std::set_symmetric_difference, but use a vector |