This class holds the results after solving an LP relaxation. More...
#include <BCP_lp_result.hpp>
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_result & | operator= (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... | |
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.
|
private |
The copy constructor is declared but not defined to disable it.
|
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.
|
inline |
The destructor deletes the data members if they are private copies.
Definition at line 94 of file BCP_lp_result.hpp.
|
private |
The assignment operator is declared but not defined to disable it.
|
inline |
Definition at line 108 of file BCP_lp_result.hpp.
|
inline |
Definition at line 111 of file BCP_lp_result.hpp.
|
inline |
Definition at line 114 of file BCP_lp_result.hpp.
|
inline |
Definition at line 117 of file BCP_lp_result.hpp.
|
inline |
Definition at line 120 of file BCP_lp_result.hpp.
|
inline |
Definition at line 123 of file BCP_lp_result.hpp.
|
inline |
Definition at line 126 of file BCP_lp_result.hpp.
|
inline |
Definition at line 129 of file BCP_lp_result.hpp.
|
inline |
Return the primal tolerance of the solver.
Definition at line 135 of file BCP_lp_result.hpp.
|
inline |
Return the dual tolerance of the solver.
Definition at line 137 of file BCP_lp_result.hpp.
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.
Definition at line 9 of file BCP_lp_result.cpp.
|
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.
|
private |
The name of the LP solver used.
Definition at line 53 of file BCP_lp_result.hpp.
|
private |
The name of the LP solver used.
Definition at line 54 of file BCP_lp_result.hpp.
|
private |
The zero-tolerance used by the LP solver for the primal solution.
Definition at line 56 of file BCP_lp_result.hpp.
|
private |
The zero-tolerance used by the LP solver for the dual solution.
Definition at line 58 of file BCP_lp_result.hpp.
|
private |
The termination code of the algorithm.
Definition at line 64 of file BCP_lp_result.hpp.
|
private |
The number of iterations the algorithm took (however the algorithm used interprets "iteration").
Definition at line 67 of file BCP_lp_result.hpp.
|
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.
|
private |
The primal solution.
Definition at line 73 of file BCP_lp_result.hpp.
|
private |
The dual solution.
Definition at line 75 of file BCP_lp_result.hpp.
|
private |
The reduced costs.
Definition at line 77 of file BCP_lp_result.hpp.
|
private |
The left hand sides.
Definition at line 79 of file BCP_lp_result.hpp.