Skip to content

Commit

Permalink
make bound changing after strong branching safer
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhforrest committed Feb 5, 2025
1 parent 2e5cbd8 commit b380c42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cbc/src/CbcNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3291,7 +3291,7 @@ int CbcNode::chooseDynamicBranch(CbcModel *model, CbcNode *lastNode,
double changePer = objectiveChange / (down + 1.0e-7);
double distance = (cutoff - objectiveValue_) / changePer;
distance += 1.0e-3;
if (distance < 5.0) {
if (distance < 5.0 && down > 1.0e-3) {
double newLower = ceil(value - distance);
if (newLower > saveLower[iColumn]) {
//printf("Could increase lower bound on %d from %g to %g\n",
Expand Down Expand Up @@ -3505,7 +3505,7 @@ int CbcNode::chooseDynamicBranch(CbcModel *model, CbcNode *lastNode,
double changePer = objectiveChange / (up + 1.0e-7);
double distance = (cutoff - objectiveValue_) / changePer;
distance += 1.0e-3;
if (distance < 5.0) {
if (distance < 5.0 && up > 1.0e-3) {
double newUpper = floor(value + distance);
if (newUpper < saveUpper[iColumn]) {
//printf("Could decrease upper bound on %d from %g to %g\n",
Expand Down

0 comments on commit b380c42

Please sign in to comment.