Skip to content

Commit d76bdb5

Browse files
committed
Fix minor comments
1 parent 48be3da commit d76bdb5

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

highs/mip/HighsPathSeparator.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ void HighsPathSeparator::separateLpSolution(HighsLpRelaxation& lpRelaxation,
116116
i != lp.a_matrix_.start_[col + 1]; ++i) {
117117
HighsInt row = lp.a_matrix_.index_[i];
118118
if (rowtype[row] == RowType::kUnusuable) continue;
119-
double val = lp.a_matrix_.value_[i];
120-
rowscore[row].first += std::abs(val * transLp.getColFractionality(col));
121-
rowscore[row].second += std::abs(val);
119+
double val = std::abs(lp.a_matrix_.value_[i]);
120+
rowscore[row].first += val * transLp.getColFractionality(col);
121+
rowscore[row].second += val;
122122
}
123123
}
124124
for (HighsInt row = 0; row != lp.num_row_; ++row) {

highs/mip/HighsTransformedLp.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,13 @@ HighsTransformedLp::HighsTransformedLp(const HighsLpRelaxation& lprelaxation,
6262
if (lbDist[col] <= ubDist[col] && lbDist[col] == 0 &&
6363
bestVlb[col].first != -1) {
6464
const double frac =
65-
std::min(lpSolution.col_value[bestVlb[col].first],
66-
1 - lpSolution.col_value[bestVlb[col].first]);
67-
colFractionality[col] = bestVlb[col].second.coef * frac;
65+
fractionality(lpSolution.col_value[bestVlb[col].first]);
66+
colFractionality[col] = std::abs(bestVlb[col].second.coef * frac);
6867
} else if (ubDist[col] <= lbDist[col] && ubDist[col] == 0 &&
6968
bestVub[col].first != -1) {
7069
const double frac =
71-
std::min(lpSolution.col_value[bestVub[col].first],
72-
1 - lpSolution.col_value[bestVub[col].first]);
73-
colFractionality[col] = bestVub[col].second.coef * frac;
70+
fractionality(lpSolution.col_value[bestVub[col].first]);
71+
colFractionality[col] = std::abs(bestVub[col].second.coef) * frac;
7472
}
7573
}
7674

0 commit comments

Comments
 (0)