Skip to content

Commit 248e946

Browse files
committed
Add comment
1 parent e7bccce commit 248e946

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

highs/lp_data/HighsLpUtils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2564,7 +2564,8 @@ HighsStatus assessLpPrimalSolution(const std::string message,
25642564
HighsStatus return_status =
25652565
calculateRowValuesQuad(lp, solution.col_value, row_value);
25662566
if (return_status != HighsStatus::kOk) return return_status;
2567-
const bool have_row_names = lp.row_names_.size() >= lp.num_row_;
2567+
const bool have_row_names =
2568+
lp.row_names_.size() >= static_cast<size_t>(lp.num_row_);
25682569
for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) {
25692570
const double primal = solution.row_value[iRow];
25702571
const double lower = lp.row_lower_[iRow];

highs/presolve/HPresolve.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4110,12 +4110,9 @@ HPresolve::Result HPresolve::colPresolve(HighsPostsolveStack& postsolve_stack,
41104110

41114111
// column is not (weakly) dominated
41124112

4113-
// the associated dual constraint has an upper bound if there is an infinite
4114-
// or redundant column lower bound as then the reduced cost of the column must
4115-
// not be positive i.e. <= 0
4116-
41174113
// integer columns cannot be used to tighten bounds on dual multipliers
41184114
if (mipsolver != nullptr) {
4115+
// lambda for changing implied row dual
41194116
auto modifyImpliedRowDualBound = [&](HighsInt col, HighsInt row,
41204117
HighsInt direction,
41214118
bool isBoundImplied, HighsInt numInf) {
@@ -4137,10 +4134,16 @@ HPresolve::Result HPresolve::colPresolve(HighsPostsolveStack& postsolve_stack,
41374134
}
41384135
};
41394136

4137+
// if there is an infinite or redundant column lower bound, the reduced
4138+
// cost of the column must not be positive (i.e. <= 0; the upper bound on
4139+
// the reduced cost is zero).
41404140
modifyImpliedRowDualBound(col, colLowerSource[col], HighsInt{1},
41414141
isLowerImplied(col),
41424142
impliedDualRowBounds.getNumInfSumUpperOrig(col));
41434143

4144+
// if there is an infinite or redundant column upper bound, the reduced
4145+
// cost of the column must not be negative (i.e. >= 0; the lower bound on
4146+
// the reduced cost is zero).
41444147
modifyImpliedRowDualBound(col, colUpperSource[col], HighsInt{-1},
41454148
isUpperImplied(col),
41464149
impliedDualRowBounds.getNumInfSumLowerOrig(col));

0 commit comments

Comments
 (0)