Skip to content

Commit 3856a5d

Browse files
committed
Revert cmir change. Fix min eff calc
1 parent 8a85830 commit 3856a5d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

highs/mip/HighsCutGeneration.cpp

Lines changed: 2 additions & 4 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 = feastol;
809+
double bestefficacy = minEfficacy;
810810

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

919-
if (bestefficacy < minEfficacy) return false;
920-
921919
HighsCDouble scale = 1.0 / HighsCDouble(bestdelta);
922920
HighsCDouble scalrhs = rhs * scale;
923921
double downrhs = floor(double(scalrhs));
@@ -1953,7 +1951,7 @@ bool HighsCutGeneration::tryGenerateCut(std::vector<HighsInt>& inds_,
19531951
rhs = tmpRhs;
19541952
} else {
19551953
// accept cut and increase minimum efficiency requirement for cmir cut
1956-
minMirEfficacy += feastol;
1954+
minMirEfficacy = std::max(minEfficacy, efficacy) + feastol;
19571955
std::swap(tmpRhs, rhs);
19581956
}
19591957
}

0 commit comments

Comments
 (0)