@@ -238,6 +238,11 @@ bool HPresolve::isEquation(HighsInt row) const {
238238 return (model->row_lower_ [row] == model->row_upper_ [row]);
239239}
240240
241+ bool HPresolve::isRanged (HighsInt row) const {
242+ return (model->row_lower_ [row] != -kHighsInf &&
243+ model->row_upper_ [row] != kHighsInf );
244+ }
245+
241246bool HPresolve::isImpliedEquationAtLower (HighsInt row) const {
242247 // if the implied lower bound on a row dual is strictly positive then the row
243248 // is an implied equation (using its lower bound) due to complementary
@@ -3899,8 +3904,7 @@ HPresolve::Result HPresolve::rowPresolve(HighsPostsolveStack& postsolve_stack,
38993904 }
39003905 }
39013906 }
3902- } else if (model->row_lower_ [row] == -kHighsInf ||
3903- model->row_upper_ [row] == kHighsInf ) {
3907+ } else if (!isRanged (row)) {
39043908 // Chvatal-Gomory strengthening
39053909 // See section 3.4 "Chvatal-Gomory strengthening of inequalities",
39063910 // Achterberg et al., Presolve Reductions in Mixed Integer
@@ -4321,9 +4325,7 @@ HPresolve::Result HPresolve::colPresolve(HighsPostsolveStack& postsolve_stack,
43214325 HighsInt direction,
43224326 bool isBoundImplied, HighsInt numInf) {
43234327 if (isBoundImplied && row != -1 && numInf == 1 &&
4324- direction * model->col_cost_ [col] >= 0 &&
4325- (model->row_lower_ [row] == -kHighsInf ||
4326- model->row_upper_ [row] == kHighsInf )) {
4328+ direction * model->col_cost_ [col] >= 0 && !isRanged (row)) {
43274329 HighsInt nzPos = findNonzero (row, col);
43284330
43294331 if (model->integrality_ [col] != HighsVarType::kInteger ||
@@ -5700,9 +5702,7 @@ HPresolve::Result HPresolve::strengthenInequalities(
57005702
57015703 for (HighsInt row = 0 ; row != model->num_row_ ; ++row) {
57025704 if (rowsize[row] <= 1 ) continue ;
5703- if (model->row_lower_ [row] != -kHighsInf &&
5704- model->row_upper_ [row] != kHighsInf )
5705- continue ;
5705+ if (isRanged (row)) continue ;
57065706
57075707 // do not run on very dense rows as this could get expensive
57085708 HighsInt rowsize_limit =
0 commit comments