Changeset 974:b1744d7bdb47 in lemon-main for lemon
- Timestamp:
- 01/11/12 14:12:36 (13 years ago)
- Branch:
- default
- Parents:
- 971:22201ee8e437 (diff), 973:ee581a0ecfbf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Phase:
- public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/cbc.cc
r746 r974 26 26 #include <coin/OsiSolverInterface.hpp> 27 27 28 #ifdef COIN_HAS_CLP29 28 #include "coin/OsiClpSolverInterface.hpp" 30 #endif31 #ifdef COIN_HAS_OSL32 #include "coin/OsiOslSolverInterface.hpp"33 #endif34 29 35 30 #include "coin/CbcCutGenerator.hpp" … … 271 266 delete _osi_solver; 272 267 } 273 #ifdef COIN_HAS_CLP274 268 _osi_solver = new OsiClpSolverInterface(); 275 #elif COIN_HAS_OSL276 _osi_solver = new OsiOslSolverInterface();277 #else278 #error Cannot instantiate Osi solver279 #endif280 269 281 270 _osi_solver->loadFromCoinModel(*_prob); … … 329 318 _cbc_model->addCutGenerator(&flowGen, -1, "FlowCover"); 330 319 331 #ifdef COIN_HAS_CLP332 320 OsiClpSolverInterface* osiclp = 333 321 dynamic_cast<OsiClpSolverInterface*>(_cbc_model->solver()); … … 335 323 osiclp->setupForRepeatedUse(2, 0); 336 324 } 337 #endif338 325 339 326 CbcRounding heuristic1(*_cbc_model); -
lemon/cbc.cc
r973 r974 90 90 } 91 91 92 int CbcMip::_addRow(Value l, ExprIterator b, ExprIterator e, Value u) { 93 std::vector<int> indexes; 94 std::vector<Value> values; 95 96 for(ExprIterator it = b; it != e; ++it) { 97 indexes.push_back(it->first); 98 values.push_back(it->second); 99 } 100 101 _prob->addRow(values.size(), &indexes.front(), &values.front(), l, u); 102 return _prob->numberRows() - 1; 103 } 92 104 93 105 void CbcMip::_eraseCol(int i) {
Note: See TracChangeset
for help on using the changeset viewer.