Skip to content

Commit ee50b06

Browse files
committed
Relax approx tolerances. Enforce tolerance for ceil
1 parent a024849 commit ee50b06

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

highs/mip/HighsCutGeneration.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -717,12 +717,12 @@ bool HighsCutGeneration::cmirCutGenerationHeuristic(double minEfficacy,
717717
double scalaj = vals[j] * scale;
718718
double downaj = fast_floor(scalaj + kHighsTiny);
719719
double fj = scalaj - downaj;
720-
if (fj <= f0 + 1e-5) {
720+
if (fj <= f0 + 1e-6) {
721721
double aj = downaj;
722722
updateViolationAndNorm(j, aj, viol, sqrnorm);
723723
} else {
724-
double pj = fast_ceil(
725-
k * (fj - f0) * oneoveroneminusf0 - kHighsTiny);
724+
double pj =
725+
fast_ceil(k * (fj - f0) * oneoveroneminusf0 - (10 * epsilon));
726726
double aj = downaj + (pj / (k + 1));
727727
updateViolationAndNorm(j, aj, viol, sqrnorm);
728728
}
@@ -732,7 +732,7 @@ bool HighsCutGeneration::cmirCutGenerationHeuristic(double minEfficacy,
732732
} else {
733733
double efficacy = viol / sqrt(sqrnorm);
734734
// Use the strong CG cut instead of the CMIR if efficacy is larger
735-
if (efficacy < bestefficacy + 1e-5) {
735+
if (efficacy < bestefficacy + 1e-6) {
736736
strongcg = false;
737737
} else {
738738
bestefficacy = efficacy;
@@ -770,7 +770,8 @@ bool HighsCutGeneration::cmirCutGenerationHeuristic(double minEfficacy,
770770
if (fj > f0) {
771771
if (strongcg) {
772772
if (fj - f0 > epsilon) {
773-
HighsCDouble pj = ceil(k * (fj - f0) * oneoveroneminusf0);
773+
HighsCDouble pj =
774+
ceil(k * (fj - f0) * oneoveroneminusf0 - epsilon);
774775
aj += pj / (k + 1);
775776
}
776777
} else {

0 commit comments

Comments
 (0)