Skip to content

Commit 9d1552e

Browse files
committed
Improve comments
1 parent c17dfa9 commit 9d1552e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

highs/presolve/HPresolve.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,29 +1259,31 @@ HPresolve::Result HPresolve::dominatedColumns(
12591259
return Result::kOk;
12601260
};
12611261

1262-
// see Gamrath, G., Koch, T., Martin, A. et al. Progress in presolving for
1263-
// mixed integer programming. Math. Prog. Comp. 7, 367–398 (2015).
1262+
// the worst-case lower bound provides an upper bound on the binary (see
1263+
// dual fixing method)
12641264
if (model->col_cost_[j] >= 0.0 &&
12651265
computeWorstCaseLowerBound(j) <= 1 + primal_feastol) {
1266-
// cost is positive and 1 + primal_feastol >= worstCaseLb >= 0, i.e.
1267-
// worstCaseLb agrees with the bounds: try to find dominated variable
1268-
// that allows for fixing binary variable to zero
1266+
// upper bound on binary is implied (due to worst-case lower bound)
12691267
upperImplied = true;
12701268
if (!lowerImplied && bestRowMinus != -1) {
1269+
// since the binary's objective coefficient is non-negative, try to
1270+
// fix it to zero
12711271
HPRESOLVE_CHECKED_CALL(checkFixBinary(bestRowMinus, j, HighsInt{-1},
12721272
bestRowMinusScale,
12731273
ajBestRowMinus));
12741274
if (colDeleted[j]) continue;
12751275
}
12761276
}
12771277

1278+
// the worst-case upper bound provides a lower bound on the binary (see
1279+
// dual fixing method)
12781280
if (model->col_cost_[j] <= 0.0 &&
12791281
computeWorstCaseUpperBound(j) >= -primal_feastol) {
1280-
// cost is negative and 0 >= worstCaseUb >= -primal_feastol, i.e.
1281-
// worstCaseUb agrees with the bounds: try to find dominated variable
1282-
// that allows for fixing binary variable to one
1282+
// lower bound on binary is implied (due to worst-case upper bound)
12831283
lowerImplied = true;
12841284
if (!upperImplied && bestRowPlus != -1) {
1285+
// since the binary's objective coefficient is non-positive, try to
1286+
// fix it to one
12851287
HPRESOLVE_CHECKED_CALL(checkFixBinary(
12861288
bestRowPlus, j, HighsInt{1}, bestRowPlusScale, ajBestRowPlus));
12871289
if (colDeleted[j]) continue;

0 commit comments

Comments
 (0)