Changeset 1413


Ignore:
Timestamp:
Apr 10, 2009 7:05:07 AM (11 years ago)
Author:
pbonami
Message:

Fix for B-BB when problem is continuous

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bonmin/src/CbcBonmin/BonCbc.cpp

    r1376 r1413  
    560560      if (bestSolution_)
    561561        delete [] bestSolution_;
    562       bestSolution_ = new double[s.nonlinearSolver()->getNumCols()];
    563       CoinCopyN(s.nonlinearSolver()->getColSolution(), s.nonlinearSolver()->getNumCols(),
     562      OsiSolverInterface * solver =
     563             (s.nonlinearSolver() == s.continuousSolver())?
     564             model_.solver() : s.nonlinearSolver();
     565      bestSolution_ = new double[solver->getNumCols()];
     566      CoinCopyN(solver->getColSolution(), solver->getNumCols(),
    564567          bestSolution_);
    565       bestObj_ = bestBound_ = s.nonlinearSolver()->getObjValue();
     568      bestObj_ = bestBound_ = solver->getObjValue();
    566569    }
    567570
Note: See TracChangeset for help on using the changeset viewer.