Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ src/ linear_solver/

operations_research::MPObjective Class Reference

A class to express a linear objective. More...

#include <linear_solver.h>

List of all members.

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


Detailed Description

A class to express a linear objective.

Definition at line 482 of file linear_solver.h.


Member Function Documentation

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).

MPObjective.

Definition at line 125 of file linear_solver.cc.

void operations_research::MPObjective::SetOffset ( double  value  ) 

Sets the constant term in the objective.

Definition at line 143 of file linear_solver.cc.

double operations_research::MPObjective::offset (  )  const [inline]

Gets the constant term in the objective.

Definition at line 497 of file linear_solver.h.

void operations_research::MPObjective::AddOffset ( double  value  )  [inline]

Adds a constant term to the objective.

Note: please use the less ambiguous SetOffest() if possible!

Todo:
TODO(user): remove this.

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]

Sets the optimization direction to minimize.

Definition at line 507 of file linear_solver.h.

void operations_research::MPObjective::SetMaximization (  )  [inline]

Sets the optimization direction to maximize.

Definition at line 509 of file linear_solver.h.

bool operations_research::MPObjective::maximization (  )  const

Is the optimization direction set to maximize?

Definition at line 166 of file linear_solver.cc.

bool operations_research::MPObjective::minimization (  )  const

Is the optimization direction set to minimize?

Definition at line 170 of file linear_solver.cc.

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.


Friends And Related Function Documentation

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.


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