3 * This file is a part of LEMON, a generic C++ optimization library
5 * Copyright (C) 2003-2006
6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 * (Egervary Research Group on Combinatorial Optimization, EGRES).
9 * Permission to use, modify and distribute this software is granted
10 * provided that this copyright notice appears in all copies. For
11 * precise terms see the accompanying LICENSE file.
13 * This software is provided "AS IS" with no warranty of any kind,
14 * express or implied, and with no claim as to its suitability for any
19 #ifndef LEMON_LP_SOPLEX_H
20 #define LEMON_LP_SOPLEX_H
23 ///\brief Header of the LEMON-SOPLEX lp solver interface.
28 #include <lemon/lp_base.h>
30 // Forward declaration
37 /// \brief Interface for the SOPLEX solver
39 /// This class implements an interface for the SOPLEX LP solver.
40 class LpSoplex :virtual public LpSolverBase {
43 _lp_bits::RelocateIdHandler relocateIdHandler;
45 soplex::SoPlex* soplex;
48 std::vector<std::string> colNames;
50 std::vector<Value> primal_value;
51 std::vector<Value> dual_value;
56 typedef LpSolverBase Parent;
66 virtual LpSolverBase &_newLp();
67 virtual LpSolverBase &_copyLp();
69 virtual int _addCol();
70 virtual int _addRow();
71 virtual void _eraseCol(int i);
72 virtual void _eraseRow(int i);
73 virtual void _getColName(int col, std::string & name);
74 virtual void _setColName(int col, const std::string & name);
75 virtual void _setRowCoeffs(int i, ConstRowIterator b, ConstRowIterator e);
76 virtual void _getRowCoeffs(int i, RowIterator b);
77 virtual void _setColCoeffs(int i, ConstColIterator b, ConstColIterator e);
78 virtual void _getColCoeffs(int i, ColIterator b);
79 virtual void _setCoeff(int row, int col, Value value);
80 virtual Value _getCoeff(int row, int col);
81 virtual void _setColLowerBound(int i, Value value);
82 virtual Value _getColLowerBound(int i);
83 virtual void _setColUpperBound(int i, Value value);
84 virtual Value _getColUpperBound(int i);
85 virtual void _setRowBounds(int i, Value lower, Value upper);
86 virtual void _getRowBounds(int i, Value &lower, Value &upper);
87 virtual void _setObjCoeff(int i, Value obj_coef);
88 virtual Value _getObjCoeff(int i);
89 virtual void _clearObj();
91 virtual SolveExitStatus _solve();
92 virtual Value _getPrimal(int i);
93 virtual Value _getDual(int i);
94 virtual Value _getPrimalValue();
95 virtual bool _isBasicCol(int i);
97 virtual SolutionStatus _getPrimalStatus();
98 virtual SolutionStatus _getDualStatus();
99 virtual ProblemTypes _getProblemType();
102 virtual void _setMax();
103 virtual void _setMin();
104 virtual bool _isMax();
107 } //END OF NAMESPACE LEMON
109 #endif //LEMON_LP_SOPLEX_H