coin-Bcp
List of all members
BCP_lp_result Class Reference

This class holds the results after solving an LP relaxation. More...

#include <BCP_lp_result.hpp>

Collaboration diagram for BCP_lp_result:
Collaboration graph
[legend]

Public Member Functions

Constructor and destructor
 BCP_lp_result ()
 The default constructor initializes an empty solution, i.e., one which holds neither an exact nor an approximate solution. More...
 
 ~BCP_lp_result ()
 The destructor deletes the data members if they are private copies. More...
 
Query methods for the solution. These methods (except for

the first) just return the value of the queried member (in case of the vector members a reference to the vector is returned instead of the pointer.

const std::string & solvername () const
 
int termcode () const
 
int iternum () const
 
double objval () const
 
const double * x () const
 
const double * pi () const
 
const double * dj () const
 
const double * lhs () const
 
Query methods for general solver information.
double primalTolerance () const
 Return the primal tolerance of the solver. More...
 
double dualTolerance () const
 Return the dual tolerance of the solver. More...
 
Modifying methods
void get_results (OsiSolverInterface &lp_solver)
 Get the result from the LP solver. More...
 
void fake_objective_value (const double val)
 Set the lower bound and the exact and approximate objective values to the value given in the argument. More...
 

Private Member Functions

Disabled methods
 BCP_lp_result (const BCP_lp_result &)
 The copy constructor is declared but not defined to disable it. More...
 
BCP_lp_resultoperator= (const BCP_lp_result &)
 The assignment operator is declared but not defined to disable it. More...
 

Private Attributes

Data members storing general information about the solver.
std::string _solvername
 The name of the LP solver used. More...
 
double _lower_bound
 The name of the LP solver used. More...
 
double _primal_tolerance
 The zero-tolerance used by the LP solver for the primal solution. More...
 
double _dual_tolerance
 The zero-tolerance used by the LP solver for the dual solution. More...
 
Data members holding information about the LP solution.
int _termcode
 The termination code of the algorithm. More...
 
int _iternum
 The number of iterations the algorithm took (however the algorithm used interprets "iteration"). More...
 
double _objval
 The solution value. More...
 
double * _x
 The primal solution. More...
 
double * _pi
 The dual solution. More...
 
double * _dj
 The reduced costs. More...
 
double * _lhs
 The left hand sides. More...
 

Detailed Description

This class holds the results after solving an LP relaxation.

There may be an exact and/or an approximate solution.

Definition at line 39 of file BCP_lp_result.hpp.

Constructor & Destructor Documentation

BCP_lp_result::BCP_lp_result ( const BCP_lp_result )
private

The copy constructor is declared but not defined to disable it.

BCP_lp_result::BCP_lp_result ( )
inline

The default constructor initializes an empty solution, i.e., one which holds neither an exact nor an approximate solution.

Definition at line 87 of file BCP_lp_result.hpp.

BCP_lp_result::~BCP_lp_result ( )
inline

The destructor deletes the data members if they are private copies.

Definition at line 94 of file BCP_lp_result.hpp.

References _dj, _lhs, _pi, and _x.

Member Function Documentation

BCP_lp_result& BCP_lp_result::operator= ( const BCP_lp_result )
private

The assignment operator is declared but not defined to disable it.

const std::string& BCP_lp_result::solvername ( ) const
inline

Definition at line 108 of file BCP_lp_result.hpp.

References _solvername.

int BCP_lp_result::termcode ( ) const
inline

Definition at line 111 of file BCP_lp_result.hpp.

References _termcode.

int BCP_lp_result::iternum ( ) const
inline

Definition at line 114 of file BCP_lp_result.hpp.

References _iternum.

double BCP_lp_result::objval ( ) const
inline

Definition at line 117 of file BCP_lp_result.hpp.

References _objval.

const double* BCP_lp_result::x ( ) const
inline

Definition at line 120 of file BCP_lp_result.hpp.

References _x.

const double* BCP_lp_result::pi ( ) const
inline

Definition at line 123 of file BCP_lp_result.hpp.

References _pi.

const double* BCP_lp_result::dj ( ) const
inline

Definition at line 126 of file BCP_lp_result.hpp.

References _dj.

const double* BCP_lp_result::lhs ( ) const
inline

Definition at line 129 of file BCP_lp_result.hpp.

References _lhs.

double BCP_lp_result::primalTolerance ( ) const
inline

Return the primal tolerance of the solver.

Definition at line 135 of file BCP_lp_result.hpp.

References _primal_tolerance.

double BCP_lp_result::dualTolerance ( ) const
inline

Return the dual tolerance of the solver.

Definition at line 137 of file BCP_lp_result.hpp.

References _dual_tolerance.

void BCP_lp_result::get_results ( OsiSolverInterface lp_solver)

Get the result from the LP solver.

Non-vector members will get their values from the LP solver. Vector members are copied out from the LP solver.

void BCP_lp_result::fake_objective_value ( const double  val)
inline

Set the lower bound and the exact and approximate objective values to the value given in the argument.

Definition at line 148 of file BCP_lp_result.hpp.

References _objval.

Member Data Documentation

std::string BCP_lp_result::_solvername
private

The name of the LP solver used.

Definition at line 53 of file BCP_lp_result.hpp.

Referenced by solvername().

double BCP_lp_result::_lower_bound
private

The name of the LP solver used.

Definition at line 54 of file BCP_lp_result.hpp.

double BCP_lp_result::_primal_tolerance
private

The zero-tolerance used by the LP solver for the primal solution.

Definition at line 56 of file BCP_lp_result.hpp.

Referenced by primalTolerance().

double BCP_lp_result::_dual_tolerance
private

The zero-tolerance used by the LP solver for the dual solution.

Definition at line 58 of file BCP_lp_result.hpp.

Referenced by dualTolerance().

int BCP_lp_result::_termcode
private

The termination code of the algorithm.

Definition at line 64 of file BCP_lp_result.hpp.

Referenced by termcode().

int BCP_lp_result::_iternum
private

The number of iterations the algorithm took (however the algorithm used interprets "iteration").

Definition at line 67 of file BCP_lp_result.hpp.

Referenced by iternum().

double BCP_lp_result::_objval
private

The solution value.

Depending on whether the solver solves to optimality or just delivers an approximate solution this value is either the optimum or a lower bound on the optimum.

Definition at line 71 of file BCP_lp_result.hpp.

Referenced by fake_objective_value(), and objval().

double* BCP_lp_result::_x
private

The primal solution.

Definition at line 73 of file BCP_lp_result.hpp.

Referenced by x(), and ~BCP_lp_result().

double* BCP_lp_result::_pi
private

The dual solution.

Definition at line 75 of file BCP_lp_result.hpp.

Referenced by pi(), and ~BCP_lp_result().

double* BCP_lp_result::_dj
private

The reduced costs.

Definition at line 77 of file BCP_lp_result.hpp.

Referenced by dj(), and ~BCP_lp_result().

double* BCP_lp_result::_lhs
private

The left hand sides.

Definition at line 79 of file BCP_lp_result.hpp.

Referenced by lhs(), and ~BCP_lp_result().


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