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 | |
void | Clear () |
Clears the offset, all variables and coefficients, and the optimization direction. | |
void | SetCoefficient (const MPVariable *const var, double coeff) |
Sets the coefficient of the variable in the objective. | |
double | GetCoefficient (const MPVariable *const var) const |
Gets the coefficient of a given variable in the objective (which is 0 if the variable does not appear in the objective). | |
void | SetOffset (double value) |
Sets the constant term in the objective. | |
double | offset () const |
Gets the constant term in the objective. | |
void | AddOffset (double value) |
Adds a constant term to the objective. | |
void | SetOptimizationDirection (bool maximize) |
Sets the optimization direction (maximize: true or minimize: false). | |
void | SetMinimization () |
Sets the optimization direction to minimize. | |
void | SetMaximization () |
Sets the optimization direction to maximize. | |
bool | maximization () const |
Is the optimization direction set to maximize? | |
bool | minimization () const |
Is the optimization direction set to minimize? | |
double | Value () const |
Returns the objective value of the best solution found so far. | |
double | BestBound () const |
Returns the best objective bound. | |
Friends | |
class | MPSolver |
class | MPSolverInterface |
class | CBCInterface |
class | CLPInterface |
class | GLPKInterface |
class | SCIPInterface |
Definition at line 482 of file linear_solver.h.
void operations_research::MPObjective::Clear | ( | ) |
Clears the offset, all variables and coefficients, and the optimization direction.
Definition at line 148 of file linear_solver.cc.
void operations_research::MPObjective::SetCoefficient | ( | const MPVariable *const | var, | |
double | coeff | |||
) |
Sets the coefficient of the variable in the objective.
Definition at line 129 of file linear_solver.cc.
double operations_research::MPObjective::GetCoefficient | ( | const MPVariable *const | var | ) | const |
Gets the coefficient of a given variable in the objective (which is 0 if the variable does not appear in the objective).
Definition at line 125 of file linear_solver.cc.
void operations_research::MPObjective::SetOffset | ( | double | value | ) |
double operations_research::MPObjective::offset | ( | ) | const [inline] |
void operations_research::MPObjective::AddOffset | ( | double | value | ) | [inline] |
Adds a constant term to the objective.
Note: please use the less ambiguous SetOffest() if possible!
Definition at line 502 of file linear_solver.h.
void operations_research::MPObjective::SetOptimizationDirection | ( | bool | maximize | ) |
Sets the optimization direction (maximize: true or minimize: false).
Definition at line 155 of file linear_solver.cc.
void operations_research::MPObjective::SetMinimization | ( | ) | [inline] |
void operations_research::MPObjective::SetMaximization | ( | ) | [inline] |
bool operations_research::MPObjective::maximization | ( | ) | const |
bool operations_research::MPObjective::minimization | ( | ) | const |
double operations_research::MPObjective::Value | ( | ) | const |
Returns the objective value of the best solution found so far.
It is the optimal objective value if the problem has been solved to optimality.
Definition at line 174 of file linear_solver.cc.
double operations_research::MPObjective::BestBound | ( | ) | const |
Returns the best objective bound.
In case of minimization, it is a lower bound on the objective value of the optimal integer solution. Only available for discrete problems.
Definition at line 181 of file linear_solver.cc.
friend class MPSolver [friend] |
Definition at line 526 of file linear_solver.h.
friend class MPSolverInterface [friend] |
Definition at line 527 of file linear_solver.h.
friend class CBCInterface [friend] |
Definition at line 528 of file linear_solver.h.
friend class CLPInterface [friend] |
Definition at line 529 of file linear_solver.h.
friend class GLPKInterface [friend] |
Definition at line 530 of file linear_solver.h.
friend class SCIPInterface [friend] |
Definition at line 531 of file linear_solver.h.