MinLCA algorithms
Public Member Functions | Protected Member Functions | List of all members
lemon::GrbLp Class Reference

Interface for the Gurobi LP solver. More...

#include <grb.h>

Inheritance diagram for lemon::GrbLp:
[legend]
Collaboration diagram for lemon::GrbLp:
[legend]

Public Member Functions

 GrbLp (const GRBEnv &env=_defEnv)
 
 
virtual GrbLpnewSolver () const
 
 
virtual GrbLpcloneSolver () const
 
 
- Public Member Functions inherited from lemon::GrbBase
GRBEnv getEnv () const
 Get the environment of the underlying Gurobi model.
 
GRBEnv getEnv ()
 Get the environment of the underlying Gurobi model.
 
GRBModel & getModel ()
 Get the underlying Gurobi model.
 
void writeCompressed (std::string filename, std::string format="")
 Output model in compressed format. More...
 
void forceModelUpdate ()
 Force model update. More...
 

Protected Member Functions

virtual SolveExitStatus _solve ()
 
 
virtual Value _getPrimal (int i) const
 
 
virtual Value _getDual (int i) const
 
 
virtual Value _getPrimalValue () const
 
 
virtual Value _getPrimalRay (int i) const
 
 
virtual Value _getDualRay (int i) const
 
 
virtual ProblemType _getPrimalType () const
 
 
virtual ProblemType _getDualType () const
 
 
virtual VarStatus _getColStatus (int i) const
 
 
virtual VarStatus _getRowStatus (int i) const
 
 
virtual const char * _solverName () const
 
 
- Protected Member Functions inherited from lemon::GrbBase
 GrbBase (const GRBEnv &env=_defEnv)
 Default constructor. More...
 
void _updateModel (bool what)
 
void _copyExprToConstr (int row)
 
void _copyExprToConstr ()
 
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 _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 row, ExprIterator b, ExprIterator e)
 
 
virtual void _getRowCoeffs (int row, InsertIterator b) const
 
 
virtual void _setColCoeffs (int col, ExprIterator b, ExprIterator e)
 
 
virtual void _getColCoeffs (int col, 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
  More...
 
virtual void _setColUpperBound (int i, Value value)
 
virtual Value _getColUpperBound (int i) const
  More...
 
virtual void _setRowLowerBound (int i, Value value)
 
virtual Value _getRowLowerBound (int i) const
  More...
 
virtual void _setRowUpperBound (int i, Value value)
 
virtual Value _getRowUpperBound (int i) const
  More...
 
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)
 
 
virtual void _write (std::string file, std::string format) const
 Write model to file (disabled)
 

Additional Inherited Members

- Static Public Member Functions inherited from lemon::GrbBase
static GRBEnv getDefaultEnv ()
 Get default Gurobi environment. More...
 
- Protected Attributes inherited from lemon::GrbBase
GRBModel _model
 Underlying Gurobi model.
 
bool _dirtyVars
 Dirty bit for variables.
 
bool _dirtyConstrs
 Dirty bit for constraints.
 
GRBEnv _env
 Gurobi environment for the model.
 
std::map< std::string, int > _varNameToId
 Map variable names to id.
 
std::vector< GRBVar > _idToVar
 Map id to variables.
 
std::vector< std::string > _idToVarName
 Map variable id to names.
 
std::vector< bool > _deletedVars
 List of deleted variables.
 
std::vector< GRBLinExpr > _idToExpr
 Linear expression of each constraint.
 
std::vector< bool > _exprCopiedToConstr
 
std::map< std::string, int > _constrNameToId
 Map constraint names to id.
 
std::vector< GRBConstr > _idToConstr
 Map id to constraints.
 
std::vector< std::string > _idToConstrName
 Map constraint id to names.
 
std::vector< GRBVar > _constrAux
 Needed because LEMON allows constraints with both upper and lower bounds.
 
std::vector< bool > _deletedConstrs
 List of deleted variables.
 
- Static Protected Attributes inherited from lemon::GrbBase
static GRBEnv _defEnv = GRBEnv()
 Default Gurobi environment.
 

Detailed Description

Interface for the Gurobi LP solver.

This class implements the interface of the Gurobi LP solver.

Warning
We recommend creating all variables before adding the constraints. Before adding the constraints, and also before solving the model, please update it using forceModelUpdate(). See minlca/lp-model.hh for an example.

Definition at line 249 of file grb.h.


The documentation for this class was generated from the following files: