Skip to content

Commit

Permalink
Explicitly exclude non-finite upper or lower bounds from possible jumps
Browse files Browse the repository at this point in the history
  • Loading branch information
BenChampion committed Dec 5, 2024
1 parent 6e57ba4 commit eca84ed
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/mip/feasibilityjump.hh
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,12 @@ class JumpMove {
bestShiftBuffer.emplace_back(validRange.second, constraint.weight);
}
}

bestShiftBuffer.emplace_back(problem.vars[varIdx].lb, 0);
bestShiftBuffer.emplace_back(problem.vars[varIdx].ub, 0);
if (std::isfinite(problem.vars[varIdx].lb)) {
bestShiftBuffer.emplace_back(problem.vars[varIdx].lb, 0);
}
if (std::isfinite(problem.vars[varIdx].ub)) {
bestShiftBuffer.emplace_back(problem.vars[varIdx].ub, 0);
}
std::sort(bestShiftBuffer.begin(), bestShiftBuffer.end());

double bestScore = currentScore;
Expand Down

0 comments on commit eca84ed

Please sign in to comment.