/* -*- C++ -*- * * This file is a part of LEMON, a generic C++ optimization library * * Copyright (C) 2003-2006 * 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_SOPLEX_H #define LEMON_LP_SOPLEX_H ///\file ///\brief Header of the LEMON-SOPLEX lp solver interface. #include #include #include // Forward declaration namespace soplex { class SoPlex; } namespace lemon { /// \brief Interface for the SOPLEX solver /// /// This class implements an interface for the SOPLEX LP solver. class LpSoplex :virtual public LpSolverBase { protected: soplex::SoPlex* soplex; std::vector colNames; std::vector primal; std::vector dual; public: typedef LpSolverBase Parent; /// \e LpSoplex(); /// \e ~LpSoplex(); protected: virtual LpSolverBase &_newLp(); virtual LpSolverBase &_copyLp(); virtual int _addCol(); virtual int _addRow(); virtual void _eraseCol(int i); virtual void _eraseRow(int i); virtual void _getColName(int col, std::string & name); virtual void _setColName(int col, const std::string & name); virtual void _setRowCoeffs(int i, LpRowIterator b, LpRowIterator e); virtual void _setColCoeffs(int i, LpColIterator b, LpColIterator e); virtual void _setCoeff(int row, int col, Value value); virtual void _setColLowerBound(int i, Value value); virtual void _setColUpperBound(int i, Value value); virtual void _setRowBounds(int i, Value lower, Value upper); virtual void _setObjCoeff(int i, Value obj_coef); virtual void _clearObj(); virtual SolveExitStatus _solve(); virtual Value _getPrimal(int i); virtual Value _getDual(int i); virtual Value _getPrimalValue(); virtual bool _isBasicCol(int i); virtual SolutionStatus _getPrimalStatus(); virtual SolutionStatus _getDualStatus(); virtual ProblemTypes _getProblemType(); virtual void _setMax(); virtual void _setMin(); }; } //END OF NAMESPACE LEMON #endif //LEMON_LP_SOPLEX_H