Skip to content

Commit f8e1982

Browse files
committed
Add genflowcover param
1 parent d737abd commit f8e1982

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

highs/mip/HighsCutGeneration.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,8 @@ static void checkNumerics(const double* vals, HighsInt len, double rhs) {
13021302
bool HighsCutGeneration::generateCut(HighsTransformedLp& transLp,
13031303
std::vector<HighsInt>& inds_,
13041304
std::vector<double>& vals_, double& rhs_,
1305-
bool onlyInitialCMIRScale) {
1305+
bool onlyInitialCMIRScale,
1306+
bool genFlowCover) {
13061307
#if 0
13071308
if (vals_.size() > 1) {
13081309
std::vector<HighsInt> indsCheck_ = inds_;
@@ -1352,7 +1353,7 @@ bool HighsCutGeneration::generateCut(HighsTransformedLp& transLp,
13521353
std::vector<HighsInt> flowCoverInds;
13531354
double flowCoverRhs = rhs_;
13541355
double flowCoverEfficacy = 0;
1355-
if (!onlyInitialCMIRScale) {
1356+
if (genFlowCover) {
13561357
flowCoverVals = vals_;
13571358
flowCoverInds = inds_;
13581359
flowCoverSuccess = tryGenerateFlowCoverCut(

highs/mip/HighsCutGeneration.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ class HighsCutGeneration {
104104
/// separates the LP solution for the given single row relaxation
105105
bool generateCut(HighsTransformedLp& transLp, std::vector<HighsInt>& inds,
106106
std::vector<double>& vals, double& rhs,
107-
bool onlyInitialCMIRScale = false);
107+
bool onlyInitialCMIRScale = false,
108+
bool genFlowCover = false);
108109

109110
/// generate a conflict from the given proof constraint which cuts of the
110111
/// given local domain

highs/mip/HighsModkSeparator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ void HighsModkSeparator::separateLpSolution(HighsLpRelaxation& lpRelaxation,
226226
lpAggregator.getCurrentAggregation(inds, vals, false);
227227

228228
rhs = 0.0;
229-
cutGen.generateCut(transLp, inds, vals, rhs, true);
229+
cutGen.generateCut(transLp, inds, vals, rhs, true, false);
230230

231231
if (k != 2) {
232232
lpAggregator.clear();
@@ -240,7 +240,7 @@ void HighsModkSeparator::separateLpSolution(HighsLpRelaxation& lpRelaxation,
240240
lpAggregator.getCurrentAggregation(inds, vals, true);
241241

242242
rhs = 0.0;
243-
cutGen.generateCut(transLp, inds, vals, rhs, true);
243+
cutGen.generateCut(transLp, inds, vals, rhs, true, false);
244244

245245
lpAggregator.clear();
246246
};

highs/mip/HighsPathSeparator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ void HighsPathSeparator::separateLpSolution(HighsLpRelaxation& lpRelaxation,
350350

351351
// generate cut
352352
double rhs = 0;
353-
success = cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs);
353+
success = cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs, false, true);
354354

355355
lpAggregator.getCurrentAggregation(baseRowInds, baseRowVals, true);
356356
if (!aggregatedPath.empty() || bestOutArcCol != -1 ||
@@ -359,7 +359,7 @@ void HighsPathSeparator::separateLpSolution(HighsLpRelaxation& lpRelaxation,
359359

360360
// generate reverse cut
361361
rhs = 0;
362-
success |= cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs);
362+
success |= cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs, false, true);
363363

364364
if (success || (bestOutArcCol == -1 && bestInArcCol == -1)) break;
365365

highs/mip/HighsTableauSeparator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,12 @@ void HighsTableauSeparator::separateLpSolution(HighsLpRelaxation& lpRelaxation,
229229
baseRowInds.size());
230230

231231
double rhs = 0;
232-
cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs);
232+
cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs, false, true);
233233
if (mip.mipdata_->domain.infeasible()) break;
234234

235235
lpAggregator.getCurrentAggregation(baseRowInds, baseRowVals, true);
236236
rhs = 0;
237-
cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs);
237+
cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs, false, true);
238238
if (mip.mipdata_->domain.infeasible()) break;
239239

240240
lpAggregator.clear();

0 commit comments

Comments
 (0)