Changeset 1122:0976225b5cae in lemon
- Timestamp:
- 01/11/12 14:01:21 (13 years ago)
- Branch:
- 1.2
- Parents:
- 1117:10271bbbb793 (diff), 1120: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:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/cbc.cc
r793 r1122 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
r1120 r1122 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) { -
test/CMakeLists.txt
r1110 r1122 87 87 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) 88 88 ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD 89 COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex 91.dll ${TARGET_PATH}89 COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH} 90 90 ) 91 91 ENDIF() … … 129 129 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) 130 130 ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD 131 COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex 91.dll ${TARGET_PATH}131 COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH} 132 132 ) 133 133 ENDIF() -
test/CMakeLists.txt
r1119 r1122 14 14 SET(TESTS 15 15 adaptors_test 16 bellman_ford_test 16 17 bfs_test 17 18 circulation_test … … 25 26 error_test 26 27 euler_test 28 fractional_matching_test 27 29 gomory_hu_test 28 30 graph_copy_test … … 37 39 min_cost_arborescence_test 38 40 min_cost_flow_test 41 min_mean_cycle_test 39 42 path_test 43 planarity_test 40 44 preflow_test 41 45 radix_sort_test
Note: See TracChangeset
for help on using the changeset viewer.