GlpkBase
Declared in lemon/glpk.h, in the group LP and MIP Solvers; the same class on the Doxygen site.
-
class GlpkBase : public virtual LpBase
Base interface for the GLPK LP and MIP solver.
This class implements the common interface of the GLPK LP and MIP solver.
Public Functions
-
inline _solver_bits::VoidPtr lpx()
Pointer to the underlying GLPK data structure.
-
inline _solver_bits::VoidPtr lpx() const
Const pointer to the underlying GLPK data structure.
-
inline int lpxRow( Row r ) const
Returns the constraint identifier understood by GLPK.
-
inline int lpxCol( Col c ) const
Returns the variable identifier understood by GLPK.
-
inline void write( std::string file , std::string format = "MPS" ) const
Write the problem or the solution to a file in the given format.
This function writes the problem or the solution to a file in the given format. Trying to write in an unsupported format will trigger UnsupportedFormatError.
- Parameters:
file – The file path
format – The output file format. Supportted formats are “MPS” and “LP”.
Protected Functions
-
GlpkBase()
-
virtual ~GlpkBase()
-
virtual int _addCol()
-
virtual int _addRow()
-
virtual int _addRow( Value l , ExprIterator b , ExprIterator e , Value u )
-
virtual void _eraseCol( int i )
-
virtual void _eraseRow( int i )
-
virtual void _eraseColId( int i )
-
virtual void _eraseRowId( int i )
-
virtual void _getColName( int col , std::string & name ) const
-
virtual void _setColName( int col , const std::string & name )
-
virtual int _colByName( const std::string & name ) const
-
virtual void _getRowName( int row , std::string & name ) const
-
virtual void _setRowName( int row , const std::string & name )
-
virtual int _rowByName( const std::string & name ) const
-
virtual void _setRowCoeffs( int i , ExprIterator b , ExprIterator e )
-
virtual void _getRowCoeffs( int i , InsertIterator b ) const
-
virtual void _setColCoeffs( int i , ExprIterator b , ExprIterator e )
-
virtual void _getColCoeffs( int i , InsertIterator b ) const
-
virtual void _setCoeff( int row , int col , Value value )
-
virtual Value _getCoeff( int row , int col ) const
-
virtual void _setColLowerBound( int i , Value value )
-
virtual Value _getColLowerBound( int i ) const
-
virtual void _setColUpperBound( int i , Value value )
-
virtual Value _getColUpperBound( int i ) const
-
virtual void _setRowLowerBound( int i , Value value )
-
virtual Value _getRowLowerBound( int i ) const
-
virtual void _setRowUpperBound( int i , Value value )
-
virtual Value _getRowUpperBound( int i ) const
-
virtual void _setObjCoeffs( ExprIterator b , ExprIterator e )
-
virtual void _getObjCoeffs( InsertIterator b ) const
-
virtual void _setObjCoeff( int i , Value obj_coef )
-
virtual Value _getObjCoeff( int i ) const
-
virtual void _setSense(Sense)
-
virtual Sense _getSense() const
-
virtual void _clear()
-
virtual void _messageLevel( MessageLevel level )
-
virtual void _write( std::string file , std::string format ) const
-
inline _solver_bits::VoidPtr lpx()