Skip to content

Commit f6255b8

Browse files
authored
Merge pull request #2375 from ERGO-Code/rens-rins-fix-val-clean
Fix code to match comment
2 parents e1d1477 + 7664810 commit f6255b8

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
@@ -447,7 +447,7 @@ void HighsPrimalHeuristics::RENS(const std::vector<double>& tmp) {
447447
fixval = std::ceil(fracval);
448448
else if (rootchange <= -0.4)
449449
fixval = std::floor(fracval);
450-
if (mipsolver.model_->col_cost_[col] > 0.0)
450+
else if (mipsolver.model_->col_cost_[col] > 0.0)
451451
fixval = std::ceil(fracval);
452452
else if (mipsolver.model_->col_cost_[col] < 0.0)
453453
fixval = std::floor(fracval);
@@ -676,7 +676,7 @@ void HighsPrimalHeuristics::RINS(const std::vector<double>& relaxationsol) {
676676
fixval = std::ceil(fracval);
677677
else if (rootchange <= -0.4)
678678
fixval = std::floor(fracval);
679-
if (mipsolver.model_->col_cost_[col] > 0.0)
679+
else if (mipsolver.model_->col_cost_[col] > 0.0)
680680
fixval = std::ceil(fracval);
681681
else if (mipsolver.model_->col_cost_[col] < 0.0)
682682
fixval = std::floor(fracval);

0 commit comments

Comments
 (0)