1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/lemon/lp.h Thu Dec 10 17:05:35 2009 +0100
1.3 @@ -0,0 +1,93 @@
1.4 +/* -*- mode: C++; indent-tabs-mode: nil; -*-
1.5 + *
1.6 + * This file is a part of LEMON, a generic C++ optimization library.
1.7 + *
1.8 + * Copyright (C) 2003-2008
1.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
1.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
1.11 + *
1.12 + * Permission to use, modify and distribute this software is granted
1.13 + * provided that this copyright notice appears in all copies. For
1.14 + * precise terms see the accompanying LICENSE file.
1.15 + *
1.16 + * This software is provided "AS IS" with no warranty of any kind,
1.17 + * express or implied, and with no claim as to its suitability for any
1.18 + * purpose.
1.19 + *
1.20 + */
1.21 +
1.22 +#ifndef LEMON_LP_H
1.23 +#define LEMON_LP_H
1.24 +
1.25 +#include<lemon/config.h>
1.26 +
1.27 +
1.28 +#ifdef LEMON_HAVE_GLPK
1.29 +#include <lemon/glpk.h>
1.30 +#elif LEMON_HAVE_CPLEX
1.31 +#include <lemon/cplex.h>
1.32 +#elif LEMON_HAVE_SOPLEX
1.33 +#include <lemon/soplex.h>
1.34 +#elif LEMON_HAVE_CLP
1.35 +#include <lemon/clp.h>
1.36 +#endif
1.37 +
1.38 +///\file
1.39 +///\brief Defines a default LP solver
1.40 +///\ingroup lp_group
1.41 +namespace lemon {
1.42 +
1.43 +#ifdef DOXYGEN
1.44 + ///The default LP solver identifier
1.45 +
1.46 + ///The default LP solver identifier.
1.47 + ///\ingroup lp_group
1.48 + ///
1.49 + ///Currently, the possible values are \c GLPK, \c CPLEX,
1.50 + ///\c SOPLEX or \c CLP
1.51 +#define LEMON_DEFAULT_LP SOLVER
1.52 + ///The default LP solver
1.53 +
1.54 + ///The default LP solver.
1.55 + ///\ingroup lp_group
1.56 + ///
1.57 + ///Currently, it is either \c GlpkLp, \c CplexLp, \c SoplexLp or \c ClpLp
1.58 + typedef GlpkLp Lp;
1.59 +
1.60 + ///The default MIP solver identifier
1.61 +
1.62 + ///The default MIP solver identifier.
1.63 + ///\ingroup lp_group
1.64 + ///
1.65 + ///Currently, the possible values are \c GLPK or \c CPLEX
1.66 +#define LEMON_DEFAULT_MIP SOLVER
1.67 + ///The default MIP solver.
1.68 +
1.69 + ///The default MIP solver.
1.70 + ///\ingroup lp_group
1.71 + ///
1.72 + ///Currently, it is either \c GlpkMip or \c CplexMip
1.73 + typedef GlpkMip Mip;
1.74 +#else
1.75 +#ifdef LEMON_HAVE_GLPK
1.76 +# define LEMON_DEFAULT_LP GLPK
1.77 + typedef GlpkLp Lp;
1.78 +# define LEMON_DEFAULT_MIP GLPK
1.79 + typedef GlpkMip Mip;
1.80 +#elif LEMON_HAVE_CPLEX
1.81 +# define LEMON_DEFAULT_LP CPLEX
1.82 + typedef CplexLp Lp;
1.83 +# define LEMON_DEFAULT_MIP CPLEX
1.84 + typedef CplexMip Mip;
1.85 +#elif LEMON_HAVE_SOPLEX
1.86 +# define DEFAULT_LP SOPLEX
1.87 + typedef SoplexLp Lp;
1.88 +#elif LEMON_HAVE_CLP
1.89 +# define DEFAULT_LP CLP
1.90 + typedef ClpLp Lp;
1.91 +#endif
1.92 +#endif
1.93 +
1.94 +} //namespace lemon
1.95 +
1.96 +#endif //LEMON_LP_H