Visible for testing.
Applies the lifting procedure described in "On Lifted Cover Inequalities: A
New Lifting Procedure with Unusual Properties", Adam N. Letchford, Georgia
Souli.
The algo is pretty simple, given a cover C for a given rhs. We compute
a rational weight p/q so that sum_C min(w_i, p/q) = rhs. Note that q is
pretty small (lower or equal to the size of C). The generated cut is then
of the form
sum X_i in C for which w_i <= p / q
+ sum gamma_i X_i for the other variable <= |C| - 1.
gamma_i being the smallest k such that w_i <= sum of the k + 1 largest
min(w_i, p/q) for i in C. In particular, it is zero if w_i <= p/q.
Note that this accept a general constraint that has been canonicalized to
sum coeff_i * X_i <= base_rhs. Each coeff_i >= 0 and each X_i >= 0.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["The `CoverCutHelper` class in C++ assists in identifying knapsack cover cuts within optimization problems."],["It offers methods to generate and access these cuts, including an alternative cut generation method."],["A specialized lifting procedure based on Letchford and Souli's work can be applied to enhance the cuts."],["A simple knapsack heuristic is available to potentially discover cuts more efficiently."],["Information about the generated cuts can be retrieved for analysis or logging purposes."]]],["The `CoverCutHelper` class aids in finding knapsack cover cuts. Key actions include `TrySimpleKnapsack` to find a cut using heuristics, and `cut` or `alt_cut` to retrieve the generated `LinearConstraint`. `GenerateLetchfordSouliLifting` applies a specific lifting procedure to create a cut. The `Info` method provides a text log, while `mutable_cut` and `mutable_alt_cut` return modifiable cut objects. The procedure implemented in `GenerateLetchfordSouliLifting` create a new cut based on the variable weights.\n"]]