Limbo 3.5.4
Loading...
Searching...
No Matches
LpParser::LpDataBase Class Referenceabstract

Base class for lp database. Only pure virtual functions are defined.
User needs to inheritate this class and derive a custom database type with all callback functions defined. More...

#include <LpDataBase.h>

Inheritance diagram for LpParser::LpDataBase:
limbo::solvers::LinearModel< float, int32_t > LpDataBase limbo::solvers::LinearModel< T, V > limbo::solvers::lpmcf::LpDualMcf< T >

Public Member Functions

virtual void add_variable (string const &vname, double l=limbo::lowest< double >(), double r=std::numeric_limits< double >::max())=0
 add variable that l <= vname <= r.
virtual void add_constraint (string const &cname, TermArray const &terms, char compare, double constant)=0
 add constraint that terms compare constant.
virtual void add_objective (bool minimize, TermArray const &terms)=0
 add object terms
virtual void set_integer (string const &vname, bool binary)=0
 set integer variables

Detailed Description

Base class for lp database. Only pure virtual functions are defined.
User needs to inheritate this class and derive a custom database type with all callback functions defined.

Definition at line 114 of file LpDataBase.h.

Member Function Documentation

◆ add_constraint()

virtual void LpParser::LpDataBase::add_constraint ( string const & cname,
TermArray const & terms,
char compare,
double constant )
pure virtual

add constraint that terms compare constant.

Parameters
cnameconstraint name
termsarray of terms in left hand side
compareoperator '<', '>', '='
constantconstant in the right hand side

Implemented in LpDataBase.

◆ add_objective()

virtual void LpParser::LpDataBase::add_objective ( bool minimize,
TermArray const & terms )
pure virtual

add object terms

Parameters
minimizetrue denotes minimizing object, false denotes maximizing object
termsarray of terms

Implemented in limbo::solvers::LinearModel< T, V >, limbo::solvers::LinearModel< float, int32_t >, limbo::solvers::lpmcf::LpDualMcf< T >, and LpDataBase.

◆ add_variable()

virtual void LpParser::LpDataBase::add_variable ( string const & vname,
double l = limbo::lowest< double >(),
double r = std::numeric_limits< double >::max() )
pure virtual

add variable that l <= vname <= r.

Parameters
vnamevariable name
llower bound
rupper bound

Implemented in limbo::solvers::lpmcf::LpDualMcf< T >, and LpDataBase.

◆ set_integer()

virtual void LpParser::LpDataBase::set_integer ( string const & vname,
bool binary )
pure virtual

set integer variables

Parameters
vnameinteger variables
binarydenotes whether they are binary variables

Implemented in LpDataBase.


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