COIN-OR::LEMON - Graph Library

Changeset 1124:b1744d7bdb47 in lemon


Ignore:
Timestamp:
01/11/12 14:12:36 (8 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Parents:
1118:22201ee8e437 (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
Message:

Merge LP interface updates

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • lemon/cbc.cc

    r793 r1122  
    2626#include <coin/OsiSolverInterface.hpp>
    2727
    28 #ifdef COIN_HAS_CLP
    2928#include "coin/OsiClpSolverInterface.hpp"
    30 #endif
    31 #ifdef COIN_HAS_OSL
    32 #include "coin/OsiOslSolverInterface.hpp"
    33 #endif
    3429
    3530#include "coin/CbcCutGenerator.hpp"
     
    271266      delete _osi_solver;
    272267    }
    273 #ifdef COIN_HAS_CLP
    274268    _osi_solver = new OsiClpSolverInterface();
    275 #elif COIN_HAS_OSL
    276     _osi_solver = new OsiOslSolverInterface();
    277 #else
    278 #error Cannot instantiate Osi solver
    279 #endif
    280269
    281270    _osi_solver->loadFromCoinModel(*_prob);
     
    329318      _cbc_model->addCutGenerator(&flowGen, -1, "FlowCover");
    330319
    331 #ifdef COIN_HAS_CLP
    332320      OsiClpSolverInterface* osiclp =
    333321        dynamic_cast<OsiClpSolverInterface*>(_cbc_model->solver());
     
    335323        osiclp->setupForRepeatedUse(2, 0);
    336324      }
    337 #endif
    338325
    339326      CbcRounding heuristic1(*_cbc_model);
  • lemon/cbc.cc

    r1120 r1122  
    9090  }
    9191
     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  }
    92104
    93105  void CbcMip::_eraseCol(int i) {
  • test/CMakeLists.txt

    r1111 r1124  
    9090    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
    9191    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
    92       COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
     92      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
    9393    )
    9494  ENDIF()
     
    132132    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
    133133    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
    134       COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
     134      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
    135135    )
    136136  ENDIF()
  • test/CMakeLists.txt

    r1119 r1124  
    1414SET(TESTS
    1515  adaptors_test
     16  bellman_ford_test
    1617  bfs_test
    1718  circulation_test
     
    2526  error_test
    2627  euler_test
     28  fractional_matching_test
    2729  gomory_hu_test
    2830  graph_copy_test
     
    3537  maps_test
    3638  matching_test
     39  max_cardinality_search_test
     40  max_clique_test
    3741  min_cost_arborescence_test
    3842  min_cost_flow_test
     43  min_mean_cycle_test
     44  nagamochi_ibaraki_test
    3945  path_test
     46  planarity_test
    4047  preflow_test
    4148  radix_sort_test
Note: See TracChangeset for help on using the changeset viewer.