Merge LP interface updates to branch 1.1 1.1
authorAlpar Juttner <alpar@cs.elte.hu>
Wed, 11 Jan 2012 13:58:30 +0100
branch1.1
changeset 11211309a803a057
parent 1116 bed8011dc6ad
parent 1120 ee581a0ecfbf
child 1126 a30455cd0107
Merge LP interface updates to branch 1.1
     1.1 --- a/cmake/FindCOIN.cmake	Tue Dec 20 19:37:25 2011 +0100
     1.2 +++ b/cmake/FindCOIN.cmake	Wed Jan 11 13:58:30 2012 +0100
     1.3 @@ -54,6 +54,17 @@
     1.4    HINTS ${COIN_ROOT_DIR}/lib
     1.5  )
     1.6  
     1.7 +FIND_LIBRARY(COIN_ZLIB_LIBRARY
     1.8 +  NAMES z libz
     1.9 +  HINTS ${COIN_ROOT_DIR}/lib/coin
    1.10 +  HINTS ${COIN_ROOT_DIR}/lib
    1.11 +)
    1.12 +FIND_LIBRARY(COIN_BZ2_LIBRARY
    1.13 +  NAMES bz2 libbz2
    1.14 +  HINTS ${COIN_ROOT_DIR}/lib/coin
    1.15 +  HINTS ${COIN_ROOT_DIR}/lib
    1.16 +)
    1.17 +
    1.18  INCLUDE(FindPackageHandleStandardArgs)
    1.19  FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
    1.20    COIN_INCLUDE_DIR
    1.21 @@ -71,9 +82,15 @@
    1.22  
    1.23  IF(COIN_FOUND)
    1.24    SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
    1.25 -  SET(COIN_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY}")
    1.26 -  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
    1.27 -  SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
    1.28 +  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY}")
    1.29 +  IF(COIN_ZLIB_LIBRARY)
    1.30 +    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}")
    1.31 +  ENDIF(COIN_ZLIB_LIBRARY)
    1.32 +   IF(COIN_BZ2_LIBRARY)
    1.33 +    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}")
    1.34 +  ENDIF(COIN_BZ2_LIBRARY)
    1.35 +  SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY};${COIN_CLP_LIBRARIES}")
    1.36 +  SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES})
    1.37  ENDIF(COIN_FOUND)
    1.38  
    1.39  MARK_AS_ADVANCED(
    1.40 @@ -88,6 +105,8 @@
    1.41    COIN_OSI_CLP_LIBRARY
    1.42    COIN_OSI_VOL_LIBRARY
    1.43    COIN_VOL_LIBRARY
    1.44 +  COIN_ZLIB_LIBRARY
    1.45 +  COIN_BZ2_LIBRARY
    1.46  )
    1.47  
    1.48  IF(COIN_FOUND)
     2.1 --- a/cmake/FindCPLEX.cmake	Tue Dec 20 19:37:25 2011 +0100
     2.2 +++ b/cmake/FindCPLEX.cmake	Wed Jan 11 13:58:30 2012 +0100
     2.3 @@ -2,23 +2,25 @@
     2.4  
     2.5  FIND_PATH(CPLEX_INCLUDE_DIR
     2.6    ilcplex/cplex.h
     2.7 -  PATHS "C:/ILOG/CPLEX91/include"
     2.8 -  PATHS "/opt/ilog/cplex91/include"
     2.9 +  PATHS "C:/ILOG/CPLEX/include"
    2.10 +  PATHS "/opt/ilog/cplex/include"
    2.11    HINTS ${CPLEX_ROOT_DIR}/include
    2.12  )
    2.13  FIND_LIBRARY(CPLEX_LIBRARY
    2.14 -  cplex91
    2.15 -  PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda"
    2.16 -  PATHS "/opt/ilog/cplex91/bin"
    2.17 +  cplex
    2.18 +  PATHS "C:/ILOG/CPLEX/lib/msvc7/stat_mda"
    2.19 +  PATHS "/opt/ilog/cplex/bin"
    2.20    HINTS ${CPLEX_ROOT_DIR}/bin
    2.21 +  HINTS ${CPLEX_ROOT_DIR}/lib
    2.22  )
    2.23  
    2.24  INCLUDE(FindPackageHandleStandardArgs)
    2.25  FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
    2.26  
    2.27  FIND_PATH(CPLEX_BIN_DIR
    2.28 -  cplex91.dll
    2.29 -  PATHS "C:/ILOG/CPLEX91/bin/x86_win32"
    2.30 +  cplex.dll
    2.31 +  PATHS "C:/ILOG/CPLEX/bin/x86_win32"
    2.32 +  HINTS ${CPLEX_ROOT_DIR}/bin
    2.33  )
    2.34  
    2.35  IF(CPLEX_FOUND)
     3.1 --- a/lemon/cbc.cc	Tue Dec 20 19:37:25 2011 +0100
     3.2 +++ b/lemon/cbc.cc	Wed Jan 11 13:58:30 2012 +0100
     3.3 @@ -25,12 +25,7 @@
     3.4  #include <coin/CbcModel.hpp>
     3.5  #include <coin/OsiSolverInterface.hpp>
     3.6  
     3.7 -#ifdef COIN_HAS_CLP
     3.8  #include "coin/OsiClpSolverInterface.hpp"
     3.9 -#endif
    3.10 -#ifdef COIN_HAS_OSL
    3.11 -#include "coin/OsiOslSolverInterface.hpp"
    3.12 -#endif
    3.13  
    3.14  #include "coin/CbcCutGenerator.hpp"
    3.15  #include "coin/CbcHeuristicLocal.hpp"
    3.16 @@ -258,13 +253,7 @@
    3.17      if (_osi_solver) {
    3.18        delete _osi_solver;
    3.19      }
    3.20 -#ifdef COIN_HAS_CLP
    3.21      _osi_solver = new OsiClpSolverInterface();
    3.22 -#elif COIN_HAS_OSL
    3.23 -    _osi_solver = new OsiOslSolverInterface();
    3.24 -#else
    3.25 -#error Cannot instantiate Osi solver
    3.26 -#endif
    3.27  
    3.28      _osi_solver->loadFromCoinModel(*_prob);
    3.29  
    3.30 @@ -316,13 +305,11 @@
    3.31        CglFlowCover flowGen;
    3.32        _cbc_model->addCutGenerator(&flowGen, -1, "FlowCover");
    3.33  
    3.34 -#ifdef COIN_HAS_CLP
    3.35        OsiClpSolverInterface* osiclp =
    3.36          dynamic_cast<OsiClpSolverInterface*>(_cbc_model->solver());
    3.37        if (osiclp->getNumRows() < 300 && osiclp->getNumCols() < 500) {
    3.38          osiclp->setupForRepeatedUse(2, 0);
    3.39        }
    3.40 -#endif
    3.41  
    3.42        CbcRounding heuristic1(*_cbc_model);
    3.43        heuristic1.setWhen(3);
     4.1 --- a/test/CMakeLists.txt	Tue Dec 20 19:37:25 2011 +0100
     4.2 +++ b/test/CMakeLists.txt	Wed Jan 11 13:58:30 2012 +0100
     4.3 @@ -82,7 +82,7 @@
     4.4      GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
     4.5      GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     4.6      ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
     4.7 -      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
     4.8 +      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
     4.9      )
    4.10    ENDIF()
    4.11  ENDIF()
    4.12 @@ -124,7 +124,7 @@
    4.13      GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
    4.14      GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
    4.15      ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
    4.16 -      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
    4.17 +      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex.dll ${TARGET_PATH}
    4.18      )
    4.19    ENDIF()
    4.20  ENDIF()