Changeset 2468 for stable


Ignore:
Timestamp:
Jan 6, 2019 10:15:14 AM (11 months ago)
Author:
forrest
Message:

allow solver_ to remain same around branchAndBound

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stable/2.9/Cbc/src/CbcModel.cpp

    r2374 r2468  
    52015201            continuousSolver_->initialSolve() ;
    52025202        }
    5203         delete solver_ ;
    5204         // above deletes solverCharacteristics_
    5205         solverCharacteristics_ = NULL;
    5206         solver_ = continuousSolver_ ;
     5203#ifdef COIN_HAS_CLP
     5204#ifndef KEEP_ORIGINAL_SOLVER
     5205        delete solver_;
     5206        // above deletes solverCharacteristics_
     5207        solverCharacteristics_ = NULL;
     5208        solver_ = continuousSolver_;
     5209#else
     5210        OsiClpSolverInterface *clpSolver
     5211          = dynamic_cast< OsiClpSolverInterface * >(solver_);
     5212        if (clpSolver) {
     5213          OsiClpSolverInterface *continuousSolver
     5214            = dynamic_cast< OsiClpSolverInterface * >(continuousSolver_);
     5215          //ClpSimplex *simplex = clpSolver->getModelPtr();
     5216          *clpSolver = *continuousSolver;
     5217          solverCharacteristics_ = NULL;
     5218          delete continuousSolver_;
     5219        } else {
     5220          delete solver_;
     5221          // above deletes solverCharacteristics_
     5222          solverCharacteristics_ = NULL;
     5223          solver_ = continuousSolver_;
     5224        }
     5225#endif
     5226#else
     5227        delete solver_;
     5228        // above deletes solverCharacteristics_
     5229        solverCharacteristics_ = NULL;
     5230        solver_ = continuousSolver_;
     5231#endif
    52075232        setPointers(solver_);
    52085233        continuousSolver_ = NULL ;
Note: See TracChangeset for help on using the changeset viewer.