/home/coin/SVN-release/OS-2.4.1/Bcp/src/TM/BCP_tm_main.cpp File Reference

#include <cstdio>
#include <cerrno>
#include <cmath>
#include <queue>
#include "CoinTime.hpp"
#include "BcpConfig.h"
#include "BCP_os.hpp"
#include "BCP_USER.hpp"
#include "BCP_string.hpp"
#include "BCP_vector.hpp"
#include "BCP_buffer.hpp"
#include "BCP_message.hpp"
#include "BCP_var.hpp"
#include "BCP_cut.hpp"
#include "BCP_node_change.hpp"
#include "BCP_tm.hpp"
#include "BCP_tm_functions.hpp"
#include "BCP_main_fun.hpp"
#include "BCP_tm_user.hpp"
#include "BCP_lp_user.hpp"
#include "BCP_message_single.hpp"
#include "BCP_message_mpi.hpp"
#include "BCP_message_pvm.hpp"

Include dependency graph for BCP_tm_main.cpp:

Go to the source code of this file.

Functions

int bcp_main (int argc, char *argv[], USER_initialize *user_init)
 This is the function the user must invoke when (s)he is ready to turn contrl over to BCP.
void BCP_tm_main (BCP_message_environment *msg_env, USER_initialize *user_init, const int argnum, const char *const *arglist)
bool BCP_tm_do_one_phase (BCP_tm_prob &p)
BCP_problem_coreBCP_tm_create_core (BCP_tm_prob &p)
static BCP_cutBCP_tm_unpack_root_cut (BCP_tm_prob &tm)
BCP_tm_nodeBCP_tm_create_root (BCP_tm_prob &p)
void BCP_tm_tasks_before_new_phase (BCP_tm_prob &p)


Function Documentation

int bcp_main ( int  argc,
char *  argv[],
USER_initialize user_init 
)

This is the function the user must invoke when (s)he is ready to turn contrl over to BCP.

The arguments of the function are the command line arguments and a pointer to an initializer object. That object should be derived from the USER_initialize class. Its member methods will be invoked to initialize the user controlled parts of the branch-and-cut-and-price procedure.

Definition at line 37 of file BCP_tm_main.cpp.

References BCP_cg_main(), BCP_lp_main(), BCP_Msg_AnyMessage, BCP_Msg_ProcessType, BCP_ProcessType_Any, BCP_ProcessType_CG, BCP_ProcessType_CP, BCP_ProcessType_EndProcess, BCP_ProcessType_LP, BCP_ProcessType_TM, BCP_ProcessType_TS, BCP_ProcessType_VG, BCP_ProcessType_VP, BCP_tm_main(), BCP_tmstorage_main(), BCP_used_heap(), BCP_vg_main(), USER_initialize::msgenv_init(), BCP_buffer::msgtag(), BCP_message_environment::parent_process(), BCP_message_environment::receive(), BCP_message_environment::register_process(), BCP_single_environment::set_arguments(), and BCP_buffer::unpack().

Referenced by main().

void BCP_tm_main ( BCP_message_environment msg_env,
USER_initialize user_init,
const int  argnum,
const char *const *  arglist 
)

Definition at line 140 of file BCP_tm_main.cpp.

References BCP_sanity_checks(), BCP_tm_create_core(), BCP_tm_create_root(), BCP_tm_do_one_phase(), BCP_tm_idle_processes(), BCP_tm_notify_processes(), BCP_tm_parse_command_line(), BCP_tm_start_processes(), BCP_tm_stop_processes(), BCP_tm_tasks_before_new_phase(), BCP_tm_wrapup(), BCP_slave_params::cg, BCP_tm_par::CgProcessNum, BCP_tm_prob::core, BCP_tm_prob::core_as_change, BCP_tm_par::CpProcessNum, BCP_parameter_set< Par >::entry(), gethostname, GETPID, log(), BCP_tm_par::LogFileName, BCP_slave_params::lp, BCP_tm_prob::lp_scheduler, BCP_tm_par::LpProcessNum, BCP_tm_par::LPscheduler_FactorTimeHorizon, BCP_tm_par::LPscheduler_MaxNodeIdNum, BCP_tm_par::LPscheduler_MaxNodeIdRatio, BCP_tm_par::LPscheduler_MaxSbIdNum, BCP_tm_par::LPscheduler_MinSbIdNum, BCP_tm_par::LPscheduler_OverEstimationRate, BCP_tm_par::LPscheduler_OverEstimationStatic, BCP_tm_par::LPscheduler_SwitchToRateThreshold, BCP_vg_par::MessagePassingIsSerial, BCP_cg_par::MessagePassingIsSerial, BCP_lp_par::MessagePassingIsSerial, BCP_tm_par::MessagePassingIsSerial, BCP_tm_prob::msg_env, BCP_message_environment::num_procs(), BCP_tm_prob::packer, USER_initialize::packer_init(), BCP_tm_prob::par, BCP_tm_prob::param(), BCP_parameter_set< Par >::set_entry(), BCP_tm_stat::set_num_lp(), BCP_tm_user::setTmProblemPointer(), BCP_tm_prob::slave_pars, BCP_tm_prob::start_time, BCP_tm_prob::stat, USER_initialize::tm_init(), BCP_tm_prob::user, BCP_user_pack::user_class, BCP_slave_params::vg, BCP_tm_par::VgProcessNum, and BCP_tm_par::VpProcessNum.

