2 * src/lemon/lp_glpk.h - Part of LEMON, a generic C++ optimization library
4 * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
5 * (Egervary Combinatorial Optimization Research Group, EGRES).
7 * Permission to use, modify and distribute this software is granted
8 * provided that this copyright notice appears in all copies. For
9 * precise terms see the accompanying LICENSE file.
11 * This software is provided "AS IS" with no warranty of any kind,
12 * express or implied, and with no claim as to its suitability for any
17 #ifndef LEMON_LP_GLPK_H
18 #define LEMON_LP_GLPK_H
21 ///\brief Header of the LEMON-GLPK lp solver interface.
31 /// \brief Wrapper for GLPK solver
33 /// This class implements a lemon wrapper for GLPK.
34 class LpGlpk : public LpSolverBase {
40 typedef LpSolverBase Parent;
46 virtual int _addCol();
47 virtual int _addRow();
48 virtual void _setRowCoeffs(int i,
51 const Value * values );
52 virtual void _setColCoeffs(int i,
55 const Value * values);
56 virtual void _setColLowerBound(int i, Value value);
57 virtual void _setColUpperBound(int i, Value value);
58 virtual void _setRowLowerBound(int i, Value value);
59 virtual void _setRowUpperBound(int i, Value value);
60 virtual void _setObjCoeff(int i, Value obj_coef);
63 ///\todo It should be clarified
65 virtual SolveExitStatus _solve();
66 virtual Value _getPrimal(int i);
67 virtual Value _getPrimalValue();
70 ///\todo It should be clarified
72 virtual SolutionStatus _getPrimalStatus();
73 virtual void _setMax();
74 virtual void _setMin();
77 ///Set the verbosity of the messages
79 ///Set the verbosity of the messages
81 ///\param m is the level of the messages output by the solver routines.
82 ///The possible values are:
83 ///- 0 --- no output (default value)
84 ///- 1 --- error messages only
85 ///- 2 --- normal output
86 ///- 3 --- full output (includes informational messages)
87 void messageLevel(int m);
88 ///Turns on or off the presolver
90 ///Turns on (\c b is \c true) or off (\c b is \c false) the presolver
92 ///The presolver is off by default.
93 void presolver(bool b);
96 } //END OF NAMESPACE LEMON
98 #endif //LEMON_LP_GLPK_H