diff --git a/lemon/lp.h b/lemon/lp.h new file mode 100644 --- /dev/null +++ b/lemon/lp.h @@ -0,0 +1,90 @@ +/* -*- mode: C++; indent-tabs-mode: nil; -*- + * + * This file is a part of LEMON, a generic C++ optimization library. + * + * Copyright (C) 2003-2008 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport + * (Egervary Research Group on Combinatorial Optimization, EGRES). + * + * Permission to use, modify and distribute this software is granted + * provided that this copyright notice appears in all copies. For + * precise terms see the accompanying LICENSE file. + * + * This software is provided "AS IS" with no warranty of any kind, + * express or implied, and with no claim as to its suitability for any + * purpose. + * + */ + +#ifndef LEMON_LP_H +#define LEMON_LP_H + +#include + + +#ifdef HAVE_GLPK +#include +#include +#elif HAVE_CPLEX +#include +#include +#elif HAVE_SOPLEX +#include +#endif + +///\file +///\brief Defines a default LP solver +///\ingroup lp_group +namespace lemon { + +#ifdef DOXYGEN + ///The default LP solver identifier + + ///The default LP solver identifier. + ///\ingroup lp_group + /// + ///Currently, the possible values are \c GLPK or \c CPLEX +#define DEFAULT_LP SOLVER + ///The default LP solver + + ///The default LP solver. + ///\ingroup lp_group + /// + ///Currently, it is either \c LpGlpk or \c LpCplex + typedef LpGlpk Lp; + ///The default LP solver identifier string + + ///The default LP solver identifier string. + ///\ingroup lp_group + /// + ///Currently, the possible values are "GLPK" or "CPLEX" + const char default_solver_name[]="SOLVER"; + + ///The default ILP solver. + + ///The default ILP solver. + ///\ingroup lp_group + /// + ///Currently, it is either \c LpGlpk or \c LpCplex + typedef MipGlpk Mip; +#else +#ifdef HAVE_GLPK +#define DEFAULT_LP GLPK + typedef LpGlpk Lp; + typedef MipGlpk Mip; + const char default_solver_name[]="GLPK"; +#elif HAVE_CPLEX +#define DEFAULT_LP CPLEX + typedef LpCplex Lp; + typedef MipCplex Mip; + const char default_solver_name[]="CPLEX"; +#elif HAVE_SOPLEX +#define DEFAULT_LP SOPLEX + typedef LpSoplex Lp; + const char default_solver_name[]="SOPLEX"; +#endif +#endif + +} //namespace lemon + +#endif //LEMON_LP_H