/* -*- C++ -*-
* demo/graph_to_eps.cc - Part of LEMON, a generic C++ optimization library
*
* Copyright (C) 2005 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.
*
*/
/// \ingroup demos
/// \file
/// \brief A program demonstrating the LEMON LP solver interface
///
/// This program is a simple application of the LEMON LP solver
/// interface: we formulate a linear programming (LP) problem and then
/// solve it using the underlying solver (GLPK or CPLEX for
/// example). For the detailed documentation of the LEMON LP solver
/// interface read \ref lemon::LpSolverBase "this".
#ifdef HAVE_CONFIG_H
#include
#endif
#include
#ifdef HAVE_GLPK
#include
#elif HAVE_CPLEX
#include
#endif
using namespace lemon;
#ifdef HAVE_GLPK
typedef LpGlpk LpDefault;
const char default_solver_name[]="GLPK";
#elif HAVE_CPLEX
typedef LpCplex LpDefault;
const char default_solver_name[]="CPLEX";
#endif
int main()
{
//The following example is taken from the documentation of the GLPK library.
//See it in the GLPK reference manual and among the GLPK sample files (sample.c)
//A default solver is taken
LpDefault lp;
typedef LpDefault::Row Row;
typedef LpDefault::Col Col;
std::cout<<"A program demonstrating the LEMON LP solver interface"<