Skip to content

Commit 0ee2ec8

Browse files
committed
More comments
1 parent ec7aa4d commit 0ee2ec8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

highs/presolve/HPresolve.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4605,6 +4605,7 @@ HPresolve::Result HPresolve::dualFixing(HighsPostsolveStack& postsolve_stack,
46054605
}
46064606
};
46074607

4608+
// lambda for variable substitution
46084609
auto substituteCol = [&](HighsInt col, HighsInt row, HighsInt direction,
46094610
double colBound, double otherColBound) {
46104611
for (const auto& rowNz : getRowVector(row)) {
@@ -4775,6 +4776,7 @@ HPresolve::Result HPresolve::dualFixing(HighsPostsolveStack& postsolve_stack,
47754776
// check if variable can be fixed
47764777
if (numDownLocks + (model->col_cost_[col] < 0 ? 1 : 0) == 0 ||
47774778
numUpLocks + (model->col_cost_[col] > 0 ? 1 : 0) == 0) {
4779+
// fix variable
47784780
if (numDownLocks == 0 ? fixColToLowerOrUnbounded(postsolve_stack, col)
47794781
: fixColToUpperOrUnbounded(postsolve_stack, col)) {
47804782
// handle unboundedness
@@ -4785,6 +4787,7 @@ HPresolve::Result HPresolve::dualFixing(HighsPostsolveStack& postsolve_stack,
47854787
if (mipsolver != nullptr && (numDownLocks == 1 || numUpLocks == 1) &&
47864788
model->col_lower_[col] != -kHighsInf &&
47874789
model->col_upper_[col] != kHighsInf) {
4790+
// try substitution
47884791
if (numDownLocks == 1) {
47894792
HPRESOLVE_CHECKED_CALL(substituteCol(col, downLockRow, HighsInt{1},
47904793
model->col_upper_[col],

0 commit comments

Comments
 (0)