[Couenne] Strong branching in trunk

Francois Margot fmargot at andrew.cmu.edu
Wed May 11 05:45:02 EDT 2011


Hi:

A couple of things look odd in the strong branching code in trunk.

1) in CouenneChooseStrong::chooseVariable around line 217 in the loop
starting with

for (unsigned int i=0;i < results_.size();i++) {
  int iObject = results_[i].whichObject();

it sometimes happens that after doing strong branching on all selected
variables, one of these variables, say x[i], is now fixed, i.e.
solver->getColUpper()[i] == solver->getColLower()[i]. However, since the
up and down estimates were computed before the variable became fixed, it
sometimes happens that x[i] is the variable selected for branching. This
raises an assert in OsiSimpleInteger::createBranch() (in
OsiBranchingObject.cpp,around line 625).

One way to fix this is to add at the beginning of the loop something
like

int ckInd = solver->objects()[iObject]->columnNumber();
if(ckInd >= 0) {
  double ckUp = solver->getColUpper()[ckInd];
  double ckLow = solver->getColLower()[ckInd];
  if(ckUp - ckLow < 1e-5) {
    continue;
  }
}

2) When the test 

if (results_.size() > 0) {

in CouenneChooseStrong::chooseVariable around line 194 fails, the code
do (around line 320):

bestObjectIndex_=list_[0];

This seems to ignore all information for objects selected for strong
branching but for which pseudo-costs were used. I would replace the
above by:

if(bestObjectIndex_ < 0) {                                              
  bestObjectIndex_=list_[0];
}

If using list_[0] is intentional (so that more variables get trusted
pseudo-costs), then it sometimes occur that the variable corresponding
to list_[0] is now fixed and this triggers an infinite loop. At the very
least, picking a non-fixed variable would seem wiser.

Francois




More information about the Couenne mailing list