[Coin-discuss] CBC Pre/postprocessing
John Forrest
john.forrest at fastercoin.com
Wed May 25 04:59:36 EDT 2011
I have modified CbcModel.cpp in trunk and 2.6. Fixes problem on my one
simple test.
John Forrest
On Wed, 2011-05-25 at 14:49 +1200, Geoff Leyland wrote:
> 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
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>
More information about the Coin-discuss
mailing list