Skip to content

Commit c88d8a9

Browse files
committed
Change if condition
1 parent 248e946 commit c88d8a9

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

highs/presolve/HPresolve.cpp

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4117,19 +4117,18 @@ HPresolve::Result HPresolve::colPresolve(HighsPostsolveStack& postsolve_stack,
41174117
HighsInt direction,
41184118
bool isBoundImplied, HighsInt numInf) {
41194119
if (isBoundImplied && row != -1 && numInf == 1 &&
4120-
direction * model->col_cost_[col] >= 0) {
4121-
if (model->row_lower_[row] == -kHighsInf ||
4122-
model->row_upper_[row] == kHighsInf) {
4123-
HighsInt nzPos = findNonzero(row, col);
4124-
4125-
if (model->integrality_[col] != HighsVarType::kInteger ||
4126-
(rowsizeInteger[row] == rowsize[row] &&
4127-
rowCoefficientsIntegral(row, 1.0 / Avalue[nzPos]))) {
4128-
if (direction * Avalue[nzPos] > 0)
4129-
changeImplRowDualLower(row, 0.0, col);
4130-
else
4131-
changeImplRowDualUpper(row, 0.0, col);
4132-
}
4120+
direction * model->col_cost_[col] >= 0 &&
4121+
(model->row_lower_[row] == -kHighsInf ||
4122+
model->row_upper_[row] == kHighsInf)) {
4123+
HighsInt nzPos = findNonzero(row, col);
4124+
4125+
if (model->integrality_[col] != HighsVarType::kInteger ||
4126+
(rowsizeInteger[row] == rowsize[row] &&
4127+
rowCoefficientsIntegral(row, 1.0 / Avalue[nzPos]))) {
4128+
if (direction * Avalue[nzPos] > 0)
4129+
changeImplRowDualLower(row, 0.0, col);
4130+
else
4131+
changeImplRowDualUpper(row, 0.0, col);
41334132
}
41344133
}
41354134
};

0 commit comments

Comments
 (0)