All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions
MipSkeleton Class Reference

Detailed Description

This class does nothing, but it can serve as a skeleton when implementing an interface to new solvers.

#include <lemon/lp_skeleton.h>

+ Inheritance diagram for MipSkeleton:

Public Member Functions

 MipSkeleton ()
 
 
virtual MipSkeletonnewSolver () const
 
 
virtual MipSkeletoncloneSolver () const
 
 
- Public Member Functions inherited from MipSolver
SolveExitStatus solve ()
 
ProblemType type () const
 The type of the MIP problem.
 
Value sol (Col c) const
 Return the value of the row in the solution.
 
Value sol (const Expr &e) const
 Return the value of the expression in the solution.
 
Value solValue () const
 The value of the objective function.
 
void colType (Col c, ColTypes col_type)
 
ColTypes colType (Col c) const
 
- Public Member Functions inherited from LpBase
virtual ~LpBase ()
 Virtual destructor.
 
const char * solverName () const
 Gives back the name of the solver.
 
Col addCol ()
 Add a new empty column (i.e a new variable) to the LP.
 
template<class T >
int addColSet (T &t)
 Adds several new columns (i.e variables) at once.
 
void col (Col c, const DualExpr &e)
 Set a column (i.e a dual constraint) of the LP.
 
DualExpr col (Col c) const
 Get a column (i.e a dual constraint) of the LP.
 
Col addCol (const DualExpr &e, Value o=0)
 Add a new column to the LP.
 
Row addRow ()
 Add a new empty row (i.e a new constraint) to the LP.
 
template<class T >
int addRowSet (T &t)
 Add several new rows (i.e constraints) at once.
 
void row (Row r, Value l, const Expr &e, Value u)
 Set a row (i.e a constraint) of the LP.
 
void row (Row r, const Constr &c)
 Set a row (i.e a constraint) of the LP.
 
Expr row (Row r) const
 Get a row (i.e a constraint) of the LP.
 
Row addRow (Value l, const Expr &e, Value u)
 Add a new row (i.e a new constraint) to the LP.
 
Row addRow (const Constr &c)
 Add a new row (i.e a new constraint) to the LP.
 
void erase (Col c)
 Erase a column (i.e a variable) from the LP.
 
void erase (Row r)
 Erase a row (i.e a constraint) from the LP.
 
std::string colName (Col c) const
 Get the name of a column.
 
void colName (Col c, const std::string &name)
 Set the name of a column.
 
Col colByName (const std::string &name) const
 Get the column by its name.
 
std::string rowName (Row r) const
 Get the name of a row.
 
void rowName (Row r, const std::string &name)
 Set the name of a row.
 
Row rowByName (const std::string &name) const
 Get the row by its name.
 
void coeff (Row r, Col c, Value val)
 Set an element of the coefficient matrix of the LP.
 
Value coeff (Row r, Col c) const
 Get an element of the coefficient matrix of the LP.
 
void colLowerBound (Col c, Value value)
 Set the lower bound of a column (i.e a variable)
 
Value colLowerBound (Col c) const
 Get the lower bound of a column (i.e a variable)
 
template<class T >
void colLowerBound (T &t, Value value)
 Set the lower bound of several columns (i.e variables) at once.
 
void colUpperBound (Col c, Value value)
 Set the upper bound of a column (i.e a variable)
 
Value colUpperBound (Col c) const
 Get the upper bound of a column (i.e a variable)
 
template<class T >
void colUpperBound (T &t, Value value)
 Set the upper bound of several columns (i.e variables) at once.
 
void colBounds (Col c, Value lower, Value upper)
 Set the lower and the upper bounds of a column (i.e a variable)
 
template<class T >
void colBounds (T &t, Value lower, Value upper)
 Set the lower and the upper bound of several columns (i.e variables) at once.
 
void rowLowerBound (Row r, Value value)
 Set the lower bound of a row (i.e a constraint)
 
Value rowLowerBound (Row r) const
 Get the lower bound of a row (i.e a constraint)
 
void rowUpperBound (Row r, Value value)
 Set the upper bound of a row (i.e a constraint)
 
Value rowUpperBound (Row r) const
 Get the upper bound of a row (i.e a constraint)
 
void objCoeff (Col c, Value v)
 Set an element of the objective function.
 
Value objCoeff (Col c) const
 Get an element of the objective function.
 
void obj (const Expr &e)
 Set the objective function.
 
Expr obj () const
 Get the objective function.
 
void sense (Sense sense)
 Set the direction of optimization.
 
Sense sense () const
 Query the direction of the optimization.
 
void max ()
 Set the sense to maximization.
 
void min ()
 Set the sense to maximization.
 
void clear ()
 Clears the problem.
 
void messageLevel (MessageLevel level)
 Sets the message level of the solver.
 

Protected Member Functions

virtual SolveExitStatus _solve ()
 
 
virtual Value _getSol (int i) const
 
 
virtual Value _getSolValue () const
 
 
virtual ProblemType _getType () const
 
 
virtual const char * _solverName () const
 
 
- Protected Member Functions inherited from SkeletonSolverBase
virtual int _addCol ()
 
 
virtual int _addRow ()
 
 
virtual void _eraseCol (int i)
 
 
virtual void _eraseRow (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)
 Set one element of the coefficient matrix.
 
virtual Value _getCoeff (int row, int col) const
 Get one element of the coefficient matrix.
 
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)
 
 

Additional Inherited Members

- Public Types inherited from MipSolver
enum  ProblemType {
  UNDEFINED = 0, INFEASIBLE = 1, FEASIBLE = 2, OPTIMAL = 3,
  UNBOUNDED = 4
}
 The problem types for MIP problems. More...
 
enum  ColTypes { REAL = 0, INTEGER = 1 }
 Possible variable (column) types (e.g. real, integer, binary etc.) More...
 
- Public Types inherited from LpBase
enum  SolveExitStatus { SOLVED = 0, UNSOLVED = 1 }
 Possible outcomes of an LP solving procedure. More...
 
enum  Sense { MIN, MAX }
 Direction of the optimization. More...
 
enum  MessageLevel {
  MESSAGE_NOTHING, MESSAGE_ERROR, MESSAGE_WARNING, MESSAGE_NORMAL,
  MESSAGE_VERBOSE
}
 Enum for messageLevel() parameter. More...
 
typedef double Value
 The floating point type used by the solver.
 
- Static Public Member Functions inherited from LpBase
static int id (const Col &col)
 Returns the ID of the column.
 
static Col colFromId (int id)
 Returns the column with the given ID.
 
static int id (const Row &row)
 Returns the ID of the row.
 
static Row rowFromId (int id)
 Returns the row with the given ID.
 
- Static Public Attributes inherited from LpBase
static const Value INF
 The infinity constant.
 
static const Value NaN
 The not a number constant.