|
| LinearModel () |
| constructor
|
|
| LinearModel (LinearModel const &rhs) |
| copy constructor More...
|
|
LinearModel & | operator= (LinearModel const &rhs) |
| assignment More...
|
|
| ~LinearModel () |
| destructor
|
|
std::vector< constraint_type >
const & | constraints () const |
|
std::vector< constraint_type > & | constraints () |
|
bool | addConstraint (constraint_type const &constr, std::string name="") |
| add a constraint More...
|
|
bool | emplaceConstraint (expression_type &expr, char sense, coefficient_value_type rhs, std::string name="") |
| emplace a constraint More...
|
|
std::string const & | constraintName (constraint_type const &constr) const |
|
std::vector< std::string > const & | constraintNames () const |
|
std::vector< std::string > & | constraintNames () |
|
expression_type const & | objective () const |
|
void | setObjective (expression_type const &expr) |
| set objective More...
|
|
void | emplaceObjective (expression_type &expr) |
| set objective by swaping with the expression More...
|
|
SolverProperty | optimizeType () const |
|
void | setOptimizeType (SolverProperty optType) |
|
std::vector< property_type >
const & | variableProperties () const |
|
std::vector< property_type > & | variableProperties () |
|
unsigned int | numVariables () const |
|
variable_type | variable (unsigned int id) const |
|
std::string | variableName (variable_type const &var) const |
|
void | setVariableName (variable_type const &var, std::string const &name) |
| set variable name More...
|
|
variable_value_type | variableLowerBound (variable_type const &var) |
|
void | setVariableLowerBound (variable_type const &var, variable_value_type lb) |
| set variable lower bound More...
|
|
void | updateVariableLowerBound (variable_type const &var, variable_value_type lb) |
| update variable lower bound More...
|
|
variable_value_type | variableUpperBound (variable_type const &var) |
|
void | setVariableUpperBound (variable_type const &var, variable_value_type ub) |
| set variable upper bound More...
|
|
void | updateVariableUpperBound (variable_type const &var, variable_value_type ub) |
| update variable upper bound More...
|
|
SolverProperty | variableNumericType (variable_type const &var) |
|
void | setVariableNumericType (variable_type const &var, SolverProperty type) |
| set numeric type of variable More...
|
|
variable_type | addVariable (variable_value_type lb, variable_value_type ub, SolverProperty nt, std::string name="") |
| add one variable More...
|
|
std::vector
< variable_value_type > const & | variableSolutions () const |
|
std::vector
< variable_value_type > & | variableSolutions () |
|
variable_value_type | variableSolution (variable_type const &var) const |
|
void | setVariableSolution (variable_type const &var, variable_value_type v) |
|
void | reserveVariables (unsigned int n) |
| reserve space for variables More...
|
|
void | reserveConstraints (unsigned int n) |
| reserve space for constraints More...
|
|
void | resizeConstraints (unsigned int n) |
| resize constraints More...
|
|
void | scaleObjective (coefficient_value_type factor) |
| scale objective More...
|
|
void | scaleConstraint (unsigned int id, coefficient_value_type factor) |
| scaling a constraint More...
|
|
coefficient_value_type | evaluateExpression (expression_type const &expr, std::vector< variable_value_type > const &vVariableSol) const |
| evaluate expression given solutions of variables More...
|
|
coefficient_value_type | evaluateObjective (std::vector< variable_value_type > const &vVariableSol) const |
| evaluate objective More...
|
|
coefficient_value_type | evaluateObjective () const |
| evaluate objective More...
|
|
coefficient_value_type | evaluateConstraint (constraint_type const &constr, std::vector< variable_value_type > const &vVariableSol) const |
| evaluate slackness of a constraint given solutions of variables More...
|
|
coefficient_value_type | evaluateConstraint (constraint_type const &constr) const |
| evaluate slackness of a constraint given solutions of variables More...
|
|
void | evaluateConstraint () const |
| evaluate slackness of all constraints given solutions of variables and print to screen
|
|
void | read (std::string const &filename) |
| read lp format More...
|
|
bool | print (std::string const &filename) const |
| print problem in lp format to file More...
|
|
std::ostream & | print (std::ostream &os=std::cout) const |
| print problem in lp format More...
|
|
std::ostream & | print (std::ostream &os, term_type const &term) const |
| print expression More...
|
|
std::ostream & | print (std::ostream &os, expression_type const &expr) const |
| print expression More...
|
|
std::ostream & | print (std::ostream &os, constraint_type const &constr) const |
| print constraint More...
|
|
bool | printSolution (std::string const &filename) const |
| print solutions to file
|
|
std::ostream & | printSolution (std::ostream &os=std::cout) const |
| print solutions More...
|
|
|
add variable that l <= vname <= r.
- Parameters
-
vname | variable name |
l | lower bound |
r | upper bound |
|
void | add_variable (std::string const &vname, double l=limbo::lowest< double >(), double r=std::numeric_limits< double >::max()) |
|
void | add_constraint (std::string const &cname, LpParser::TermArray const &terms, char compare, double constant) |
| add constraint that terms compare constant. More...
|
|
void | add_objective (bool minimize, LpParser::TermArray const &terms) |
| add object terms More...
|
|
void | set_integer (std::string const &vname, bool binary) |
| set integer variables More...
|
|
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. More...
|
|
virtual void | add_constraint (string const &cname, TermArray const &terms, char compare, double constant)=0 |
| add constraint that terms compare constant. More...
|
|
virtual void | set_integer (string const &vname, bool binary)=0 |
| set integer variables More...
|
|
template<typename T, typename V>
class limbo::solvers::LinearModel< T, V >
model to describe an optimization problem
- Template Parameters
-
T | coefficient type |
V | variable type |
Definition at line 80 of file Solvers.h.