BM_lp Class Reference

#include <BM.hpp>

Inheritance diagram for BM_lp:

Inheritance graph
[legend]
Collaboration diagram for BM_lp:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BM_lp ()
virtual ~BM_lp ()
int & numNlpFailed ()
virtual void unpack_module_data (BCP_buffer &buf)
 Unpack the initial information sent to the LP process by the Tree Manager.
virtual void process_message (BCP_buffer &buf)
 Process a message that has been sent by another process' user part to this process' user part.
virtual OsiSolverInterface * initialize_solver_interface ()
 Create LP solver environment.
virtual void load_problem (OsiSolverInterface &osi, BCP_problem_core *core, BCP_var_set &vars, BCP_cut_set &cuts)
 Load the problem specified by core, vars, and cuts into the solver interface.
virtual void modify_lp_parameters (OsiSolverInterface *lp, bool in_strong_branching)
virtual BCP_solutiontest_feasibility (const BCP_lp_result &lp_result, const BCP_vec< BCP_var * > &vars, const BCP_vec< BCP_cut * > &cuts)
 Evaluate and return MIP feasibility of the current solution.
BCP_solutiontest_feasibility_BB (const BCP_lp_result &lp_result, const BCP_vec< BCP_var * > &vars)
BCP_solutiontest_feasibility_hybrid (const BCP_lp_result &lp_result, const BCP_vec< BCP_var * > &vars, const BCP_vec< BCP_cut * > &cuts)
virtual void generate_cuts_in_lp (const BCP_lp_result &lpres, const BCP_vec< BCP_var * > &vars, const BCP_vec< BCP_cut * > &cuts, BCP_vec< BCP_cut * > &new_cuts, BCP_vec< BCP_row * > &new_rows)
 Generate cuts within the LP process.
virtual void cuts_to_rows (const BCP_vec< BCP_var * > &vars, BCP_vec< BCP_cut * > &cuts, BCP_vec< BCP_row * > &rows, const BCP_lp_result &lpres, BCP_object_origin origin, bool allow_multiple)
 Convert (and possibly lift) a set of cuts into corresponding rows for the current LP relaxation.
virtual double compute_lower_bound (const double old_lower_bound, const BCP_lp_result &lpres, const BCP_vec< BCP_var * > &vars, const BCP_vec< BCP_cut * > &cuts)
 Compute a true lower bound for the subproblem.
virtual void initialize_new_search_tree_node (const BCP_vec< BCP_var * > &vars, const BCP_vec< BCP_cut * > &cuts, const BCP_vec< BCP_obj_status > &vs, const BCP_vec< BCP_obj_status > &cs, BCP_vec< int > &var_changed_pos, BCP_vec< double > &var_new_bd, BCP_vec< int > &cut_changed_pos, BCP_vec< double > &cut_new_bd)
 Initializing a new search tree node.
virtual BCP_branching_decision select_branching_candidates (const BCP_lp_result &lpres, const BCP_vec< BCP_var * > &vars, const BCP_vec< BCP_cut * > &cuts, const BCP_lp_var_pool &local_var_pool, const BCP_lp_cut_pool &local_cut_pool, BCP_vec< BCP_lp_branching_object * > &cans, bool force_branch=false)
 Decide whether to branch or not and select a set of branching candidates if branching is decided upon.
BCP_branching_decision bbBranch (OsiBranchingInformation &brInfo, BCP_vec< BCP_lp_branching_object * > &cands)
BCP_branching_decision hybridBranch ()
void send_pseudo_cost_update (OsiBranchingInformation &branchInfo)
 Methods invoked from bbBranch().
void unpack_pseudo_costs (BCP_buffer &buf)
int sort_objects (OsiBranchingInformation &branchInfo, Bonmin::BonChooseVariable *choose, int &branchNum)
void clear_SB_results ()
void collect_branch_data (OsiBranchingInformation &branchInfo, OsiSolverInterface *solver, const int branchNum, BM_BranchData *branchData)
void do_distributed_SB (OsiBranchingInformation &branchInfo, OsiSolverInterface *solver, const CoinWarmStart *cws, const int branchNum, const int *pids, const int pidNum)
bool isBranchFathomable (int status, double obj)
int process_SB_results (OsiBranchingInformation &branchInfo, OsiSolverInterface *solver, Bonmin::BonChooseVariable *choose, OsiBranchingObject *&branchObject)
int try_to_branch (OsiBranchingInformation &branchInfo, OsiSolverInterface *solver, Bonmin::BonChooseVariable *choose, OsiBranchingObject *&branchObject, bool allowVarFix)
virtual void set_user_data_for_children (BCP_presolved_lp_brobj *best, const int selected)
 For each child create a user data object and put it into the appropriate entry in best->user_data().

