coin-Bcp
|
A presolved branching object candidate. More...
#include <BCP_lp_branch.hpp>
Public Member Functions | |
Constructor and destructor | |
BCP_presolved_lp_brobj (BCP_lp_branching_object *candidate) | |
The only one way to construct a presolved branching object is to create it from a regular branching object. More... | |
~BCP_presolved_lp_brobj () | |
The destructor simply deletes every member (deletes every lpres in the vector). More... | |
Query methods | |
BCP_lp_branching_object * | candidate () |
Return a pointer to the candidate. More... | |
const BCP_lp_branching_object * | candidate () const |
Return a const pointer to the candidate. More... | |
const BCP_lp_result & | lpres (const int child_ind) const |
Return a const reference to the presolved results of the child_ind -th child. More... | |
BCP_vec< BCP_child_action > & | action () |
Return a reference to the actions to be taken. More... | |
const BCP_vec< BCP_child_action > & | action () const |
Return a const reference to the actions to be taken. More... | |
BCP_vec< BCP_user_data * > & | user_data () |
Return a reference to the user data vector. More... | |
const BCP_vec< BCP_user_data * > & | user_data () const |
Return a const reference to the user data vector. More... | |
bool | fathomable (const double objval_limit) const |
Return true if every children can be fathomed. More... | |
bool | had_numerical_problems () const |
Return true if at least one child had numerical difficulties while presolving. More... | |
Modifying methods | |
void | initialize_lower_bound (const double val) |
Fill up obj with the lower bound on each child. More... | |
void | keep_no_child () |
Fill up obj with the lower bound on each child. More... | |
bool | is_pruned () const |
Fill up obj with the lower bound on each child. More... | |
void | get_lower_bounds (BCP_vec< double > &obj) |
Fill up obj with the lower bound on each child. More... | |
void | set_lower_bounds (const BCP_vec< double > &obj) |
Fill up the lower bounds on the children with the content of obj . More... | |
void | get_results (OsiSolverInterface &lp, const int child_ind) |
Extract the lp results from the LP solver for the child_ind -th child. More... | |
void | fake_objective_values (const double itlim_objval) |
Examine the termination codes for the children and for those that do not have a valid lower bound fake the objective value depending on the termination code: More... | |
void | set_objective_values (const BCP_vec< double > &obj, const BCP_vec< int > &termcode, const double itlim_objval) |
Set the appropriate fields of all _lpres to the given termcode and objval if the termcode is "normal". More... | |
void | swap (BCP_presolved_lp_brobj &rhs) |
swap the two presolved branching object More... | |
BCP_vec< BCP_vec< BCP_cut * > > & | get_new_cuts () |
Fill up obj with the lower bound on each child. More... | |
BCP_vec< BCP_vec< BCP_row * > > & | get_new_rows () |
Fill up obj with the lower bound on each child. More... | |
Private Member Functions | |
Disabled methods | |
BCP_presolved_lp_brobj (const BCP_presolved_lp_brobj &) | |
The copy constructor is declared but not defined to disable it. More... | |
BCP_presolved_lp_brobj & | operator= (const BCP_presolved_lp_brobj &) |
The assignment operator is declared but not defined to disable it. More... | |
Private Attributes | |
Data members | |
BCP_lp_branching_object * | _candidate |
A pointer to the branching object (created internally or by the user) whose presolved data is stored in this object. More... | |
BCP_vec< BCP_lp_result * > | _lpres |
A vector of lp results holding the actual presolved data. More... | |
BCP_vec< BCP_child_action > | _child_action |
The action to be taken for each child (send back to the TM, keep for diving, prune it). More... | |
BCP_vec< BCP_user_data * > | _user_data |
The user data to be passed around with the child nodes. More... | |
BCP_vec< BCP_vec< BCP_cut * > > | _new_cuts |
A pointer to the branching object (created internally or by the user) whose presolved data is stored in this object. More... | |
BCP_vec< BCP_vec< BCP_row * > > | _new_rows |
A pointer to the branching object (created internally or by the user) whose presolved data is stored in this object. More... | |
A presolved branching object candidate.
During strong branching all children of a branching object (of class [BCP_lp_branching_object
]{BCP_lp_branching_object.html}) are presolved to gain some insight how good it would be to branch on that particular branching object. The results of the presolved children are stored in an object of this type as well as the instructions what to do with each child in case this object is selected for branching.
Definition at line 321 of file BCP_lp_branch.hpp.
|
private |
The copy constructor is declared but not defined to disable it.
|
inlineexplicit |
The only one way to construct a presolved branching object is to create it from a regular branching object.
Definition at line 358 of file BCP_lp_branch.hpp.
References _lpres, _new_cuts, _new_rows, BCP_lp_branching_object::child_num, BCP_vec< T >::push_back(), BCP_vec< T >::reserve(), and BCP_vec< T >::unchecked_push_back().
|
inline |
The destructor simply deletes every member (deletes every lpres in the vector).
Definition at line 373 of file BCP_lp_branch.hpp.
References _lpres, _new_cuts, _new_rows, _user_data, purge_ptr_vector(), and BCP_vec< T >::size().
|
private |
The assignment operator is declared but not defined to disable it.
|
inline |
Return a pointer to the candidate.
THINK* : is it necessary to have a non-const version???
Definition at line 388 of file BCP_lp_branch.hpp.
References _candidate.
|
inline |
Return a const pointer to the candidate.
Definition at line 392 of file BCP_lp_branch.hpp.
References _candidate.
|
inline |
Return a const reference to the presolved results of the child_ind
-th child.
Definition at line 397 of file BCP_lp_branch.hpp.
References _lpres.
|
inline |
Return a reference to the actions to be taken.
A non-const method is needed, since this is the easiest way to set the entries. Maybe it'd be cleaner to have a separate set method...
Definition at line 403 of file BCP_lp_branch.hpp.
References _child_action.
|
inline |
Return a const reference to the actions to be taken.
Definition at line 407 of file BCP_lp_branch.hpp.
References _child_action.
|
inline |
Return a reference to the user data vector.
A non-const method is needed, since this is the easiest way to set the entries. Maybe it'd be cleaner to have a separate set method...
Definition at line 414 of file BCP_lp_branch.hpp.
References _user_data.
|
inline |
Return a const reference to the user data vector.
Definition at line 418 of file BCP_lp_branch.hpp.
References _user_data.
bool BCP_presolved_lp_brobj::fathomable | ( | const double | objval_limit | ) | const |
Return true if every children can be fathomed.
(The lower bound for each is above objval_limit
.)
bool BCP_presolved_lp_brobj::had_numerical_problems | ( | ) | const |
Return true if at least one child had numerical difficulties while presolving.
|
inline |
Fill up obj
with the lower bound on each child.
Definition at line 432 of file BCP_lp_branch.hpp.
References _candidate, _lpres, and BCP_lp_branching_object::child_num.
|
inline |
Fill up obj
with the lower bound on each child.
Definition at line 437 of file BCP_lp_branch.hpp.
References _child_action, BCP_ReturnChild, and BCP_vec< T >::size().
|
inline |
Fill up obj
with the lower bound on each child.
Definition at line 442 of file BCP_lp_branch.hpp.
References _child_action, BCP_FathomChild, and BCP_vec< T >::size().
|
inline |
Fill up obj
with the lower bound on each child.
Definition at line 450 of file BCP_lp_branch.hpp.
References _candidate, _lpres, BCP_lp_branching_object::child_num, BCP_vec< T >::clear(), BCP_vec< T >::reserve(), BCP_vec< T >::size(), and BCP_vec< T >::unchecked_push_back().
|
inline |
Fill up the lower bounds on the children with the content of obj
.
Definition at line 459 of file BCP_lp_branch.hpp.
References _lpres, and BCP_vec< T >::size().
|
inline |
Extract the lp results from the LP solver for the child_ind
-th child.
This is done immediately after presolving the child.
Definition at line 467 of file BCP_lp_branch.hpp.
References _lpres.
void BCP_presolved_lp_brobj::fake_objective_values | ( | const double | itlim_objval | ) |
Examine the termination codes for the children and for those that do not have a valid lower bound fake the objective value depending on the termination code:
BCP_DBL_MAX
itlim_objval
itlim_objval
void BCP_presolved_lp_brobj::set_objective_values | ( | const BCP_vec< double > & | obj, |
const BCP_vec< int > & | termcode, | ||
const double | itlim_objval | ||
) |
Set the appropriate fields of all _lpres to the given termcode and objval if the termcode is "normal".
If not normal (like the cases in fake_objective_values(), then apply the same rules.
|
inline |
swap the two presolved branching object
Definition at line 490 of file BCP_lp_branch.hpp.
References _candidate, _child_action, _lpres, _new_cuts, _new_rows, _user_data, and BCP_vec< T >::swap().
Fill up obj
with the lower bound on each child.
Definition at line 498 of file BCP_lp_branch.hpp.
References _new_cuts.
Fill up obj
with the lower bound on each child.
Definition at line 499 of file BCP_lp_branch.hpp.
References _new_rows.
|
private |
A pointer to the branching object (created internally or by the user) whose presolved data is stored in this object.
Definition at line 336 of file BCP_lp_branch.hpp.
Referenced by candidate(), get_lower_bounds(), initialize_lower_bound(), and swap().
|
private |
A vector of lp results holding the actual presolved data.
Definition at line 338 of file BCP_lp_branch.hpp.
Referenced by BCP_presolved_lp_brobj(), get_lower_bounds(), get_results(), initialize_lower_bound(), lpres(), set_lower_bounds(), swap(), and ~BCP_presolved_lp_brobj().
|
private |
The action to be taken for each child (send back to the TM, keep for diving, prune it).
Note that this member is created if and only if the object is selected for branching.
Definition at line 343 of file BCP_lp_branch.hpp.
Referenced by action(), is_pruned(), keep_no_child(), and swap().
|
private |
The user data to be passed around with the child nodes.
Note that this member is created if and only if the object is selected for branching.
Definition at line 347 of file BCP_lp_branch.hpp.
Referenced by swap(), user_data(), and ~BCP_presolved_lp_brobj().
A pointer to the branching object (created internally or by the user) whose presolved data is stored in this object.
Definition at line 349 of file BCP_lp_branch.hpp.
Referenced by BCP_presolved_lp_brobj(), get_new_cuts(), swap(), and ~BCP_presolved_lp_brobj().
A pointer to the branching object (created internally or by the user) whose presolved data is stored in this object.
Definition at line 350 of file BCP_lp_branch.hpp.
Referenced by BCP_presolved_lp_brobj(), get_new_rows(), swap(), and ~BCP_presolved_lp_brobj().