Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set | ||
|
||
// doxy/ or-tools/ src/ linear_solver/ |
#include <linear_solver.h>
Public Member Functions | |
const string & | name () const |
Returns the name of the constraint. | |
void | Clear () |
Clears all variables and coefficients. Does not clear the bounds. | |
void | SetCoefficient (const MPVariable *const var, double coeff) |
Sets the coefficient of the variable on the constraint. | |
double | GetCoefficient (const MPVariable *const var) const |
Gets the coefficient of a given variable on the constraint (which is 0 if the variable does not appear in the constraint). | |
double | lb () const |
Returns the lower bound. | |
double | ub () const |
Returns the upper bound. | |
void | SetLB (double lb) |
Sets the lower bound. | |
void | SetUB (double ub) |
Sets the upper bound. | |
void | SetBounds (double lb, double ub) |
Sets both the lower and upper bounds. | |
double | activity () const |
Returns the constraint's activity in the current solution: sum over all terms of (coefficient * variable value). | |
int | index () const |
Returns the index of the constraint in the MPSolver::constraints_. | |
double | dual_value () const |
Advanced usage: returns the dual value of the constraint in the current solution (only available for continuous problems). | |
MPSolver::BasisStatus | basis_status () const |
Advanced usage: returns the basis status of the slack variable associated with the constraint (only available for continuous problems). | |
Protected Member Functions | |
MPConstraint (double lb, double ub, const string &name, MPSolverInterface *const interface) | |
Constructor. | |
void | set_index (int index) |
void | set_activity (double activity) |
void | set_dual_value (double dual_value) |
Friends | |
class | MPSolver |
class | MPSolverInterface |
class | CBCInterface |
class | CLPInterface |
class | GLPKInterface |
class | SCIPInterface |
A constraint is represented as a linear equation or inequality.
Definition at line 623 of file linear_solver.h.
operations_research::MPConstraint::MPConstraint | ( | double | lb, | |
double | ub, | |||
const string & | name, | |||
MPSolverInterface *const | interface | |||
) | [inline, protected] |
Constructor.
A constraint points to a single MPSolverInterface that is specified in the constructor. A constraint cannot belong to several models.
Definition at line 676 of file linear_solver.h.
const string& operations_research::MPConstraint::name | ( | ) | const [inline] |
void operations_research::MPConstraint::Clear | ( | ) |
Clears all variables and coefficients. Does not clear the bounds.
Definition at line 76 of file linear_solver.cc.
void operations_research::MPConstraint::SetCoefficient | ( | const MPVariable *const | var, | |
double | coeff | |||
) |
Sets the coefficient of the variable on the constraint.
Definition at line 49 of file linear_solver.cc.
double operations_research::MPConstraint::GetCoefficient | ( | const MPVariable *const | var | ) | const |
Gets the coefficient of a given variable on the constraint (which is 0 if the variable does not appear in the constraint).
Definition at line 45 of file linear_solver.cc.
double operations_research::MPConstraint::lb | ( | ) | const [inline] |
double operations_research::MPConstraint::ub | ( | ) | const [inline] |
void operations_research::MPConstraint::SetLB | ( | double | lb | ) | [inline] |
void operations_research::MPConstraint::SetUB | ( | double | ub | ) | [inline] |
void operations_research::MPConstraint::SetBounds | ( | double | lb, | |
double | ub | |||
) |
double operations_research::MPConstraint::activity | ( | ) | const |
Returns the constraint's activity in the current solution: sum over all terms of (coefficient * variable value).
Definition at line 105 of file linear_solver.cc.
int operations_research::MPConstraint::index | ( | ) | const [inline] |
Returns the index of the constraint in the MPSolver::constraints_.
Definition at line 654 of file linear_solver.h.
double operations_research::MPConstraint::dual_value | ( | ) | const |
Advanced usage: returns the dual value of the constraint in the current solution (only available for continuous problems).
Definition at line 90 of file linear_solver.cc.
MPSolver::BasisStatus operations_research::MPConstraint::basis_status | ( | ) | const |
Advanced usage: returns the basis status of the slack variable associated with the constraint (only available for continuous problems).
Definition at line 97 of file linear_solver.cc.
void operations_research::MPConstraint::set_index | ( | int | index | ) | [inline, protected] |
Definition at line 683 of file linear_solver.h.
void operations_research::MPConstraint::set_activity | ( | double | activity | ) | [inline, protected] |
Definition at line 684 of file linear_solver.h.
void operations_research::MPConstraint::set_dual_value | ( | double | dual_value | ) | [inline, protected] |
Definition at line 685 of file linear_solver.h.
friend class MPSolver [friend] |
Definition at line 666 of file linear_solver.h.
friend class MPSolverInterface [friend] |
Definition at line 667 of file linear_solver.h.
friend class CBCInterface [friend] |
Definition at line 668 of file linear_solver.h.
friend class CLPInterface [friend] |
Definition at line 669 of file linear_solver.h.
friend class GLPKInterface [friend] |
Definition at line 670 of file linear_solver.h.
friend class SCIPInterface [friend] |
Definition at line 671 of file linear_solver.h.