#include <BM.hpp>
Inheritance diagram for BM_tm:
Public Member Functions | |
virtual void | initialize_core (BCP_vec< BCP_var_core * > &vars, BCP_vec< BCP_cut_core * > &cuts, BCP_lp_relax *&matrix) |
Pass the core constraints and core variables to bcp. | |
virtual void | create_root (BCP_vec< BCP_var * > &added_vars, BCP_vec< BCP_cut * > &added_cuts, BCP_user_data *&user_data) |
Create the set of extra variables and cuts that should be added to the formulation in the root node. | |
virtual void | display_feasible_solution (const BCP_solution *sol) |
Print a feasible solution. | |
virtual void | process_message (BCP_buffer &buf) |
Process a message that has been sent by another process' user part to this process' user part. | |
void | receive_pseudo_cost_update (BCP_buffer &buf) |
void | pack_pseudo_costs (BCP_buffer &buf) |
virtual void | display_final_information (const BCP_lp_statistics &lp_stat) |
Output the final solution. | |
virtual void | init_new_phase (int phase, BCP_column_generation &colgen, CoinSearchTreeBase *&candidates) |
Do whatever initialization is necessary before the phase -th phase. | |
void | readIpopt () |
Constructors and destructors | |
BM_tm () | |
Default constructor. | |
virtual | ~BM_tm () |
Default destructor. | |
Packing and unpacking methods | |
virtual void | pack_module_data (BCP_buffer &buf, BCP_process_t ptype) |
Pack the initial information (info that the user wants to send over) for the process specified by the last argument. | |
Public Attributes | |
Private data member | |
BCP_string | ipopt_file_content |
BCP_string | nl_file_content |
BCP_parameter_set< BM_par > | par |
OsiPseudoCosts | pseudoCosts_ |
Private Member Functions | |
void | write_AMPL_solution (const BCP_solution *sol, bool write_file, bool write_screen) |
auxilliary method for handling output for AMPL |
Definition at line 170 of file BM.hpp.
virtual BM_tm::~BM_tm | ( | ) | [inline, virtual] |
void BM_tm::pack_module_data | ( | BCP_buffer & | buf, | |
BCP_process_t | ptype | |||
) | [virtual] |
Pack the initial information (info that the user wants to send over) for the process specified by the last argument.
The information packed here will be unpacked in the unpack_module_data()
method of the user defined class in the appropriate process.
Default: empty method.
Reimplemented from BCP_tm_user.
Definition at line 16 of file BM_pack.cpp.
References BCP_ProcessType_LP, BCP_ProcessType_TS, ipopt_file_content, nl_file_content, BCP_parameter_set< Par >::pack(), and par.
void BM_tm::initialize_core | ( | BCP_vec< BCP_var_core * > & | vars, | |
BCP_vec< BCP_cut_core * > & | cuts, | |||
BCP_lp_relax *& | matrix | |||
) | [virtual] |
Pass the core constraints and core variables to bcp.
Reimplemented from BCP_tm_user.
Definition at line 61 of file BM_tm.cpp.
References Bonmin::B_BB, BCP_BinaryVar, BCP_ContinuousVar, BCP_IntegerVar, Bonmin::BabSetupBase::continuousSolver(), BCP_lp_relax::copyOf(), BCP_parameter_set< Par >::entry(), Bonmin::BonminSetup::getAlgorithm(), Bonmin::BonminAmplSetup::initialize(), BM_par::IpoptParamfile, Bonmin::OsiTMINLPInterface::isInteger(), Bonmin::OsiTMINLPInterface::model(), BM_par::NL_filename, Bonmin::BabSetupBase::nonlinearSolver(), Bonmin::TMINLP::SosInfo::num, par, pseudoCosts_, BCP_vec< T >::push_back(), Bonmin::BabSetupBase::readOptionsFile(), and BCP_vec< T >::reserve().
void BM_tm::create_root | ( | BCP_vec< BCP_var * > & | added_vars, | |
BCP_vec< BCP_cut * > & | added_cuts, | |||
BCP_user_data *& | user_data | |||
) | [virtual] |
Create the set of extra variables and cuts that should be added to the formulation in the root node.
Also decide how variable pricing shuld be done, that is, if column generation is requested in the init_new_phase() method of this class then column generation should be performed according to pricing_status
.
Reimplemented from BCP_tm_user.
Definition at line 137 of file BM_tm.cpp.
References BM_node::numNlpFailed_.
void BM_tm::display_feasible_solution | ( | const BCP_solution * | sol | ) | [virtual] |
Print a feasible solution.
Reimplemented from BCP_tm_user.
Definition at line 251 of file BM_tm.cpp.
References write_AMPL_solution().
void BM_tm::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_tm_user.
Definition at line 210 of file BM_tm.cpp.
References BM_PseudoCostUpdate, receive_pseudo_cost_update(), and BCP_buffer::unpack().
void BM_tm::receive_pseudo_cost_update | ( | BCP_buffer & | buf | ) |
Definition at line 306 of file BM_tm.cpp.
References pseudoCosts_, and BCP_buffer::unpack().
Referenced by process_message().
void BM_tm::pack_pseudo_costs | ( | BCP_buffer & | buf | ) |
Definition at line 335 of file BM_tm.cpp.
References BCP_buffer::pack(), and pseudoCosts_.
Referenced by BM_pack::pack_user_data().
void BM_tm::display_final_information | ( | const BCP_lp_statistics & | lp_stat | ) | [virtual] |
Output the final solution.
Reimplemented from BCP_tm_user.
Definition at line 222 of file BM_tm.cpp.
References BCP_lp_statistics::display(), BCP_tm_prob::feas_sol, BCP_tm_user::getTmProblemPointer(), BCP_tree::maxdepth(), BCP_solution::objective_value(), BCP_tm_user::p, BCP_tm_prob::param(), BCP_tree::processed(), BCP_tm_prob::search_tree, BCP_tree::size(), BCP_tm_prob::start_time, BCP_tm_par::TmVerb_BestFeasibleSolution, BCP_tm_par::TmVerb_FinalStatistics, and write_AMPL_solution().
void BM_tm::init_new_phase | ( | int | phase, | |
BCP_column_generation & | colgen, | |||
CoinSearchTreeBase *& | candidates | |||
) | [virtual] |
Do whatever initialization is necessary before the phase
-th phase.
(E.g., setting the pricing strategy.)
Reimplemented from BCP_tm_user.
Definition at line 277 of file BM_tm.cpp.
References BCP_BestFirstSearch, BCP_BreadthFirstSearch, BCP_DepthFirstSearch, BCP_DoNotGenerateColumns_Fathom, BCP_PreferredFirstSearch, BCP_tm_user::getTmProblemPointer(), BCP_tm_user::p, BCP_tm_prob::param(), and BCP_tm_par::TreeSearchStrategy.
void BM_tm::readIpopt | ( | ) |
Definition at line 29 of file BM_tm.cpp.
References BCP_string::assign(), BCP_parameter_set< Par >::entry(), ipopt_file_content, BM_par::IpoptParamfile, nl_file_content, BM_par::NL_filename, and par.
Referenced by BM_init::tm_init().
void BM_tm::write_AMPL_solution | ( | const BCP_solution * | sol, | |
bool | write_file, | |||
bool | write_screen | |||
) | [private] |
auxilliary method for handling output for AMPL
Definition at line 147 of file BM_tm.cpp.
References BCP_solution_generic::_values, BCP_solution_generic::_vars, BCP_ContinuousVar, Bonmin::BabSetupBase::continuousSolver(), BCP_parameter_set< Par >::entry(), Bonmin::OsiTMINLPInterface::getNumCols(), Bonmin::BonminAmplSetup::initialize(), Bonmin::OsiTMINLPInterface::model(), BM_par::NL_filename, Bonmin::BabSetupBase::nonlinearSolver(), BCP_solution_generic::objective_value(), par, BCP_vec< T >::size(), and Bonmin::TMINLP::SUCCESS.
Referenced by display_feasible_solution(), and display_final_information().
Definition at line 177 of file BM.hpp.
Referenced by initialize_core(), pack_module_data(), readIpopt(), BM_init::tm_init(), and write_AMPL_solution().
OsiPseudoCosts BM_tm::pseudoCosts_ |
Definition at line 178 of file BM.hpp.
Referenced by initialize_core(), pack_pseudo_costs(), and receive_pseudo_cost_update().