Merge bugfix #479 to branch 1.3 1.3
authorAlpar Juttner <alpar@cs.elte.hu>
Thu, 24 Oct 2013 13:04:49 +0200
branch1.3
changeset 13017a833615b224
parent 1299 b6bad215bccd
parent 1300 62dba6c90f35
child 1304 c180a66f6edd
Merge bugfix #479 to branch 1.3
     1.1 --- a/CMakeLists.txt	Thu Oct 17 15:09:30 2013 +0200
     1.2 +++ b/CMakeLists.txt	Thu Oct 24 13:04:49 2013 +0200
     1.3 @@ -121,6 +121,9 @@
     1.4      (NOT SOPLEX_FOUND AND (LEMON_DEFAULT_LP STREQUAL "SOPLEX")))
     1.5    SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
     1.6      "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)" FORCE)
     1.7 +ELSE()
     1.8 +  SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
     1.9 +    "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)")
    1.10  ENDIF()
    1.11  IF(NOT LEMON_DEFAULT_MIP OR
    1.12      (NOT ILOG_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CPLEX")) OR
    1.13 @@ -128,6 +131,9 @@
    1.14      (NOT GLPK_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "GLPK")))
    1.15    SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING
    1.16      "Default MIP solver backend (GLPK, CPLEX or CBC)" FORCE)
    1.17 +ELSE()
    1.18 +  SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING
    1.19 +    "Default MIP solver backend (GLPK, CPLEX or CBC)")
    1.20  ENDIF()
    1.21  
    1.22  
     2.1 --- a/lemon/lp.h	Thu Oct 17 15:09:30 2013 +0200
     2.2 +++ b/lemon/lp.h	Thu Oct 24 13:04:49 2013 +0200
     2.3 @@ -30,6 +30,8 @@
     2.4  #include <lemon/soplex.h>
     2.5  #elif LEMON_HAVE_CLP
     2.6  #include <lemon/clp.h>
     2.7 +#elif LEMON_HAVE_CBC
     2.8 +#include <lemon/cbc.h>
     2.9  #endif
    2.10  
    2.11  ///\file
    2.12 @@ -79,7 +81,7 @@
    2.13    typedef ClpLp Lp;
    2.14  #endif
    2.15  #if LEMON_DEFAULT_MIP == GLPK
    2.16 -  typedef GlpkLp Mip;
    2.17 +  typedef GlpkMip Mip;
    2.18  #elif LEMON_DEFAULT_MIP == CPLEX
    2.19    typedef CplexMip Mip;
    2.20  #elif LEMON_DEFAULT_MIP == CBC
     3.1 --- a/test/lp_test.cc	Thu Oct 17 15:09:30 2013 +0200
     3.2 +++ b/test/lp_test.cc	Thu Oct 24 13:04:49 2013 +0200
     3.3 @@ -39,6 +39,9 @@
     3.4  #include <lemon/clp.h>
     3.5  #endif
     3.6  
     3.7 +#ifdef LEMON_HAVE_LP
     3.8 +#include <lemon/lp.h>
     3.9 +#endif
    3.10  using namespace lemon;
    3.11  
    3.12  int countCols(LpBase & lp) {
    3.13 @@ -416,6 +419,15 @@
    3.14    LpSkeleton lp_skel;
    3.15    lpTest(lp_skel);
    3.16  
    3.17 +#ifdef LEMON_HAVE_LP
    3.18 +  {
    3.19 +    Lp lp,lp2;
    3.20 +    lpTest(lp);
    3.21 +    aTest(lp2);
    3.22 +    cloneTest<Lp>();
    3.23 +  }
    3.24 +#endif
    3.25 +
    3.26  #ifdef LEMON_HAVE_GLPK
    3.27    {
    3.28      GlpkLp lp_glpk1,lp_glpk2;
     4.1 --- a/test/mip_test.cc	Thu Oct 17 15:09:30 2013 +0200
     4.2 +++ b/test/mip_test.cc	Thu Oct 24 13:04:49 2013 +0200
     4.3 @@ -32,6 +32,10 @@
     4.4  #include <lemon/cbc.h>
     4.5  #endif
     4.6  
     4.7 +#ifdef LEMON_HAVE_MIP
     4.8 +#include <lemon/lp.h>
     4.9 +#endif
    4.10 +
    4.11  
    4.12  using namespace lemon;
    4.13  
    4.14 @@ -128,6 +132,14 @@
    4.15  int main()
    4.16  {
    4.17  
    4.18 +#ifdef LEMON_HAVE_MIP
    4.19 +  {
    4.20 +    Mip mip1;
    4.21 +    aTest(mip1);
    4.22 +    cloneTest<Mip>();
    4.23 +  }
    4.24 +#endif
    4.25 +
    4.26  #ifdef LEMON_HAVE_GLPK
    4.27    {
    4.28      GlpkMip mip1;