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 {
38 typedef LpSolverBase Parent;
45 lp(lpx_create_prob()) {
46 lpx_set_int_parm(lp, LPX_K_DUAL, 1);
54 virtual int _addCol();
55 virtual int _addRow();
56 virtual void _setRowCoeffs(int i,
59 const Value * values );
60 virtual void _setColCoeffs(int i,
63 const Value * values);
64 virtual void _setColLowerBound(int i, Value value);
65 virtual void _setColUpperBound(int i, Value value);
66 virtual void _setRowLowerBound(int i, Value value);
67 virtual void _setRowUpperBound(int i, Value value);
68 virtual void _setObjCoeff(int i, Value obj_coef);
73 virtual SolutionType _solve();
78 virtual Value _getSolution(int i);
81 } //END OF NAMESPACE LEMON
83 #endif //LEMON_LP_GLPK_H