Skip to content

Commit 8b8a3f7

Browse files
committed
Only generate cuts when pathlen=1
1 parent 27c6c2a commit 8b8a3f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

highs/mip/HighsPathSeparator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ void HighsPathSeparator::separateLpSolution(HighsLpRelaxation& lpRelaxation,
351351
// generate cut
352352
double rhs = 0;
353353
success = cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs,
354-
false, true);
354+
false, currPathLen == 1);
355355

356356
lpAggregator.getCurrentAggregation(baseRowInds, baseRowVals, true);
357357
if (!aggregatedPath.empty() || bestOutArcCol != -1 ||
@@ -361,7 +361,7 @@ void HighsPathSeparator::separateLpSolution(HighsLpRelaxation& lpRelaxation,
361361
// generate reverse cut
362362
rhs = 0;
363363
success |= cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs,
364-
false, true);
364+
false, currPathLen == 1);
365365

366366
if (success || (bestOutArcCol == -1 && bestInArcCol == -1)) break;
367367

0 commit comments

Comments
 (0)