coin-Bcp
List of all members
BCP_presolved_lp_brobj Class Reference

A presolved branching object candidate. More...

#include <BCP_lp_branch.hpp>

Collaboration diagram for BCP_presolved_lp_brobj:
Collaboration graph
[legend]

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_objectcandidate ()
 Return a pointer to the candidate. More...
 
const BCP_lp_branching_objectcandidate () const
 Return a const pointer to the candidate. More...
 
const BCP_lp_resultlpres (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_brobjoperator= (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

BCP_presolved_lp_brobj::BCP_presolved_lp_brobj ( const BCP_presolved_lp_brobj )
private

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

BCP_presolved_lp_brobj::BCP_presolved_lp_brobj ( BCP_lp_branching_object candidate)
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().

BCP_presolved_lp_brobj::~BCP_presolved_lp_brobj ( )
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().

Member Function Documentation

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

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

BCP_lp_branching_object* BCP_presolved_lp_brobj::candidate ( )
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.

const BCP_lp_branching_object* BCP_presolved_lp_brobj::candidate ( ) const
inline

Return a const pointer to the candidate.

Definition at line 392 of file BCP_lp_branch.hpp.

References _candidate.

const BCP_lp_result& BCP_presolved_lp_brobj::lpres ( const int  child_ind) const
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.

BCP_vec<BCP_child_action>& BCP_presolved_lp_brobj::action ( )
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.

const BCP_vec<BCP_child_action>& BCP_presolved_lp_brobj::action ( ) const
inline

Return a const reference to the actions to be taken.

Definition at line 407 of file BCP_lp_branch.hpp.

References _child_action.

BCP_vec<BCP_user_data*>& BCP_presolved_lp_brobj::user_data ( )
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.

const BCP_vec<BCP_user_data*>& BCP_presolved_lp_brobj::user_data ( ) const
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.

void BCP_presolved_lp_brobj::initialize_lower_bound ( const double  val)
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.

void BCP_presolved_lp_brobj::keep_no_child ( )
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().

bool BCP_presolved_lp_brobj::is_pruned ( ) const
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().

void BCP_presolved_lp_brobj::get_lower_bounds ( BCP_vec< double > &  obj)
inline
void BCP_presolved_lp_brobj::set_lower_bounds ( const BCP_vec< double > &  obj)
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().

void BCP_presolved_lp_brobj::get_results ( OsiSolverInterface lp,
const int  child_ind 
)
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:

  • primal infeasibility / dual objective limit: BCP_DBL_MAX
  • iteration limit : maximum of the lower bound at termination and itlim_objval
  • abandoned : 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.

void BCP_presolved_lp_brobj::swap ( BCP_presolved_lp_brobj rhs)
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().

BCP_vec< BCP_vec<BCP_cut*> >& BCP_presolved_lp_brobj::get_new_cuts ( )
inline

Fill up obj with the lower bound on each child.

Definition at line 498 of file BCP_lp_branch.hpp.

References _new_cuts.

BCP_vec< BCP_vec<BCP_row*> >& BCP_presolved_lp_brobj::get_new_rows ( )
inline

Fill up obj with the lower bound on each child.

Definition at line 499 of file BCP_lp_branch.hpp.

References _new_rows.

Member Data Documentation

BCP_lp_branching_object* BCP_presolved_lp_brobj::_candidate
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().

BCP_vec<BCP_lp_result*> BCP_presolved_lp_brobj::_lpres
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().

BCP_vec<BCP_child_action> BCP_presolved_lp_brobj::_child_action
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().

BCP_vec<BCP_user_data*> BCP_presolved_lp_brobj::_user_data
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().

BCP_vec< BCP_vec<BCP_cut*> > BCP_presolved_lp_brobj::_new_cuts
private

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().

BCP_vec< BCP_vec<BCP_row*> > BCP_presolved_lp_brobj::_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 350 of file BCP_lp_branch.hpp.

Referenced by BCP_presolved_lp_brobj(), get_new_rows(), swap(), and ~BCP_presolved_lp_brobj().


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