COIN-OR::LEMON - Graph Library

Changeset 1122:0976225b5cae in lemon


Ignore:
Timestamp:
01/11/12 14:01:21 (13 years ago)
Author:
Alpar Juttner <alpar@…>
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
Message:

Merge LP interface updates to branch 1.2

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

    r1110 r1122  
    8787    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
    8888    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
    89       COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
     89      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
    9090    )
    9191  ENDIF()
     
    129129    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
    130130    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
    131       COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
     131      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
    132132    )
    133133  ENDIF()
  • test/CMakeLists.txt

    r1119 r1122  
    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
     
    3739  min_cost_arborescence_test
    3840  min_cost_flow_test
     41  min_mean_cycle_test
    3942  path_test
     43  planarity_test
    4044  preflow_test
    4145  radix_sort_test
Note: See TracChangeset for help on using the changeset viewer.