Private Attributes

int in_strong
BCP_string ipopt_file_content
BCP_string nl_file_content
BCP_parameter_set< BM_parpar
BCP_buffer bm_buf
Bonmin::BonminAmplSetup bonmin_
 This contains the setup for running Bonmin in particular nlp solver, continuous solver, cut generators,.
double integerTolerance_
int numNlpFailed_
 A counter for how many times in a row did the NLP code fail.
OsiCuts cuts_
int * objInd_
 These are the indices of the integral (i.e., things that can be branched on) objects in the solver, sorted based on the priority of the corresponding objects.
int objNum_
int * infInd_
 Every time when branching decisions are to be made, we create 6 arrays, 3 for those objects that are infeasible and 3 for those that are feasible.
double * infUseful_
int infNum_
int * feasInd_
double * feasUseful_
int feasNum_
BM_SB_resultsbResult_
 This is where we keep the results in case of distributed strong branching.
BM_SB_resultbestSbResult_
 A pointer to the entry that got selected.
double node_start_time
 The time when we started to process the node.
BM_stats bm_stats
 Class for collecting statistics.

Detailed Description

Definition at line 273 of file BM.hpp.


Constructor & Destructor Documentation

BM_lp::BM_lp (  ) 

Definition at line 30 of file BM_lp.cpp.

BM_lp::~BM_lp (  )  [virtual]

Definition at line 49 of file BM_lp.cpp.

References feasInd_, feasUseful_, infInd_, infUseful_, objInd_, and sbResult_.


Member Function Documentation

int& BM_lp::numNlpFailed (  )  [inline]

Definition at line 336 of file BM.hpp.

References BCP_lp_user::get_user_data().

void BM_lp::unpack_module_data ( BCP_buffer buf  )  [virtual]

Unpack the initial information sent to the LP process by the Tree Manager.

This information was packed by the method BCP_tm_user::pack_module_data() invoked with BCP_ProcessType_LP as the third (target process type) argument.

Default: empty method.

Reimplemented from BCP_lp_user.

Definition at line 35 of file BM_pack.cpp.

References bonmin_, BCP_string::c_str(), e, BCP_parameter_set< Par >::entry(), feasInd_, feasUseful_, Bonmin::BonminSetup::getAlgorithm(), Bonmin::OsiTMINLPInterface::getColLower(), Bonmin::OsiTMINLPInterface::getColUpper(), Bonmin::BabSetupBase::getDoubleParameter(), BCP_lp_user::getLpProblemPointer(), Bonmin::OsiTMINLPInterface::getNumCols(), Bonmin::OsiTMINLPInterface::getPriorities(), BCP_lp_par::Granularity, Bonmin::TMINLP::SosInfo::indices, infInd_, infUseful_, Bonmin::BonminAmplSetup::initialize(), BCP_lp_par::IntegerTolerance, integerTolerance_, ipopt_file_content, Bonmin::OsiTMINLPInterface::isInteger(), BCP_lp_par::LpVerb_GeneratedCutCount, BCP_lp_par::LpVerb_GeneratedVarCount, BCP_lp_par::LpVerb_ReportLocalCutPoolSize, BCP_lp_par::LpVerb_ReportLocalVarPoolSize, BCP_lp_par::LpVerb_RowEffectivenessCount, BCP_lp_par::MaxPresolveIter, Bonmin::OsiTMINLPInterface::model(), nl_file_content, Bonmin::BabSetupBase::nonlinearSolver(), Bonmin::TMINLP::SosInfo::num, objInd_, objNum_, Bonmin::BabSetupBase::options(), BCP_lp_prob::par, par, Bonmin::TMINLP::SosInfo::priorities, sbResult_, BCP_parameter_set< Par >::set_entry(), Bonmin::TMINLP::SosInfo::starts, Bonmin::TMINLP::SosInfo::types, BCP_buffer::unpack(), BCP_parameter_set< Par >::unpack(), and Bonmin::TMINLP::SosInfo::weights.

