Skip to content

Commit 7664810

Browse files
committed
Fix logic to follow comment.
1 parent be50c23 commit 7664810

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

highs/mip/HighsPrimalHeuristics.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ void HighsPrimalHeuristics::RENS(const std::vector<double>& tmp) {
444444
fixval = std::ceil(fracval);
445445
else if (rootchange <= -0.4)
446446
fixval = std::floor(fracval);
447-
if (mipsolver.model_->col_cost_[col] > 0.0)
447+
else if (mipsolver.model_->col_cost_[col] > 0.0)
448448
fixval = std::ceil(fracval);
449449
else if (mipsolver.model_->col_cost_[col] < 0.0)
450450
fixval = std::floor(fracval);
@@ -673,7 +673,7 @@ void HighsPrimalHeuristics::RINS(const std::vector<double>& relaxationsol) {
673673
fixval = std::ceil(fracval);
674674
else if (rootchange <= -0.4)
675675
fixval = std::floor(fracval);
676-
if (mipsolver.model_->col_cost_[col] > 0.0)
676+
else if (mipsolver.model_->col_cost_[col] > 0.0)
677677
fixval = std::ceil(fracval);
678678
else if (mipsolver.model_->col_cost_[col] < 0.0)
679679
fixval = std::floor(fracval);

0 commit comments

Comments
 (0)