[Coin-discuss] CBC Pre/postprocessing

Geoff Leyland geoff_leyland at fastmail.fm
Tue May 24 22:49:19 EDT 2011


Hi,

As far as I can tell, if I set up preprocessing on a CBC model with:

  CbcStrategyDefault *s = new CbcStrategyDefault(true, 5, 0, 2);
  s->setupPreProcessing();
  model->setStrategy(s);

Then when I 

  model->initialSolve();
  model->branchAndBound();

the model will be preprocessed before the solve starts, and postprocessed once the solve ends.  However (again, as far as I can tell), if the problem has no integers, then it is not postprocessed.  I think the offending code starts at CbcModel line 2009:

    } else if (!numberObjects_) {
        // nothing to do
        solverCharacteristics_ = NULL;
        bestObjective_ = solver_->getObjValue() * solver_->getObjSense();
        int numberColumns = solver_->getNumCols();
        delete [] bestSolution_;
        bestSolution_ = new double[numberColumns];
        CoinCopyN(solver_->getColSolution(), numberColumns, bestSolution_);
        return ;
    }

In contrast to the other early returns, there's still a valid solution when there's no integers, so I think so postprocessing should happen here.

Cheers,
Geoff




More information about the Coin-discuss mailing list