Skip to content

Commit 74aff96

Browse files
committed
Change when minefficacy used
1 parent 45df9ca commit 74aff96

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

highs/mip/HighsCutGeneration.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ bool HighsCutGeneration::cmirCutGenerationHeuristic(double minEfficacy,
806806

807807
deltas.erase(std::remove(deltas.begin(), deltas.end(), 0.0), deltas.end());
808808
double bestdelta = -1;
809-
double bestefficacy = minEfficacy;
809+
double bestefficacy = feastol;
810810

811811
for (double delta : deltas) {
812812
double scale = 1.0 / delta;
@@ -916,6 +916,8 @@ bool HighsCutGeneration::cmirCutGenerationHeuristic(double minEfficacy,
916916
}
917917
}
918918

919+
if (bestefficacy < minEfficacy) return false;
920+
919921
HighsCDouble scale = 1.0 / HighsCDouble(bestdelta);
920922
HighsCDouble scalrhs = rhs * scale;
921923
double downrhs = floor(double(scalrhs));
@@ -1950,7 +1952,7 @@ bool HighsCutGeneration::tryGenerateCut(std::vector<HighsInt>& inds_,
19501952
rhs = tmpRhs;
19511953
} else {
19521954
// accept cut and increase minimum efficiency requirement for cmir cut
1953-
minMirEfficacy += efficacy;
1955+
minMirEfficacy += feastol;
19541956
std::swap(tmpRhs, rhs);
19551957
}
19561958
}

0 commit comments

Comments
 (0)