Skip to content

Commit 274135a

Browse files
committed
Clean up again
1 parent eadde68 commit 274135a

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

highs/presolve/HPresolve.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4710,26 +4710,24 @@ HPresolve::Result HPresolve::singletonColStuffing(
47104710
HighsCDouble sumUpper = 0.0;
47114711

47124712
for (auto& nz : getRowVector(row)) {
4713-
// get column index, coefficient, cost and bounds
4713+
// get column index, coefficient and cost
47144714
HighsInt j = nz.index();
47154715
double aj = direction * nz.value();
47164716
double cj = model->col_cost_[j];
4717-
HighsCDouble lb = static_cast<HighsCDouble>(model->col_lower_[j]);
4718-
HighsCDouble ub = static_cast<HighsCDouble>(model->col_upper_[j]);
4719-
4720-
// consider only non-fixed singleton continuous columns
4721-
HighsCDouble lowerSumBound = lb;
4722-
HighsCDouble upperSumBound = ub;
4717+
HighsCDouble lowerSumBound =
4718+
static_cast<HighsCDouble>(model->col_lower_[j]);
4719+
HighsCDouble upperSumBound =
4720+
static_cast<HighsCDouble>(model->col_upper_[j]);
47234721
if (isContSingleton(j)) {
47244722
// check singleton
47254723
if (aj > 0) {
47264724
// use lower bound
4727-
upperSumBound = lb;
4725+
upperSumBound = lowerSumBound;
47284726
// candidate for stuffing?
47294727
if (cj < 0) candidates.push_back(std::make_tuple(j, aj, HighsInt{1}));
47304728
} else {
47314729
// use upper bound
4732-
lowerSumBound = ub;
4730+
lowerSumBound = upperSumBound;
47334731
// candidate for stuffing? multiply column with -1
47344732
if (cj > 0)
47354733
candidates.push_back(std::make_tuple(j, aj, HighsInt{-1}));

0 commit comments

Comments
 (0)