@@ -1172,6 +1172,7 @@ HPresolve::Result HPresolve::dominatedColumns(
11721172
11731173 bool checkPosRow = upperImplied || colIsBinary;
11741174 bool checkNegRow = lowerImplied || colIsBinary;
1175+
11751176 for (const HighsSliceNonzero& nonz : getColumnVector (j)) {
11761177 HighsInt row = nonz.index ();
11771178 HighsInt scale = model->row_upper_ [row] != kHighsInf ? 1 : -1 ;
@@ -1252,29 +1253,20 @@ HPresolve::Result HPresolve::dominatedColumns(
12521253
12531254 double ak = nonz.value () * scale;
12541255
1255- if (direction * bestVal <=
1256- direction * ak + options->small_matrix_value &&
1257- (!isEqOrRangedRow ||
1258- direction * bestVal >=
1259- direction * ak - options->small_matrix_value ) &&
1260- checkDomination (direction, col, direction, k)) {
1261- // direction = 1:
1262- // case (i) ub(x_j) = inf, x_j > x_k: set x_k = lb(x_k)
1263- // direction = -1:
1264- // case (iii) lb(x_j) = -inf, -x_j > -x_k: set x_k = ub(x_k)
1265- ++numFixedCols;
1266- HPRESOLVE_CHECKED_CALL (fixCol (col, direction));
1267- break ;
1268- } else if (direction * bestVal <=
1269- -direction * ak + options->small_matrix_value &&
1270- (!isEqOrRangedRow ||
1271- direction * bestVal >=
1272- -direction * ak - options->small_matrix_value ) &&
1273- checkDomination (direction, col, -direction, k)) {
1274- // direction = 1:
1275- // case (ii) ub(x_j) = inf, x_j > -x_k: set x_k = ub(x_k)
1276- // direction = -1:
1277- // case (iv) lb(x_j) = -inf, -x_j > x_k: set x_k = lb(x_k)
1256+ if ((direction * bestVal <=
1257+ direction * ak + options->small_matrix_value &&
1258+ (!isEqOrRangedRow ||
1259+ direction * bestVal >=
1260+ direction * ak - options->small_matrix_value ) &&
1261+ checkDomination (direction, col, direction, k)) ||
1262+ (direction * bestVal <=
1263+ -direction * ak + options->small_matrix_value &&
1264+ (!isEqOrRangedRow ||
1265+ direction * bestVal >=
1266+ -direction * ak - options->small_matrix_value ) &&
1267+ checkDomination (direction, col, -direction, k))) {
1268+ // direction = 1: fix binary variable to one
1269+ // direction = -1: fix binary variable to zero
12781270 ++numFixedCols;
12791271 HPRESOLVE_CHECKED_CALL (fixCol (col, direction));
12801272 break ;
0 commit comments