Skip to content

Commit bf8e4fe

Browse files
committed
Simplify again
1 parent cacef11 commit bf8e4fe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

highs/presolve/HPresolve.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ HPresolve::Result HPresolve::dominatedColumns(
12041204
};
12051205

12061206
// lambda for tightening bounds
1207-
auto tightenBounds = [&](HighsInt col, double colBound, HighsInt direction,
1207+
auto tightenBounds = [&](HighsInt col, double colBound, bool colIsAtUpper,
12081208
HighsInt otherCol, double otherColBound,
12091209
HighsInt otherColCoeffPattern) {
12101210
// bound should be finite
@@ -1215,7 +1215,7 @@ HPresolve::Result HPresolve::dominatedColumns(
12151215
double lowerBound = -kHighsInf;
12161216
double upperBound = kHighsInf;
12171217
// predictive bound analysis, see Theorem 3 from Gamrath et al.'s paper
1218-
if (direction > 0) {
1218+
if (colIsAtUpper) {
12191219
// (i) x_j <= MINL^k_j(otherColBound)
12201220
upperBound = computeImpliedUpperBound(col, otherCol, otherColBound,
12211221
otherColCoeffPattern);
@@ -1326,12 +1326,12 @@ HPresolve::Result HPresolve::dominatedColumns(
13261326
// tighten bounds via predictive bound analysis, see Theorem 3
13271327
// from Gamrath et al.'s paper
13281328
if (isDominatedBoundFinite)
1329-
HPRESOLVE_CHECKED_CALL(tightenBounds(col, dominatingBound,
1330-
direction, k, dominatedBound,
1331-
direction * direction_k));
1329+
HPRESOLVE_CHECKED_CALL(
1330+
tightenBounds(col, dominatingBound, direction > 0, k,
1331+
dominatedBound, direction * direction_k));
13321332
if (!colDeleted[col] && isDominatingBoundFinite)
13331333
HPRESOLVE_CHECKED_CALL(
1334-
tightenBounds(k, dominatedBound, -direction_k, col,
1334+
tightenBounds(k, dominatedBound, direction_k < 0, col,
13351335
dominatingBound, direction * direction_k));
13361336
}
13371337
}

0 commit comments

Comments
 (0)