lemon/lp.h
author Balazs Dezso <deba@inf.elte.hu>
Tue, 02 Dec 2008 22:48:28 +0100
changeset 459 ed54c0d13df0
parent 458 7afc121e0689
child 461 08d495d48089
permissions -rw-r--r--
Thorough redesign of the LP/MIP interface (#44)

- Redesigned class structure
- Redesigned iterators
- Some functions in the basic interface redesigned
- More complete setting functions
- Ray retrieving functions
- Lot of improvements
- Cplex common env
- CLP macro definition to config.h.in
- Update lp.h to also use soplex and clp
- Remove default_solver_name
- New solverName() function in solvers
- Handle exceptions for MipCplex test
- Rename tolerance parameter to epsilon
- Rename MapIt to CoeffIt
- Lot of documentation improvements
- Various bugfixes
     1 /* -*- mode: C++; indent-tabs-mode: nil; -*-
     2  *
     3  * This file is a part of LEMON, a generic C++ optimization library.
     4  *
     5  * Copyright (C) 2003-2008
     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 
    25 #ifdef HAVE_GLPK
    26 #include <lemon/lp_glpk.h>
    27 #elif HAVE_CPLEX
    28 #include <lemon/lp_cplex.h>
    29 #elif HAVE_SOPLEX
    30 #include <lemon/lp_soplex.h>
    31 #elif HAVE_CLP
    32 #include <lemon/lp_clp.h>
    33 #endif
    34 
    35 ///\file
    36 ///\brief Defines a default LP solver
    37 ///\ingroup lp_group
    38 namespace lemon {
    39 
    40 #ifdef DOXYGEN
    41   ///The default LP solver identifier
    42 
    43   ///The default LP solver identifier.
    44   ///\ingroup lp_group
    45   ///
    46   ///Currently, the possible values are \c LP_GLPK, \c LP_CPLEX, \c
    47   ///LP_SOPLEX or \c LP_CLP
    48 #define LEMON_DEFAULT_LP SOLVER
    49   ///The default LP solver
    50 
    51   ///The default LP solver.
    52   ///\ingroup lp_group
    53   ///
    54   ///Currently, it is either \c LpGlpk, \c LpCplex, \c LpSoplex or \c LpClp
    55   typedef LpGlpk Lp;
    56 
    57   ///The default MIP solver identifier
    58 
    59   ///The default MIP solver identifier.
    60   ///\ingroup lp_group
    61   ///
    62   ///Currently, the possible values are \c MIP_GLPK or \c MIP_CPLEX
    63 #define LEMON_DEFAULT_MIP SOLVER
    64   ///The default MIP solver.
    65 
    66   ///The default MIP solver.
    67   ///\ingroup lp_group
    68   ///
    69   ///Currently, it is either \c MipGlpk or \c MipCplex
    70   typedef MipGlpk Mip;
    71 #else
    72 #ifdef HAVE_GLPK
    73 # define LEMON_DEFAULT_LP LP_GLPK
    74   typedef LpGlpk Lp;
    75 # define LEMON_DEFAULT_MIP MIP_GLPK
    76   typedef MipGlpk Mip;
    77 #elif HAVE_CPLEX
    78 # define LEMON_DEFAULT_LP LP_CPLEX
    79   typedef LpCplex Lp;
    80 # define LEMON_DEFAULT_MIP MIP_CPLEX
    81   typedef MipCplex Mip;
    82 #elif HAVE_SOPLEX
    83 # define DEFAULT_LP LP_SOPLEX
    84   typedef LpSoplex Lp;
    85 #elif HAVE_CLP
    86 # define DEFAULT_LP LP_CLP
    87   typedef LpClp Lp;  
    88 #endif
    89 #endif
    90 
    91 } //namespace lemon
    92 
    93 #endif //LEMON_LP_H