CplexBase
Declared in lemon/cplex.h, in the group LP and MIP Solvers; the same class on the Doxygen site.
-
class CplexBase : public virtual LpBase
Base interface for the CPLEX LP and MIP solver.
This class implements the common interface of the CPLEX LP and MIP solvers.
Subclassed by CplexLp, CplexMip
Public Functions
-
inline const cpxenv * cplexEnv() const
Returns the const cpxenv pointer.
Note
The cpxenv might be destructed with the solver.
-
inline cpxenv * cplexEnv()
Returns the const cpxenv pointer.
Note
The cpxenv might be destructed with the solver.
-
inline cpxlp * cplexLp()
Returns the cplex problem object.
-
inline const cpxlp * cplexLp() const
Returns the cplex problem object.
-
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”, “LP” and “SOL”.
Protected Functions
-
CplexBase()
-
virtual ~CplexBase()
-
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 sense )
-
virtual Sense _getSense() const
-
virtual void _clear()
-
virtual void _messageLevel( MessageLevel level )
-
void _applyMessageLevel()
-
virtual void _write( std::string file , std::string format ) const
-
inline const cpxenv * cplexEnv() const