#include <BCP_tm.hpp>
Inheritance diagram for BCP_tm_prob:
Public Member Functions | |
virtual BCP_buffer & | get_message_buffer () |
virtual void | process_message () |
Constructor and destructor | |
BCP_tm_prob () | |
virtual | ~BCP_tm_prob () |
Methods to pack/unpack objects | |
void | pack_var (const BCP_var &var) |
BCP_var * | unpack_var_without_bcpind (BCP_buffer &buf) |
int | unpack_var () |
void | pack_cut (const BCP_cut &cut) |
BCP_cut * | unpack_cut_without_bcpind (BCP_buffer &buf) |
int | unpack_cut () |
Query methods | |
char | param (BCP_tm_par::chr_params key) const |
int | param (BCP_tm_par::int_params key) const |
double | param (BCP_tm_par::dbl_params key) const |
const BCP_string & | param (BCP_tm_par::str_params key) const |
const BCP_vec< BCP_string > & | param (BCP_tm_par::str_array_params key) const |
double | granularity () const |
bool | has_ub () const |
double | ub () const |
bool | ub (double new_ub) |
bool | over_ub (const double lb) const |
Public Attributes | |
double | upper_bound |
double | start_time |
int | phase |
BCP_column_generation | current_phase_colgen |
std::map< int, Coin::SmartPtr< BCP_var > > | vars_local |
std::map< int, int > | vars_remote |
std::map< int, Coin::SmartPtr< BCP_cut > > | cuts_local |
std::map< int, int > | cuts_remote |
int | next_cut_index_set_start |
int | next_var_index_set_start |
bool | need_a_TS |
std::map< int, int > | ts_space |
BCP_tree | search_tree |
std::map< int, BCP_tm_node * > | active_nodes |
A map from the process ids to the nodes (what they work on). | |
CoinSearchTreeManager | candidate_list |
std::map< int, BCP_tm_node_to_send * > | nodes_to_send |
BCP_vec< BCP_tm_node * > | next_phase_nodes |
a vector of nodes to be processed in the next phase | |
BCP_vec< BCP_tm_node * > | nodes_to_free |
BCP_tm_stat | stat |
User provided members | |
BCP_tm_user * | user |
BCP_user_pack * | packer |
A class that holds the methods about how to pack things. | |
BCP_message_environment * | msg_env |
Statistics in the other processes | |
BCP_lp_statistics * | lp_stat |
BCP_solution * | feas_sol |
Parameters | |
BCP_parameter_set< BCP_tm_par > | par |
BCP_slave_params | slave_pars |
Flags | |
BCP_tm_flags | flags |
Message passing related fields | |
BCP_buffer | msg_buf |
std::vector< int > | ts_procs |
std::vector< int > | lp_procs |
BCP_scheduler | lp_scheduler |
double | root_node_sent_ |
members to measure how long it took to process the root node. | |
double | root_node_received_ |
The description of the core of the problem | |
BCP_problem_core * | core |
BCP_problem_core_change * | core_as_change |
Vectors indicating the number of leaf nodes assigned to each CP/VP | |
BCP_vec< std::pair< int, int > > | leaves_per_cp |
BCP_vec< std::pair< int, int > > | leaves_per_vp |
Private Member Functions | |
Disabled methods | |
BCP_tm_prob (const BCP_tm_prob &) | |
The copy constructor is declared but not defined to disable it. | |
BCP_tm_prob & | operator= (const BCP_tm_prob &) |
The assignment operator is declared but not defined to disable it. |
Definition at line 136 of file BCP_tm.hpp.
BCP_tm_prob::BCP_tm_prob | ( | const BCP_tm_prob & | ) | [private] |
The copy constructor is declared but not defined to disable it.
BCP_tm_prob::BCP_tm_prob | ( | ) |
Definition at line 18 of file BCP_tm.cpp.
BCP_tm_prob::~BCP_tm_prob | ( | ) | [virtual] |
Definition at line 32 of file BCP_tm.cpp.
References core, core_as_change, feas_sol, lp_stat, packer, and user.
BCP_tm_prob& BCP_tm_prob::operator= | ( | const BCP_tm_prob & | ) | [private] |
The assignment operator is declared but not defined to disable it.
void BCP_tm_prob::pack_var | ( | const BCP_var & | var | ) |
Definition at line 81 of file BCP_tm.cpp.
References BCP_AlgoObj, BCP_CoreObj, BCP_var::bcpind(), BCP_var::lb(), msg_buf, BCP_var::obj(), BCP_var::obj_type(), BCP_buffer::pack(), BCP_user_pack::pack_var_algo(), packer, stat, BCP_var::status(), BCP_var::ub(), ub(), and BCP_var::var_type().
Referenced by BCP_tm_node_to_send::send().
BCP_var * BCP_tm_prob::unpack_var_without_bcpind | ( | BCP_buffer & | buf | ) |
Definition at line 106 of file BCP_tm.cpp.
References BCP_AlgoObj, BCP_CoreObj, BCP_var::change_bounds(), packer, BCP_var::set_obj(), BCP_var::set_status(), BCP_var::set_var_type(), stat, ub(), BCP_buffer::unpack(), and BCP_user_pack::unpack_var_algo().
Referenced by BCP_tm_user::unpack_feasible_solution(), and unpack_var().
int BCP_tm_prob::unpack_var | ( | ) |
Definition at line 135 of file BCP_tm.cpp.
References msg_buf, BCP_var::set_bcpind(), BCP_buffer::unpack(), unpack_var_without_bcpind(), vars_local, and vars_remote.
Referenced by BCP_tm_unpack_node_description().
void BCP_tm_prob::pack_cut | ( | const BCP_cut & | cut | ) |
Definition at line 167 of file BCP_tm.cpp.
References BCP_AlgoObj, BCP_CoreObj, BCP_cut::bcpind(), BCP_cut::lb(), msg_buf, BCP_cut::obj_type(), BCP_buffer::pack(), BCP_user_pack::pack_cut_algo(), packer, stat, BCP_cut::status(), BCP_cut::ub(), and ub().
Referenced by BCP_tm_node_to_send::send().
BCP_cut * BCP_tm_prob::unpack_cut_without_bcpind | ( | BCP_buffer & | buf | ) |
Definition at line 190 of file BCP_tm.cpp.
References BCP_AlgoObj, BCP_CoreObj, BCP_cut::change_bounds(), packer, BCP_cut::set_status(), stat, ub(), BCP_buffer::unpack(), and BCP_user_pack::unpack_cut_algo().
Referenced by unpack_cut().
int BCP_tm_prob::unpack_cut | ( | ) |
Definition at line 215 of file BCP_tm.cpp.
References cuts_local, cuts_remote, msg_buf, BCP_cut::set_bcpind(), BCP_buffer::unpack(), and unpack_cut_without_bcpind().
Referenced by BCP_tm_unpack_node_description().
char BCP_tm_prob::param | ( | BCP_tm_par::chr_params | key | ) | const [inline] |
Definition at line 294 of file BCP_tm.hpp.
References BCP_parameter_set< Par >::entry(), and par.
Referenced by BCP_check_parameters(), BCP_tm_balance_data(), BCP_tm_change_config(), BCP_tm_create_root(), BCP_tm_is_data_balanced(), BCP_tm_main(), BCP_tm_print_info_line(), BCP_tm_remove_explored(), BCP_tm_save_root_cuts(), BCP_tm_scan_children(), BCP_tm_scan_siblings(), BCP_tm_shall_we_dive(), BCP_tm_start_one_node(), BCP_tm_start_processes(), BCP_tm_tasks_before_new_phase(), BCP_tm_trim_tree_wrapper(), BCP_tm_unpack_node_description(), BCP_tm_user::create_root(), BCP_tm_user::display_feasible_solution(), BM_tm::display_final_information(), BCP_tm_user::display_final_information(), granularity(), BM_tm::init_new_phase(), BCP_tm_user::init_new_phase(), BCP_tm_user::initialize_core(), over_ub(), process_message(), BCP_tm_node_to_send::receive_node_desc(), BCP_single_environment::register_process(), BCP_tm_node_to_send::send(), and BCP_tm_user::unpack_feasible_solution().
int BCP_tm_prob::param | ( | BCP_tm_par::int_params | key | ) | const [inline] |
double BCP_tm_prob::param | ( | BCP_tm_par::dbl_params | key | ) | const [inline] |
const BCP_string& BCP_tm_prob::param | ( | BCP_tm_par::str_params | key | ) | const [inline] |
const BCP_vec<BCP_string>& BCP_tm_prob::param | ( | BCP_tm_par::str_array_params | key | ) | const [inline] |
double BCP_tm_prob::granularity | ( | ) | const [inline] |
Definition at line 309 of file BCP_tm.hpp.
References BCP_tm_par::Granularity, and param().
Referenced by BCP_tm_start_one_node(), BCP_tm_trim_tree(), and BCP_tm_trim_tree_wrapper().
bool BCP_tm_prob::has_ub | ( | ) | const [inline] |
Definition at line 315 of file BCP_tm.hpp.
References BCP_DBL_MAX, and upper_bound.
Referenced by BCP_tm_shall_we_dive(), BCP_tm_start_one_node(), and BCP_tm_tasks_before_new_phase().
double BCP_tm_prob::ub | ( | ) | const [inline] |
Definition at line 317 of file BCP_tm.hpp.
References upper_bound.
Referenced by BCP_check_parameters(), BCP_tm_broadcast_ub(), BCP_tm_initialize_process_type(), BCP_tm_print_info_line(), BCP_tm_start_one_node(), BCP_tm_trim_tree(), BCP_tm_trim_tree_wrapper(), BCP_tm_user::change_candidate_heap(), pack_cut(), pack_var(), process_message(), BCP_single_environment::register_process(), unpack_cut_without_bcpind(), unpack_var_without_bcpind(), and BCP_tm_user::upper_bound().
bool BCP_tm_prob::ub | ( | double | new_ub | ) | [inline] |
bool BCP_tm_prob::over_ub | ( | const double | lb | ) | const [inline] |
Definition at line 327 of file BCP_tm.hpp.
References BCP_tm_par::Granularity, param(), and upper_bound.
virtual BCP_buffer& BCP_tm_prob::get_message_buffer | ( | ) | [inline, virtual] |
void BCP_tm_prob::process_message | ( | ) | [virtual] |
Implements BCP_process.
Definition at line 270 of file BCP_tm_msgproc.cpp.
References BCP_fatal_error::abort_on_error, BCP_ARE_YOU_TREEMANAGER, BCP_CONFIG_CHANGE, BCP_DBL_MAX, BCP_I_AM_TREEMANAGER, BCP_Msg_CutIndexSet, BCP_Msg_CutListDeleteReply, BCP_Msg_CutListRequestReply, BCP_Msg_FeasibleSolution, BCP_Msg_LpStatistics, BCP_Msg_NodeDescription_Discarded, BCP_Msg_NodeDescription_Infeas, BCP_Msg_NodeDescription_Infeas_Pruned, BCP_Msg_NodeDescription_OverUB, BCP_Msg_NodeDescription_OverUB_Pruned, BCP_Msg_NodeDescriptionWithBranchingInfo, BCP_Msg_NodeListDeleteReply, BCP_Msg_NodeListRequestReply, BCP_Msg_NoMessage, BCP_Msg_RequestCutIndexSet, BCP_Msg_RequestProcessList, BCP_Msg_RequestVarIndexSet, BCP_Msg_SBnodeFinished, BCP_Msg_SomethingDied, BCP_Msg_UpperBound, BCP_Msg_User, BCP_Msg_VarIndexSet, BCP_Msg_VarListDeleteReply, BCP_Msg_VarListRequestReply, BCP_Msg_WarmstartRoot, BCP_NextPhaseNode_Infeas, BCP_NextPhaseNode_OverUB, BCP_PrunedNode_Discarded, BCP_PrunedNode_Infeas, BCP_PrunedNode_OverUB, BCP_tm_broadcast_ub(), BCP_tm_change_config(), BCP_tm_provide_SB_processes(), BCP_tm_rebroadcast_root_warmstart(), BCP_tm_test_machine(), BCP_tm_unpack_node_no_branching_info(), BCP_tm_unpack_node_with_branching_info(), candidate_list, BCP_tm_user::change_candidate_heap(), BCP_buffer::clear(), BCP_tm_user::display_feasible_solution(), e, feas_sol, lp_scheduler, BCP_tm_par::MaxRunTime, BCP_tm_par::MessagePassingIsSerial, msg_buf, msg_env, BCP_buffer::msgtag(), next_cut_index_set_start, next_phase_nodes, next_var_index_set_start, nodes_to_free, BCP_solution::objective_value(), param(), BCP_tm_user::process_message(), BCP_tree::processed(), BCP_vec< T >::push_back(), BCP_tm_node_to_send::receive_cuts(), BCP_tm_node_to_send::receive_node_desc(), BCP_tm_node_to_send::receive_vars(), BCP_scheduler::release_sb_id(), BCP_tm_user::replace_solution(), BCP_tree::root(), search_tree, BCP_message_environment::send(), BCP_tree::size(), start_time, BCP_tm_node::status, BCP_tm_par::TmVerb_AllFeasibleSolution, BCP_tm_par::TmVerb_AllFeasibleSolutionValue, BCP_tm_par::TmVerb_BetterFeasibleSolution, BCP_tm_par::TmVerb_BetterFeasibleSolutionValue, BCP_tm_par::TmVerb_TimeOfImprovingSolution, BCP_tree::true_lower_bound(), ts_space, ub(), BCP_tm_user::unpack_feasible_solution(), upper_bound, user, and BCP_tm_node_to_send::waiting.
Definition at line 151 of file BCP_tm.hpp.
Referenced by BCP_tm_create_core(), BCP_tm_create_root(), BCP_tm_initialize_process_type(), BCP_tm_main(), BCP_tm_tasks_before_new_phase(), BCP_tm_wrapup(), BCP_tm_user::display_final_information(), process_message(), BCP_single_environment::register_process(), BCP_tm_node_to_send::send(), and ~BCP_tm_prob().
A class that holds the methods about how to pack things.
Definition at line 153 of file BCP_tm.hpp.
Referenced by BCP_tm_main(), BCP_tm_pack_root_cut(), BCP_tm_rebroadcast_root_warmstart(), BCP_tm_scan_children(), BCP_tm_scan_siblings(), BCP_tm_unpack_branching_info(), BCP_tm_unpack_node_description(), BCP_tm_unpack_root_cut(), pack_cut(), pack_var(), BCP_tm_node_to_send::receive_cuts(), BCP_tm_node_to_send::receive_node_desc(), BCP_tm_node_to_send::receive_vars(), BCP_single_environment::register_process(), BCP_tm_node_to_send::send(), unpack_cut_without_bcpind(), unpack_var_without_bcpind(), and ~BCP_tm_prob().
Definition at line 156 of file BCP_tm.hpp.
Referenced by BCP_tm_assign_processes(), BCP_tm_balance_data(), BCP_tm_broadcast_ub(), BCP_tm_change_config(), BCP_tm_idle_processes(), BCP_tm_initialize_process_type(), BCP_tm_main(), BCP_tm_notify_about_new_phase(), BCP_tm_provide_SB_processes(), BCP_tm_rebroadcast_root_warmstart(), BCP_tm_start_processes(), BCP_tm_stop_processes(), BCP_tm_test_machine(), BCP_tm_unpack_node_description(), BCP_tm_wrapup(), BCP_tm_user::broadcast_message(), process_message(), BCP_single_environment::register_process(), BCP_tm_node_to_send::send(), and BCP_tm_user::send_message().
Definition at line 163 of file BCP_tm.hpp.
Referenced by BM_tm::display_final_information(), BCP_tm_user::display_final_information(), process_message(), and ~BCP_tm_prob().
Definition at line 168 of file BCP_tm.hpp.
Referenced by BCP_check_parameters(), BCP_tm_main(), BCP_tm_parse_command_line(), BCP_tm_user::get_param(), param(), BCP_single_environment::register_process(), and BCP_tm_user::set_param().
Definition at line 170 of file BCP_tm.hpp.
Referenced by BCP_check_parameters(), BCP_tm_main(), BCP_tm_parse_command_line(), and BCP_single_environment::register_process().
Definition at line 183 of file BCP_tm.hpp.
Referenced by BCP_tm_balance_data(), BCP_tm_broadcast_ub(), BCP_tm_create_root(), BCP_tm_do_one_phase(), BCP_tm_initialize_process_type(), BCP_tm_pack_root_cut(), BCP_tm_provide_SB_processes(), BCP_tm_rebroadcast_root_warmstart(), BCP_tm_save_root_cuts(), BCP_tm_scan_children(), BCP_tm_scan_siblings(), BCP_tm_unpack_root_cut(), BCP_tm_wrapup(), get_message_buffer(), pack_cut(), pack_var(), process_message(), BCP_single_environment::register_process(), BCP_tm_node_to_send::send(), unpack_cut(), and unpack_var().
std::vector<int> BCP_tm_prob::ts_procs |
std::vector<int> BCP_tm_prob::lp_procs |
Definition at line 186 of file BCP_tm.hpp.
Referenced by BCP_tm_balance_data(), BCP_tm_broadcast_ub(), BCP_tm_idle_processes(), BCP_tm_notify_about_new_phase(), BCP_tm_notify_processes(), BCP_tm_rebroadcast_root_warmstart(), BCP_tm_start_processes(), BCP_tm_stop_processes(), BCP_tm_wrapup(), BCP_tm_user::broadcast_message(), and BCP_single_environment::register_process().
Definition at line 188 of file BCP_tm.hpp.
Referenced by BCP_tm_assign_processes(), BCP_tm_balance_data(), BCP_tm_do_one_phase(), BCP_tm_free_procs_of_node(), BCP_tm_main(), BCP_tm_provide_SB_processes(), BCP_tm_start_new_nodes(), BCP_tm_start_processes(), BCP_tm_wrapup(), process_message(), and BCP_single_environment::register_process().
double BCP_tm_prob::root_node_sent_ |
members to measure how long it took to process the root node.
Needed for the scheduler (both are in wallclock)
Definition at line 191 of file BCP_tm.hpp.
Referenced by BCP_tm_node_to_send::send().
Definition at line 192 of file BCP_tm.hpp.
double BCP_tm_prob::upper_bound |
Definition at line 197 of file BCP_tm.hpp.
Referenced by has_ub(), over_ub(), process_message(), and ub().
double BCP_tm_prob::start_time |
Definition at line 199 of file BCP_tm.hpp.
Referenced by BCP_tm_initialize_process_type(), BCP_tm_main(), BCP_tm_unpack_branching_info(), BM_tm::display_final_information(), BCP_tm_user::display_final_information(), process_message(), BCP_single_environment::register_process(), and BCP_tm_node_to_send::send().
Definition at line 204 of file BCP_tm.hpp.
Referenced by BCP_tm_create_child(), BCP_tm_initialize_process_type(), BCP_tm_main(), BCP_tm_unpack_node_description(), BCP_single_environment::register_process(), and ~BCP_tm_prob().
Definition at line 206 of file BCP_tm.hpp.
Referenced by BCP_tm_main(), BCP_single_environment::register_process(), BCP_tm_node_to_send::send(), and ~BCP_tm_prob().
Definition at line 210 of file BCP_tm.hpp.
Referenced by BCP_tm_save_root_cuts(), BCP_tm_tasks_before_new_phase(), and BCP_single_environment::register_process().
Definition at line 212 of file BCP_tm.hpp.
Referenced by BCP_tm_start_one_node(), BCP_tm_tasks_before_new_phase(), and BCP_tm_node_to_send::send().
std::map<int, Coin::SmartPtr<BCP_var> > BCP_tm_prob::vars_local |
Definition at line 216 of file BCP_tm.hpp.
Referenced by BCP_tm_create_core(), BCP_tm_create_root(), BCP_tm_node_to_send::send(), and unpack_var().
std::map<int, int> BCP_tm_prob::vars_remote |
Definition at line 218 of file BCP_tm.hpp.
Referenced by BCP_tm_node_to_send::send(), and unpack_var().
std::map<int, Coin::SmartPtr<BCP_cut> > BCP_tm_prob::cuts_local |
Definition at line 220 of file BCP_tm.hpp.
Referenced by BCP_tm_create_core(), BCP_tm_create_root(), BCP_tm_save_root_cuts(), BCP_tm_node_to_send::send(), and unpack_cut().
std::map<int, int> BCP_tm_prob::cuts_remote |
Definition at line 222 of file BCP_tm.hpp.
Referenced by BCP_tm_save_root_cuts(), BCP_tm_node_to_send::send(), and unpack_cut().
Definition at line 225 of file BCP_tm.hpp.
Referenced by BCP_tm_create_core(), BCP_tm_create_root(), and process_message().
Definition at line 227 of file BCP_tm.hpp.
Referenced by BCP_tm_create_core(), BCP_tm_create_root(), and process_message().
Definition at line 230 of file BCP_tm.hpp.
Referenced by BCP_tm_balance_data(), BCP_tm_unpack_node_no_branching_info(), and BCP_tm_unpack_node_with_branching_info().
std::map<int, int> BCP_tm_prob::ts_space |
Definition at line 231 of file BCP_tm.hpp.
Referenced by BCP_tm_balance_data(), and process_message().
Definition at line 235 of file BCP_tm.hpp.
Referenced by BCP_tm_balance_data(), BCP_tm_create_child(), BCP_tm_print_info_line(), BCP_tm_remove_explored(), BCP_tm_save_root_cuts(), BCP_tm_trim_tree_wrapper(), BCP_tm_unpack_node_description(), BCP_tm_unpack_node_no_branching_info(), BCP_tm_unpack_node_with_branching_info(), BCP_tm_unpack_priced_root(), BM_tm::display_final_information(), BCP_tm_user::display_final_information(), process_message(), BCP_single_environment::register_process(), and BCP_tm_node_to_send::send().
std::map<int, BCP_tm_node*> BCP_tm_prob::active_nodes |
A map from the process ids to the nodes (what they work on).
Definition at line 237 of file BCP_tm.hpp.
Referenced by BCP_tm_remove_lp(), BCP_tm_start_one_node(), BCP_tm_unpack_node_description(), and BCP_tm_unpack_priced_root().
CoinSearchTreeManager BCP_tm_prob::candidate_list |
Definition at line 239 of file BCP_tm.hpp.
Referenced by BCP_tm_balance_data(), BCP_tm_do_one_phase(), BCP_tm_list_candidates(), BCP_tm_print_info_line(), BCP_tm_remove_lp(), BCP_tm_shall_we_dive(), BCP_tm_start_one_node(), BCP_tm_tasks_before_new_phase(), BCP_tm_trim_tree_wrapper(), BCP_tm_unpack_branching_info(), process_message(), and BCP_single_environment::register_process().
std::map<int, BCP_tm_node_to_send*> BCP_tm_prob::nodes_to_send |
Definition at line 242 of file BCP_tm.hpp.
a vector of nodes to be processed in the next phase
Definition at line 246 of file BCP_tm.hpp.
Referenced by BCP_tm_start_one_node(), BCP_tm_tasks_before_new_phase(), BCP_tm_trim_tree_wrapper(), process_message(), and BCP_single_environment::register_process().
Definition at line 248 of file BCP_tm.hpp.
Referenced by BCP_tm_free_nodes(), BCP_tm_start_one_node(), and process_message().
BCP_vec< std::pair<int, int> > BCP_tm_prob::leaves_per_cp |
Definition at line 255 of file BCP_tm.hpp.
Referenced by BCP_tm_modify_pool_counters(), BCP_tm_remove_lp(), BCP_tm_trim_tree(), BCP_tm_trim_tree_wrapper(), BCP_tm_unpack_branching_info(), and BCP_single_environment::register_process().
BCP_vec< std::pair<int, int> > BCP_tm_prob::leaves_per_vp |
Definition at line 257 of file BCP_tm.hpp.
Referenced by BCP_tm_modify_pool_counters(), BCP_tm_remove_lp(), BCP_tm_trim_tree(), BCP_tm_trim_tree_wrapper(), BCP_tm_unpack_branching_info(), and BCP_single_environment::register_process().
Definition at line 261 of file BCP_tm.hpp.
Referenced by BCP_tm_main(), BCP_tm_wrapup(), pack_cut(), pack_var(), unpack_cut_without_bcpind(), and unpack_var_without_bcpind().