coin-or / Cbc.old

This is a mirror of the subversion repository on COIN-OR
https://projects.coin-or.org/Cbc
Other
88 stars 30 forks source link

[Trac #148] Standalone solver option nodeStrategy broken for up/down selection #59

Open s-c-e opened 5 years ago

s-c-e commented 5 years ago

image

Some of the values for this option are updepth, downdepth, upfewest, downfewest.

The code to distinguish the up/down direction seems to depend on the parity of the integer representing the option value, but this is the code:

int way = (((nodeStrategy - 1) % 1) == 1) ? -1 : +1; babModel_->setPreferredWay(way);

It seems that this should instead be:

int way = (((nodeStrategy - 1) % 2) == 1) ? -1 : +1; babModel_->setPreferredWay(way);