Referenced by bcp_main().

bool BCP_tm_do_one_phase ( BCP_tm_prob p  ) 

Definition at line 306 of file BCP_tm_main.cpp.

References BCP_AnyProcess, BCP_Msg_AnyMessage, BCP_NodeStart_Error, BCP_tm_balance_data(), BCP_tm_is_data_balanced(), BCP_tm_start_new_nodes(), BCP_tm_prob::candidate_list, BCP_buffer::clear(), BCP_tm_prob::lp_scheduler, BCP_tm_prob::msg_buf, BCP_scheduler::numNodeIds(), and BCP_tm_par::TmTimeout.

Referenced by BCP_tm_main().

BCP_problem_core* BCP_tm_create_core ( BCP_tm_prob p  ) 

Definition at line 347 of file BCP_tm_main.cpp.

References BCP_ContinuousVar, BCP_tm_prob::cuts_local, e, BCP_tm_user::initialize_core(), BCP_tm_prob::next_cut_index_set_start, BCP_tm_prob::next_var_index_set_start, BCP_vec< T >::size(), BCP_tm_prob::user, and BCP_tm_prob::vars_local.

Referenced by BCP_tm_main(), and BCP_single_environment::register_process().

static BCP_cut* BCP_tm_unpack_root_cut ( BCP_tm_prob tm  )  [inline, static]

Definition at line 391 of file BCP_tm_main.cpp.

References BCP_AlgoObj, BCP_CoreObj, BCP_cut::change_bounds(), BCP_tm_prob::msg_buf, BCP_tm_prob::packer, BCP_cut::set_bcpind(), BCP_cut::set_status(), BCP_buffer::unpack(), and BCP_user_pack::unpack_cut_algo().

Referenced by BCP_tm_create_root().

BCP_tm_node* BCP_tm_create_root ( BCP_tm_prob p  ) 

Definition at line 418 of file BCP_tm_main.cpp.

References BCP_obj_set_change::_change, BCP_tm_node::_core_storage, BCP_tm_node::_cut_storage, BCP_tm_node::_data, BCP_tm_node_data::_desc, BCP_obj_set_change::_new_objs, BCP_problem_core_change::_storage, BCP_tm_node_data::_user, BCP_tm_node::_var_storage, BCP_tm_node::_ws_storage, BCP_Msg_NoMessage, BCP_Storage_Explicit, BCP_Storage_NoData, BCP_Storage_WrtCore, BCP_tm_unpack_root_cut(), BCP_string::c_str(), BCP_buffer::clear(), BCP_node_change::core_change, BCP_tm_user::create_root(), BCP_node_change::cut_change, BCP_tm_prob::cuts_local, f, BCP_string::length(), BCP_tm_prob::msg_buf, BCP_tm_prob::next_cut_index_set_start, BCP_tm_prob::next_var_index_set_start, BCP_tm_prob::param(), BCP_tm_par::ReadRootCutsFrom, BCP_vec< T >::reserve(), BCP_vec< T >::size(), BCP_vec< T >::unchecked_push_back(), BCP_tm_prob::user, BCP_node_change::var_change, and BCP_tm_prob::vars_local.

Referenced by BCP_tm_main(), and BCP_single_environment::register_process().

void BCP_tm_tasks_before_new_phase ( BCP_tm_prob p  ) 

Definition at line 501 of file BCP_tm_main.cpp.

References BCP_DoNotGenerateColumns_Fathom, BCP_tm_notify_about_new_phase(), BCP_tm_trim_tree_wrapper(), BCP_tm_wrapup(), BCP_tm_prob::candidate_list, BCP_vec< T >::clear(), BCP_tm_prob::current_phase_colgen, BCP_tm_prob::has_ub(), BCP_tm_user::init_new_phase(), BCP_tm_prob::next_phase_nodes, BCP_tm_prob::param(), BCP_tm_prob::phase, BCP_vec< T >::size(), BCP_tm_par::TmVerb_NewPhaseStart, BCP_tm_par::TrimTreeBeforeNewPhase, and BCP_tm_prob::user.

Referenced by BCP_tm_main(), and BCP_single_environment::register_process().


Generated on Thu Nov 10 03:07:24 2011 by  doxygen 1.4.7