void BM_lp::process_message ( BCP_buffer buf  )  [virtual]

Process a message that has been sent by another process' user part to this process' user part.

Reimplemented from BCP_lp_user.

Definition at line 1008 of file BM_lp_branch.cpp.

References BCP_Msg_SBnodeFinished, BCP_Msg_User, BCP_unpack_warmstart(), bm_buf, BM_solve_branches(), bm_stats, BM_StrongBranchRequest, BM_StrongBranchResult, bonmin_, BM_BranchData::changeType, BCP_buffer::clear(), Bonmin::OsiTMINLPInterface::getNumCols(), BM_stats::incNumberSbSolves(), Bonmin::BabSetupBase::nonlinearSolver(), BCP_buffer::pack(), BCP_lp_user::parent(), BCP_lp_user::send_message(), BCP_buffer::sender(), Bonmin::OsiTMINLPInterface::setColLower(), Bonmin::OsiTMINLPInterface::setColUpper(), BCP_buffer::unpack(), and ws.

OsiSolverInterface * BM_lp::initialize_solver_interface (  )  [virtual]

Create LP solver environment.

Create the LP solver class that will be used for solving the LP relaxations. The default implementation picks up which COIN_USE_XXX is defined and initializes an lp solver of that type. This is probably OK for most users. The only reason to override this method is to be able to choose at runtime which lp solver to instantiate (maybe even different solvers on different processors). In this case she should probably also override the pack_warmstart() and unpack_warmstart() methods in this class and in the BCP_tm_user class.

Reimplemented from BCP_lp_user.

Definition at line 62 of file BM_lp.cpp.

References bonmin_, Bonmin::BonminSetup::getAlgorithm(), BCP_lp_user::getLpProblemPointer(), Bonmin::BabSetupBase::nonlinearSolver(), prefix, and BCP_lp_user::setOsiBabSolver().

void BM_lp::load_problem ( OsiSolverInterface &  osi,
BCP_problem_core core,
BCP_var_set vars,
BCP_cut_set cuts 
) [virtual]

Load the problem specified by core, vars, and cuts into the solver interface.

If the solver is an LP solver then the default is fine. If it's an NLP then the user has to do this herself.

Reimplemented from BCP_lp_user.

Definition at line 136 of file BM_lp.cpp.

References bonmin_, Bonmin::BonminSetup::getAlgorithm(), and BCP_lp_user::load_problem().

void BM_lp::modify_lp_parameters ( OsiSolverInterface *  lp,
bool  in_strong_branching 
) [virtual]

Definition at line 153 of file BM_lp.cpp.

References in_strong.

BCP_solution * BM_lp::test_feasibility ( const BCP_lp_result lp_result,
const BCP_vec< BCP_var * > &  vars,
const BCP_vec< BCP_cut * > &  cuts 
) [virtual]

Evaluate and return MIP feasibility of the current solution.

