lemon/lp.h
author ladanyi
Wed, 02 Aug 2006 20:15:59 +0000
changeset 2168 6474b8254f24
parent 1956 a055123339d5
child 2218 50f1a780a5ff
permissions -rw-r--r--
CPLEX 9.x support.
     1 /* -*- C++ -*-
     2  *
     3  * This file is a part of LEMON, a generic C++ optimization library
     4  *
     5  * Copyright (C) 2003-2006
     6  * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     7  * (Egervary Research Group on Combinatorial Optimization, EGRES).
     8  *
     9  * Permission to use, modify and distribute this software is granted
    10  * provided that this copyright notice appears in all copies. For
    11  * precise terms see the accompanying LICENSE file.
    12  *
    13  * This software is provided "AS IS" with no warranty of any kind,
    14  * express or implied, and with no claim as to its suitability for any
    15  * purpose.
    16  *
    17  */
    18 
    19 #ifndef LEMON_LP_H
    20 #define LEMON_LP_H
    21 
    22 #include<lemon/config.h>
    23 
    24 #ifdef HAVE_GLPK
    25 #include <lemon/lp_glpk.h>
    26 #include <lemon/mip_glpk.h>
    27 #elif HAVE_CPLEX
    28 #include <lemon/lp_cplex.h>
    29 #endif
    30 
    31 ///\file
    32 ///\brief Defines a default LP solver
    33 ///\ingroup gen_opt_group
    34 namespace lemon {
    35  
    36 #ifdef DOXYGEN
    37   ///The default LP solver identifier
    38 
    39   ///The default LP solver identifier.
    40   ///\ingroup gen_opt_group
    41   ///
    42   ///Currently, the possible values are \c GLPK or \c CPLEX
    43 #define DEFAULT_LP SOLVER
    44   ///The default LP solver
    45 
    46   ///The default LP solver.
    47   ///\ingroup gen_opt_group
    48   ///
    49   ///Currently, it is either \c LpGlpk or \c LpCplex
    50   typedef LpGlpk Lp;
    51   ///The default LP solver identifier string
    52 
    53   ///The default LP solver identifier string.
    54   ///\ingroup gen_opt_group
    55   ///
    56   ///Currently, the possible values are "GLPK" or "CPLEX"
    57   const char default_solver_name[]="SOLVER";  
    58 
    59   ///The default ILP solver.
    60 
    61   ///The default ILP solver.
    62   ///\ingroup gen_opt_group
    63   ///
    64   ///Currently, it is either \c LpGlpk or \c LpCplex
    65   typedef MipGlpk Mip;
    66 #else
    67 #ifdef HAVE_GLPK
    68 #define DEFAULT_LP GLPK
    69   typedef LpGlpk Lp;
    70   typedef MipGlpk Mip;
    71   const char default_solver_name[]="GLPK";
    72 #elif HAVE_CPLEX
    73 #define DEFAULT_LP CPLEX
    74   typedef LpCplex Lp;
    75   const char default_solver_name[]="CPLEX";
    76 #endif
    77 #endif
    78  
    79 } //namespace lemon
    80 
    81 #endif //LEMON_LP_BASE_H