lemon/lp.h
changeset 458 7afc121e0689
child 459 ed54c0d13df0
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lemon/lp.h	Tue Dec 02 21:40:33 2008 +0100
     1.3 @@ -0,0 +1,90 @@
     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 HAVE_GLPK
    1.29 +#include <lemon/lp_glpk.h>
    1.30 +#include <lemon/mip_glpk.h>
    1.31 +#elif HAVE_CPLEX
    1.32 +#include <lemon/lp_cplex.h>
    1.33 +#include <lemon/mip_cplex.h>
    1.34 +#elif HAVE_SOPLEX
    1.35 +#include <lemon/lp_soplex.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 or \c CPLEX
    1.50 +#define DEFAULT_LP SOLVER
    1.51 +  ///The default LP solver
    1.52 +
    1.53 +  ///The default LP solver.
    1.54 +  ///\ingroup lp_group
    1.55 +  ///
    1.56 +  ///Currently, it is either \c LpGlpk or \c LpCplex
    1.57 +  typedef LpGlpk Lp;
    1.58 +  ///The default LP solver identifier string
    1.59 +
    1.60 +  ///The default LP solver identifier string.
    1.61 +  ///\ingroup lp_group
    1.62 +  ///
    1.63 +  ///Currently, the possible values are "GLPK" or "CPLEX"
    1.64 +  const char default_solver_name[]="SOLVER";
    1.65 +
    1.66 +  ///The default ILP solver.
    1.67 +
    1.68 +  ///The default ILP solver.
    1.69 +  ///\ingroup lp_group
    1.70 +  ///
    1.71 +  ///Currently, it is either \c LpGlpk or \c LpCplex
    1.72 +  typedef MipGlpk Mip;
    1.73 +#else
    1.74 +#ifdef HAVE_GLPK
    1.75 +#define DEFAULT_LP GLPK
    1.76 +  typedef LpGlpk Lp;
    1.77 +  typedef MipGlpk Mip;
    1.78 +  const char default_solver_name[]="GLPK";
    1.79 +#elif HAVE_CPLEX
    1.80 +#define DEFAULT_LP CPLEX
    1.81 +  typedef LpCplex Lp;
    1.82 +  typedef MipCplex Mip;
    1.83 +  const char default_solver_name[]="CPLEX";
    1.84 +#elif HAVE_SOPLEX
    1.85 +#define DEFAULT_LP SOPLEX
    1.86 +  typedef LpSoplex Lp;
    1.87 +  const char default_solver_name[]="SOPLEX";
    1.88 +#endif
    1.89 +#endif
    1.90 +
    1.91 +} //namespace lemon
    1.92 +
    1.93 +#endif //LEMON_LP_H