If the solution is MIP feasible, return a solution object otherwise return a NULL pointer. The useris also welcome to heuristically generate a solution and return a pointer to that solution (although the user will have another chance (after cuts and variables are generated) to return/create heuristically generated solutions. (After all, it's quite possible that solutions are generated during cut/variable generation.)

Default: test feasibility based on the FeeasibilityTest parameter in BCP_lp_par which defults to BCP_FullTest_Feasible.

Parameters:
lp_result the result of the most recent LP optimization
vars variables currently in the formulation
cuts variables currently in the formulation

Reimplemented from BCP_lp_user.

Definition at line 165 of file BM_lp.cpp.

References bonmin_, Bonmin::BonminSetup::getAlgorithm(), test_feasibility_BB(), and test_feasibility_hybrid().

BCP_solution * BM_lp::test_feasibility_BB ( const BCP_lp_result lp_result,
const BCP_vec< BCP_var * > &  vars 
)

Definition at line 181 of file BM_lp.cpp.

References BCP_lp_user::current_index(), BCP_lp_user::current_level(), integerTolerance_, BCP_lp_result::objval(), BCP_solution_generic::set_objective_value(), BCP_lp_user::start_time(), and BCP_lp_user::test_full().

Referenced by test_feasibility().

BCP_solution * BM_lp::test_feasibility_hybrid ( const BCP_lp_result lp_result,
const BCP_vec< BCP_var * > &  vars,
const BCP_vec< BCP_cut * > &  cuts 
)

Definition at line 201 of file BM_lp.cpp.

References BCP_solution_generic::add_entry(), bonmin_, Bonmin::BabSetupBase::cutGenerators(), cuts_, BCP_lp_user::getLpProblemPointer(), integerTolerance_, BCP_lp_prob::lp_solver, Bonmin::BabSetupBase::nonlinearSolver(), BCP_lp_result::primalTolerance(), BCP_solution_generic::set_objective_value(), BCP_vec< T >::size(), and BCP_lp_user::test_full().

Referenced by test_feasibility().

void BM_lp::generate_cuts_in_lp ( const BCP_lp_result lpres,
const BCP_vec< BCP_var * > &  vars,
const BCP_vec< BCP_cut * > &  cuts,
BCP_vec< BCP_cut * > &  new_cuts,
BCP_vec< BCP_row * > &  new_rows 
) [virtual]

Generate cuts within the LP process.

Sometimes too much information would need to be transmitted for cut generation (e.g., the full tableau for Gomory cuts) or the cut generation is so fast that transmitting the info would take longer than generating the cuts. In such cases it might better to generate the cuts locally. This routine provides the opportunity.
Default: empty for now. To be interfaced to Cgl.

Parameters:
lpres solution to the current LP relaxation (IN)
vars the variabless currently in the relaxation (IN)
cuts the cuts currently in the relaxation (IN)
new_cuts the vector of generated cuts (OUT)
new_rows the correspontding rows(OUT)

Reimplemented from BCP_lp_user.

Definition at line 248 of file BM_lp.cpp.

References bonmin_, Bonmin::BabSetupBase::cutGenerators(), cuts_, Bonmin::BonminSetup::getAlgorithm(), BCP_lp_user::getLpProblemPointer(), info, BCP_lp_prob::lp_solver, and BCP_vec< T >::push_back().

void BM_lp::cuts_to_rows ( const BCP_vec< BCP_var * > &  vars,
BCP_vec< BCP_cut * > &  cuts,
BCP_vec< BCP_row * > &  rows,
const BCP_lp_result lpres,
BCP_object_origin  origin,
bool  allow_multiple 
) [virtual]

Convert (and possibly lift) a set of cuts into corresponding rows for the current LP relaxation.

Converting means computing for each cut the coefficients corresponding to each variable and creating BCP_row objects that can be added to the formulation.

This method has different purposes depending on the value of the last argument. If multiple expansion is not allowed then the user must generate a unique row for each cut. This unique row must always be the same for any given cut. This kind of operation is needed so that an LP relaxation can be exactly recreated.

On the other hand if multiple expansion is allowed then the user has (almost) free reign over what she returns. She can delete some of the cuts or append new ones (e.g., lifted ones) to the end. The result of the LP relaxation and the origin of the cuts are there to help her to make a decision about what to do. For example, she might want to lift cuts coming from the Cut Generator, but not those coming from the Cut Pool. The only requirement is that when this method returns the number of cuts and rows must be the same and the i-th row must be the unique row corresponding to the i-th cut.

Parameters:
vars the variables currently in the relaxation (IN)
cuts the cuts to be converted (IN/OUT)
rows the rows into which the cuts are converted (OUT)
lpres solution to the current LP relaxation (IN)
origin where the cuts come from (IN)
allow_multiple whether multiple expansion, i.e., lifting, is allowed (IN)
Default: throw an exception (if this method is invoked then the user must have generated cuts and BCP has no way to know how to convert them).

Reimplemented from BCP_lp_user.

Definition at line 291 of file BM_lp.cpp.

References cuts_, BCP_vec< T >::push_back(), and BCP_vec< T >::size().

double BM_lp::compute_lower_bound ( const double  old_lower_bound,
const BCP_lp_result lpres,
const BCP_vec< BCP_var * > &  vars,
const BCP_vec< BCP_cut * > &  cuts 
) [virtual]

Compute a true lower bound for the subproblem.

In case column generation is done the lower bound for the subproblem might not be the same as the objective value of the current LP relaxation. Here the user has an option to return a true lower bound.
The default implementation returns the objective value of the current LP relaxation if no column generation is done, otherwise returns the current (somehow previously computed) true lower bound.

Reimplemented from BCP_lp_user.

Definition at line 313 of file BM_lp.cpp.

References bonmin_, Bonmin::BonminSetup::getAlgorithm(), and BCP_lp_result::objval().

void BM_lp::initialize_new_search_tree_node ( const BCP_vec< BCP_var * > &  vars,
const BCP_vec< BCP_cut * > &  cuts,
const BCP_vec< BCP_obj_status > &  vs,
const BCP_vec< BCP_obj_status > &  cs,
BCP_vec< int > &  var_changed_pos,
BCP_vec< double > &  var_new_bd,
BCP_vec< int > &  cut_changed_pos,
BCP_vec< double > &  cut_new_bd 
) [virtual]

Initializing a new search tree node.

This method serves as hook for the user to do some preprocessing on a search tree node before the node is processed. Also, logical fixing results can be returned in the last four parameters. This might be very useful if the branching implies significant tightening.
Default: empty method.

Parameters:
vars (IN) The variables in the current formulation
cuts (IN) The cuts in the current formulation
var_status (IN) The stati of the variables
cut_status (IN) The stati of the cuts
var_changed_pos (OUT) The positions of the variables whose bounds should be tightened
var_new_bd (OUT) The new lb/ub of those variables
cut_changed_pos (OUT) The positions of the cuts whose bounds should be tightened
cut_new_bd (OUT) The new lb/ub of those cuts

Reimplemented from BCP_lp_user.

Definition at line 89 of file BM_lp.cpp.

References bonmin_, BCP_lp_user::get_user_data(), Bonmin::BonminSetup::getAlgorithm(), BCP_lp_user::getLpProblemPointer(), in_strong, BCP_lp_prob::lp_solver, node_start_time, Bonmin::BabSetupBase::nonlinearSolver(), BM_node::numNlpFailed_, numNlpFailed_, Bonmin::OsiTMINLPInterface::setColLower(), and Bonmin::OsiTMINLPInterface::setColUpper().

BCP_branching_decision BM_lp::select_branching_candidates ( const BCP_lp_result lpres,
const BCP_vec< BCP_var * > &  vars,
const BCP_vec< BCP_cut * > &  cuts,
const BCP_lp_var_pool local_var_pool,
const BCP_lp_cut_pool local_cut_pool,
BCP_vec< BCP_lp_branching_object * > &  cans,
bool  force_branch = false 
) [virtual]

Decide whether to branch or not and select a set of branching candidates if branching is decided upon.

The return value indicates what should be done: branching, continuing with the same node or abandoning the node completely.

Default: Branch if both local pools are empty. If branching is done then several (based on the StrongBranch_CloseToHalfNum and StrongBranch_CloseToOneNum parameters in BCP_lp_par) variables are selected for strong branching.

"Close-to-half" variables are those that should be integer and are at a fractional level. The measure of their fractionality is their distance from the closest integer. The most fractional variables will be selected, i.e., those that are close to half. If there are too many such variables then those with higher objective value have priority.

"Close-to-one" is interpreted in a more literal sense. It should be used only if the integer variables are binary as it select those fractional variables which are away from 1 but are still close. If there are too many such variables then those with lower objective value have priority.

Parameters:
lpres the result of the most recent LP optimization.
vars the variables in the current formulation.
cuts the cuts in the current formulation.
local_var_pool the local pool that holds variables with negative reduced cost. In case of continuing with the node the best so many variables will be added to the formulation (those with the most negative reduced cost).
local_cut_pool the local pool that holds violated cuts. In case of continuing with the node the best so many cuts will be added to the formulation (the most violated ones).
cands the generated branching candidates.
force_branch indicate whether to force branching regardless of the size of the local cut/var pools

Pseudo Shadow Price mode 0 - off 1 - use and multiply by strong info 2 - use

Reimplemented from BCP_lp_user.

Definition at line 31 of file BM_lp_branch.cpp.

References bbBranch(), BCP_Abandoned, BCP_DoNotBranch_Fathomed, bm_stats, bonmin_, BCP_lp_user::current_index(), BCP_lp_user::current_level(), BCP_parameter_set< Par >::entry(), Bonmin::OsiTMINLPInterface::forceBranchable(), BCP_lp_user::get_param(), Bonmin::BonminSetup::getAlgorithm(), BCP_lp_user::getLpProblemPointer(), BCP_lp_par::Granularity, hybridBranch(), ifprint, BM_stats::incNumberNodeSolves(), integerTolerance_, Bonmin::OsiTMINLPInterface::isIterationLimitReached(), BCP_lp_prob::lp_solver, BCP_lp_par::MaxRunTime, numNlpFailed_, BM_par::NumNlpFailureMax, BCP_lp_result::objval(), par, BCP_lp_user::print(), BCP_lp_result::termcode(), and BCP_lp_user::upper_bound().

BCP_branching_decision BM_lp::bbBranch ( OsiBranchingInformation &  brInfo,
BCP_vec< BCP_lp_branching_object * > &  cands 
)

Definition at line 824 of file BM_lp_branch.cpp.

References BCP_vec< T >::back(), BCP_DoBranch, BCP_DoNotBranch, BCP_DoNotBranch_Fathomed, bestSbResult_, bonmin_, Bonmin::BabSetupBase::branchingMethod(), BCP_parameter_set< Par >::entry(), Bonmin::OsiTMINLPInterface::getColLower(), Bonmin::OsiTMINLPInterface::getColUpper(), Bonmin::OsiTMINLPInterface::getDblParam(), BCP_lp_user::getLpProblemPointer(), Bonmin::OsiTMINLPInterface::getNumCols(), ifprint2, integerTolerance_, BCP_lp_prob::lp_solver, BCP_lp_prob::node, BM_SB_result::objval, Bonmin::BabSetupBase::options(), BCP_lp_user::p, par, BCP_lp_user::print(), BM_par::PrintBranchingInfo, BCP_vec< T >::push_back(), BCP_lp_user::send_feasible_solution(), BM_SB_result::status, try_to_branch(), and BCP_lp_node::vars.

Referenced by select_branching_candidates().

BCP_branching_decision BM_lp::hybridBranch (  ) 

Definition at line 93 of file BM_lp_branch.cpp.

Referenced by select_branching_candidates().

void BM_lp::send_pseudo_cost_update ( OsiBranchingInformation &  branchInfo  ) 

Methods invoked from bbBranch().

Definition at line 123 of file BM_lp_branch.cpp.

References BCP_Abandoned, BCP_ProvenOptimal, bm_buf, BM_PseudoCostUpdate, BCP_buffer::clear(), objNum_, BCP_buffer::pack(), and sbResult_.

Referenced by try_to_branch().

void BM_lp::unpack_pseudo_costs ( BCP_buffer buf  ) 

Definition at line 102 of file BM_lp_branch.cpp.

References bonmin_, Bonmin::BabSetupBase::branchingMethod(), Bonmin::BonChooseVariable::pseudoCosts(), and BCP_buffer::unpack().

int BM_lp::sort_objects ( OsiBranchingInformation &  branchInfo,
Bonmin::BonChooseVariable choose,
int &  branchNum 
)

Definition at line 171 of file BM_lp_branch.cpp.

References Bonmin::BonChooseVariable::computeMultipliers(), Bonmin::BonChooseVariable::computeUsefulness(), BCP_lp_user::current_index(), BCP_lp_user::current_level(), BM_par::DecreasingSortInSetupList, BM_par::DisregardPriorities, BCP_parameter_set< Par >::entry(), feasInd_, feasNum_, feasUseful_, infInd_, infNum_, infUseful_, Bonmin::BonChooseVariable::maxminCrit(), node_start_time, objInd_, objNum_, par, BCP_lp_user::start_time(), and BM_par::UsePseudoCosts.

Referenced by try_to_branch().

void BM_lp::clear_SB_results (  ) 

Definition at line 312 of file BM_lp_branch.cpp.

References bestSbResult_, objNum_, and sbResult_.

Referenced by try_to_branch().

void BM_lp::collect_branch_data ( OsiBranchingInformation &  branchInfo,
OsiSolverInterface *  solver,
const int  branchNum,
BM_BranchData branchData 
)

Definition at line 323 of file BM_lp_branch.cpp.

References BM_BranchData::bd, BM_Var_DownBranch, BM_Var_UpBranch, BM_BranchData::changeType, BM_BranchData::colInd, feasInd_, feasNum_, infInd_, infNum_, BM_SB_result::objInd, BM_BranchData::objInd, sbResult_, BM_BranchData::solval, and BM_SB_result::varChange.

Referenced by do_distributed_SB().

void BM_lp::do_distributed_SB ( OsiBranchingInformation &  branchInfo,
OsiSolverInterface *  solver,
const CoinWarmStart *  cws,
const int  branchNum,
const int *  pids,
const int  pidNum 
)

Definition at line 445 of file BM_lp_branch.cpp.

References BCP_AnyProcess, BCP_lp_convert_CoinWarmStart(), BCP_Msg_User, BCP_pack_warmstart(), bm_buf, BM_register_branch_results(), BM_solve_branches(), bm_stats, BM_StrongBranchRequest, BM_StrongBranchResult, BCP_buffer::clear(), collect_branch_data(), BCP_lp_user::getLpProblemPointer(), BM_stats::incNumberSbSolves(), BCP_lp_user::p, BCP_buffer::pack(), BCP_lp_user::receive_message(), s, sbResult_, BCP_lp_user::send_message(), BCP_buffer::set_size(), BCP_buffer::size(), BM_BranchData::status, BCP_buffer::unpack(), and ws.

Referenced by try_to_branch().

bool BM_lp::isBranchFathomable ( int  status,
double  obj 
)

Definition at line 537 of file BM_lp_branch.cpp.

References BCP_ProvenOptimal, BCP_ProvenPrimalInf, and BCP_lp_user::over_ub().

int BM_lp::process_SB_results ( OsiBranchingInformation &  branchInfo,
OsiSolverInterface *  solver,
Bonmin::BonChooseVariable choose,
OsiBranchingObject *&  branchObject 
)

Definition at line 546 of file BM_lp_branch.cpp.

References BCP_lp_user::current_index(), infInd_, infNum_, sbResult_, and BCP_lp_user::start_time().

Referenced by try_to_branch().

int BM_lp::try_to_branch ( OsiBranchingInformation &  branchInfo,
OsiSolverInterface *  solver,
Bonmin::BonChooseVariable choose,
OsiBranchingObject *&  branchObject,
bool  allowVarFix 
)

Definition at line 746 of file BM_lp_branch.cpp.

References BCP_Msg_ProcessList, BCP_Msg_RequestProcessList, bm_buf, BCP_buffer::clear(), clear_SB_results(), BCP_lp_user::current_index(), do_distributed_SB(), Bonmin::IpoptWarmStart::empty(), BCP_parameter_set< Par >::entry(), BCP_buffer::pack(), par, BCP_lp_user::parent(), process_SB_results(), BCP_lp_user::receive_message(), BM_par::SBMaxLevel, BM_par::SBNumBranchesInRoot, BM_par::SBNumBranchesInTree, BCP_lp_user::send_message(), send_pseudo_cost_update(), sort_objects(), BCP_lp_user::try_to_branch(), and BCP_buffer::unpack().

Referenced by bbBranch().

void BM_lp::set_user_data_for_children ( BCP_presolved_lp_brobj best,
const int  selected 
) [virtual]

For each child create a user data object and put it into the appropriate entry in best->user_data().

When this function is called the best->user_data() vector is already the right size and is filled will 0 pointers. The second argument is usefule if strong branching was done. It is the index of the branching candidate that was selected for branching (the one that's the source of best.

Reimplemented from BCP_lp_user.

Definition at line 993 of file BM_lp_branch.cpp.

References numNlpFailed_, BM_node::numNlpFailed_, and BCP_presolved_lp_brobj::user_data().


Member Data Documentation

int BM_lp::in_strong [private]

Definition at line 278 of file BM.hpp.

Referenced by initialize_new_search_tree_node(), and modify_lp_parameters().

BCP_string BM_lp::ipopt_file_content [private]

Definition at line 280 of file BM.hpp.

Referenced by unpack_module_data().

BCP_string BM_lp::nl_file_content [private]

Definition at line 281 of file BM.hpp.

Referenced by unpack_module_data().

BCP_parameter_set<BM_par> BM_lp::par [private]

Definition at line 282 of file BM.hpp.

Referenced by bbBranch(), select_branching_candidates(), sort_objects(), try_to_branch(), and unpack_module_data().

BCP_buffer BM_lp::bm_buf [private]

Definition at line 283 of file BM.hpp.

Referenced by do_distributed_SB(), process_message(), send_pseudo_cost_update(), and try_to_branch().

Bonmin::BonminAmplSetup BM_lp::bonmin_ [private]

This contains the setup for running Bonmin in particular nlp solver, continuous solver, cut generators,.

..

Definition at line 287 of file BM.hpp.

Referenced by bbBranch(), compute_lower_bound(), generate_cuts_in_lp(), initialize_new_search_tree_node(), initialize_solver_interface(), load_problem(), process_message(), select_branching_candidates(), test_feasibility(), test_feasibility_hybrid(), unpack_module_data(), and unpack_pseudo_costs().

double BM_lp::integerTolerance_ [private]

Definition at line 289 of file BM.hpp.

Referenced by bbBranch(), select_branching_candidates(), test_feasibility_BB(), test_feasibility_hybrid(), and unpack_module_data().

int BM_lp::numNlpFailed_ [private]

A counter for how many times in a row did the NLP code fail.

When the NLP fails we branch; hopefully it'll be OK in the children. If it fails too many times in a row then we fathom the node: it's hopelessly difficult.

Definition at line 295 of file BM.hpp.

Referenced by initialize_new_search_tree_node(), select_branching_candidates(), and set_user_data_for_children().

OsiCuts BM_lp::cuts_ [private]

Definition at line 297 of file BM.hpp.

Referenced by cuts_to_rows(), generate_cuts_in_lp(), and test_feasibility_hybrid().

int* BM_lp::objInd_ [private]

These are the indices of the integral (i.e., things that can be branched on) objects in the solver, sorted based on the priority of the corresponding objects.

Definition at line 302 of file BM.hpp.

Referenced by sort_objects(), unpack_module_data(), and ~BM_lp().

int BM_lp::objNum_ [private]

Definition at line 303 of file BM.hpp.

Referenced by clear_SB_results(), send_pseudo_cost_update(), sort_objects(), and unpack_module_data().

int* BM_lp::infInd_ [private]

Every time when branching decisions are to be made, we create 6 arrays, 3 for those objects that are infeasible and 3 for those that are feasible.

infInd_ contains the indices of the objects (into the objects_ array of objects) that are not feasible, infUseful_ cointains their usefulness and infNum_ their number. They are ordered by their priority and within that by their usefulness (that depends on their pseudocosts, etc.). feasXXX_ contains the same for objects that are feasible, except that SOS objects are not listed there, nor variables that are fixed.

Definition at line 313 of file BM.hpp.

Referenced by collect_branch_data(), process_SB_results(), sort_objects(), unpack_module_data(), and ~BM_lp().

double* BM_lp::infUseful_ [private]

Definition at line 314 of file BM.hpp.

Referenced by sort_objects(), unpack_module_data(), and ~BM_lp().

int BM_lp::infNum_ [private]

Definition at line 315 of file BM.hpp.

Referenced by collect_branch_data(), process_SB_results(), and sort_objects().

int* BM_lp::feasInd_ [private]

Definition at line 316 of file BM.hpp.

Referenced by collect_branch_data(), sort_objects(), unpack_module_data(), and ~BM_lp().

double* BM_lp::feasUseful_ [private]

Definition at line 317 of file BM.hpp.

Referenced by sort_objects(), unpack_module_data(), and ~BM_lp().

int BM_lp::feasNum_ [private]

Definition at line 318 of file BM.hpp.

Referenced by collect_branch_data(), and sort_objects().

BM_SB_result* BM_lp::sbResult_ [private]

This is where we keep the results in case of distributed strong branching.

The length of the array is objNum_

Definition at line 322 of file BM.hpp.

Referenced by clear_SB_results(), collect_branch_data(), do_distributed_SB(), process_SB_results(), send_pseudo_cost_update(), unpack_module_data(), and ~BM_lp().

BM_SB_result* BM_lp::bestSbResult_ [private]

A pointer to the entry that got selected.

Definition at line 324 of file BM.hpp.

Referenced by bbBranch(), and clear_SB_results().

double BM_lp::node_start_time [private]

The time when we started to process the node.

Definition at line 327 of file BM.hpp.

Referenced by initialize_new_search_tree_node(), and sort_objects().

BM_stats BM_lp::bm_stats [private]

Class for collecting statistics.

Definition at line 330 of file BM.hpp.

Referenced by do_distributed_SB(), process_message(), and select_branching_candidates().


The documentation for this class was generated from the following files:
Generated on Mon Aug 3 03:07:09 2009 by  doxygen 1.4.7