COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/cbc.cc

    r1142 r793  
    2626#include <coin/OsiSolverInterface.hpp>
    2727
     28#ifdef COIN_HAS_CLP
    2829#include "coin/OsiClpSolverInterface.hpp"
     30#endif
     31#ifdef COIN_HAS_OSL
     32#include "coin/OsiOslSolverInterface.hpp"
     33#endif
    2934
    3035#include "coin/CbcCutGenerator.hpp"
     
    266271      delete _osi_solver;
    267272    }
     273#ifdef COIN_HAS_CLP
    268274    _osi_solver = new OsiClpSolverInterface();
     275#elif COIN_HAS_OSL
     276    _osi_solver = new OsiOslSolverInterface();
     277#else
     278#error Cannot instantiate Osi solver
     279#endif
    269280
    270281    _osi_solver->loadFromCoinModel(*_prob);
     
    318329      _cbc_model->addCutGenerator(&flowGen, -1, "FlowCover");
    319330
     331#ifdef COIN_HAS_CLP
    320332      OsiClpSolverInterface* osiclp =
    321333        dynamic_cast<OsiClpSolverInterface*>(_cbc_model->solver());
     
    323335        osiclp->setupForRepeatedUse(2, 0);
    324336      }
     337#endif
    325338
    326339      CbcRounding heuristic1(*_cbc_model);
     
    436449
    437450    _prob = new CoinModel();
     451    rows.clear();
     452    cols.clear();
    438453  }
    439454
Note: See TracChangeset for help on using the changeset viewer.