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 9d9fb28 commit 03117ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CbcNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3647,7 +3647,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) {
#if TRY_NODE_DOUBLE>0
if (doubleTry==2&&distance<2.0) {
// look carefully
Expand Down Expand Up @@ -3943,7 +3943,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) {
#if TRY_NODE_DOUBLE>0
if (doubleTry==2&&distance<2.0) {
// look carefully
Expand Down

0 comments on commit 03117ee

Please sign in to comment.