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