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

operations_research::MPVariable Class Reference

The class for variables of a Mathematical Programming (MP) model. More...

#include <linear_solver.h>

List of all members.

Public Member Functions

const string & name () const
 Returns the name of the variable.
void SetInteger (bool integer)
 Sets the integrality requirement of the variable.
bool integer () const
 Returns the integrality requirement of the variable.
double solution_value () const
 Returns the value of the variable in the current solution.
int index () const
 Returns the index of the variable in the MPSolver::variables_.
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 reduced_cost () const
 Advanced usage: returns the reduced cost of the variable in the current solution (only available for continuous problems).
MPSolver::BasisStatus basis_status () const
 Advanced usage: returns the basis status of the variable in the current solution (only available for continuous problems).

Protected Member Functions

 MPVariable (double lb, double ub, bool integer, const string &name, MPSolverInterface *const interface)
 Constructor.
void set_index (int index)
void set_solution_value (double value)
void set_reduced_cost (double reduced_cost)

Friends

class MPSolver
class MPSolverInterface
class CBCInterface
class CLPInterface
class GLPKInterface
class SCIPInterface


Detailed Description

The class for variables of a Mathematical Programming (MP) model.

Definition at line 554 of file linear_solver.h.


Constructor & Destructor Documentation

operations_research::MPVariable::MPVariable ( double  lb,
double  ub,
bool  integer,
const string &  name,
MPSolverInterface *const   interface 
) [inline, protected]

Constructor.

A variable points to a single MPSolverInterface that is specified in the constructor. A variable cannot belong to several models.

Definition at line 600 of file linear_solver.h.


Member Function Documentation

const string& operations_research::MPVariable::name (  )  const [inline]

Returns the name of the variable.

Definition at line 557 of file linear_solver.h.

void operations_research::MPVariable::SetInteger ( bool  integer  ) 

Sets the integrality requirement of the variable.

Definition at line 218 of file linear_solver.cc.

bool operations_research::MPVariable::integer (  )  const [inline]

Returns the integrality requirement of the variable.

Definition at line 562 of file linear_solver.h.

double operations_research::MPVariable::solution_value (  )  const

Returns the value of the variable in the current solution.

MPVariable.

Definition at line 189 of file linear_solver.cc.

int operations_research::MPVariable::index (  )  const [inline]

Returns the index of the variable in the MPSolver::variables_.

Definition at line 568 of file linear_solver.h.

double operations_research::MPVariable::lb (  )  const [inline]

Returns the lower bound.

Definition at line 571 of file linear_solver.h.

double operations_research::MPVariable::ub (  )  const [inline]

Returns the upper bound.

Definition at line 573 of file linear_solver.h.

void operations_research::MPVariable::SetLB ( double  lb  )  [inline]

Sets the lower bound.

Definition at line 575 of file linear_solver.h.

void operations_research::MPVariable::SetUB ( double  ub  )  [inline]

Sets the upper bound.

Definition at line 577 of file linear_solver.h.

void operations_research::MPVariable::SetBounds ( double  lb,
double  ub 
)

Sets both the lower and upper bounds.

Definition at line 209 of file linear_solver.cc.

double operations_research::MPVariable::reduced_cost (  )  const

Advanced usage: returns the reduced cost of the variable in the current solution (only available for continuous problems).

Definition at line 194 of file linear_solver.cc.

MPSolver::BasisStatus operations_research::MPVariable::basis_status (  )  const

Advanced usage: returns the basis status of the variable in the current solution (only available for continuous problems).

See also:
MPSolver::BasisStatus.

Definition at line 201 of file linear_solver.cc.

void operations_research::MPVariable::set_index ( int  index  )  [inline, protected]

Definition at line 605 of file linear_solver.h.

void operations_research::MPVariable::set_solution_value ( double  value  )  [inline, protected]

Definition at line 606 of file linear_solver.h.

void operations_research::MPVariable::set_reduced_cost ( double  reduced_cost  )  [inline, protected]

Definition at line 607 of file linear_solver.h.


Friends And Related Function Documentation

friend class MPSolver [friend]

Definition at line 590 of file linear_solver.h.

friend class MPSolverInterface [friend]

Definition at line 591 of file linear_solver.h.

friend class CBCInterface [friend]

Definition at line 592 of file linear_solver.h.

friend class CLPInterface [friend]

Definition at line 593 of file linear_solver.h.

friend class GLPKInterface [friend]

Definition at line 594 of file linear_solver.h.

friend class SCIPInterface [friend]

Definition at line 595 of file linear_solver.h.


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