#include <BCP_lp_result.hpp>
Collaboration diagram for BCP_lp_result:
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. | |
~BCP_lp_result () | |
The destructor deletes the data members if they are private copies. | |
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. | |
double | dualTolerance () const |
Return the dual tolerance of the solver. | |
Modifying methods | |
void | get_results (OsiSolverInterface &lp_solver) |
Get the result from the LP solver. | |
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. | |
Private Member Functions | |
Disabled methods | |
BCP_lp_result (const BCP_lp_result &) | |
The copy constructor is declared but not defined to disable it. | |
BCP_lp_result & | operator= (const BCP_lp_result &) |
The assignment operator is declared but not defined to disable it. | |
Private Attributes | |
Data members storing general information about the solver. | |
std::string | _solvername |
The name of the LP solver used. | |
double | _lower_bound |
The name of the LP solver used. | |
double | _primal_tolerance |
The zero-tolerance used by the LP solver for the primal solution. | |
double | _dual_tolerance |
The zero-tolerance used by the LP solver for the dual solution. | |
Data members holding information about the LP solution. | |
int | _termcode |
The termination code of the algorithm. | |
int | _iternum |
The number of iterations the algorithm took (however the algorithm used interprets "iteration"). | |
double | _objval |
The solution value. | |
double * | _x |
The primal solution. | |
double * | _pi |
The dual solution. | |
double * | _dj |
The reduced costs. | |
double * | _lhs |
The left hand sides. |
There may be an exact and/or an approximate solution.
Definition at line 39 of file BCP_lp_result.hpp.
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] |
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] |
int BCP_lp_result::termcode | ( | ) | const [inline] |
Definition at line 111 of file BCP_lp_result.hpp.
References _termcode.
Referenced by BCP_lp_fathom(), BCP_lp_main_loop(), BCP_lp_select_branching_object(), BCP_lp_user::compute_lower_bound(), BM_lp::select_branching_candidates(), BCP_lp_user::select_branching_candidates(), BCP_lp_user::test_binary(), BCP_lp_user::test_full(), and BCP_lp_user::test_integral().
int BCP_lp_result::iternum | ( | ) | const [inline] |
Definition at line 114 of file BCP_lp_result.hpp.
References _iternum.
Referenced by BCP_lp_main_loop().
double BCP_lp_result::objval | ( | ) | const [inline] |
Definition at line 117 of file BCP_lp_result.hpp.
References _objval.
Referenced by BCP_add_branching_objects(), BCP_lp_add_from_local_cut_pool(), BCP_lp_fix_vars(), BCP_lp_main_loop(), BCP_lp_pack_branching_info(), BCP_lp_select_branching_object(), BCP_print_brobj_stat(), BCP_lp_user::compare_branching_candidates(), BM_lp::compute_lower_bound(), BCP_lp_user::compute_lower_bound(), MCF3_lp::compute_lower_bound(), MCF2_lp::compute_lower_bound(), MCF1_lp::compute_lower_bound(), OS_lp::process_lp_result(), BM_lp::select_branching_candidates(), MCF3_lp::select_branching_candidates(), MCF2_lp::select_branching_candidates(), MCF1_lp::select_branching_candidates(), BCP_lp_user::select_cuts_to_delete(), BCP_lp_user::set_actions_for_children(), and BM_lp::test_feasibility_BB().
const double* BCP_lp_result::x | ( | ) | const [inline] |
Definition at line 120 of file BCP_lp_result.hpp.
References _x.
Referenced by BCP_lp_fix_vars(), BCP_lp_perform_strong_branching(), BCP_lp_select_branching_object(), BCP_print_brobj_stat(), BCP_lp_waiting_row::compute_violation(), OS_lp::display_lp_solution(), BCP_lp_user::display_lp_solution(), BB_lp::generate_heuristic_solution(), BCP_lp_user::pack_primal_solution(), OS_lp::process_lp_result(), OS_lp::select_branching_candidates(), BB_lp::select_branching_candidates(), BCP_lp_user::test_binary(), MCF3_lp::test_feasibility(), MCF2_lp::test_feasibility(), MCF1_lp::test_feasibility(), BB_lp::test_feasibility(), BCP_lp_user::test_full(), and BCP_lp_user::test_integral().
const double* BCP_lp_result::pi | ( | ) | const [inline] |
Definition at line 123 of file BCP_lp_result.hpp.
References _pi.
Referenced by BCP_lp_adjust_row_effectiveness(), BCP_lp_fathom(), MCF3_lp::compute_lower_bound(), MCF2_lp::compute_lower_bound(), MCF1_lp::compute_lower_bound(), BCP_lp_waiting_col::compute_red_cost(), BCP_lp_user::pack_dual_solution(), and OS_lp::process_lp_result().
const double* BCP_lp_result::dj | ( | ) | const [inline] |
const double* BCP_lp_result::lhs | ( | ) | const [inline] |
Definition at line 129 of file BCP_lp_result.hpp.
References _lhs.
Referenced by BCP_lp_adjust_row_effectiveness(), and BCP_lp_select_branching_object().
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.
Referenced by BCP_lp_fix_vars(), BCP_lp_prepare_for_new_node(), BCP_lp_select_branching_object(), BCP_lp_user::pack_primal_solution(), and BM_lp::test_feasibility_hybrid().
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.
Referenced by BCP_lp_user::pack_dual_solution().
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.
References _dj, _dual_tolerance, _iternum, _lhs, _objval, _pi, _primal_tolerance, _solvername, _termcode, _x, BCP_Abandoned, BCP_DualObjLimReached, BCP_IterationLimit, BCP_PrimalObjLimReached, BCP_ProvenDualInf, BCP_ProvenOptimal, and BCP_ProvenPrimalInf.
Referenced by BCP_lp_main_loop(), and BCP_lp_select_branching_object().
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.
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 get_results(), and solvername().
double BCP_lp_result::_lower_bound [private] |
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 get_results(), and 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(), and get_results().
int BCP_lp_result::_termcode [private] |
The termination code of the algorithm.
Definition at line 64 of file BCP_lp_result.hpp.
Referenced by get_results(), and 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 get_results(), and 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(), get_results(), and objval().
double* BCP_lp_result::_x [private] |
The primal solution.
Definition at line 73 of file BCP_lp_result.hpp.
Referenced by get_results(), 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 get_results(), 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(), get_results(), 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 get_results(), lhs(), and ~BCP_lp_result().