3 #include "CoinTime.hpp"
60 printf(
" TM: Default unpack_feasible_solution() executed.\n");
70 while (--varnum >= 0) {
76 var->
set_bcpind(bcpind < 0 ? -bcpind : bcpind);
122 BCP_tm_user::broadcast_message: CP not yet implemented\n");
126 BCP_tm_user::broadcast_message: VP not yet implemented\n");
128 #if ! defined(BCP_ONLY_LP_PROCESS_HANDLING_WORKS)
139 #if ! defined(BCP_ONLY_LP_PROCESS_HANDLING_WORKS)
148 BCP_tm_user::broadcast_message: broadcast to TM/TS/EndProcess...\n");
161 BCP_tm_user::process_message() invoked but not overridden!\n");
173 printf(
" TM: Default BCP_tm_user::initialize_core() executed.\n");
185 printf(
" TM: Default BCP_tm_user::create_root() executed.\n");
196 TM: Default BCP_tm_user::display_feasible_solution() executed.\n");
203 BCP_tm_user::display_feasible_solution() invoked with non-generic sol.\n");
225 bool after_processing_node)
235 printf(
"TM: Running time: %.3f\n", CoinWallclockTime() -
p->
start_time);
236 printf(
"TM: search tree size: %i ( processed %i ) max depth: %i\n",
242 printf(
"TM: No feasible solution is found\n");
244 printf(
"TM: The best solution found has value %f\n",
258 CoinSearchTreeBase*& candidates)
261 printf(
" TM: Default init_new_phase() executed.\n");
266 candidates =
new CoinSearchTree<CoinSearchTreeCompareBest>;
269 candidates =
new CoinSearchTree<CoinSearchTreeCompareBreadth>;
272 candidates =
new CoinSearchTree<CoinSearchTreeCompareDepth>;
275 candidates =
new CoinSearchTree<CoinSearchTreeComparePreferred>;
284 const bool new_solution)
287 candidates.newSolution(
p->
ub());
289 candidates.reevaluateSearchStrategy();
static double lb_multiplier
The lower bounds of the unexplored search tree nodes.
virtual void display_feasible_solution(const BCP_solution *sol)
Display a feasible solution.
BCP_var * unpack_var_without_bcpind(BCP_buffer &buf)
virtual void send(const int target, const BCP_message_tag tag)=0
Send an empty message (message tag only) to the process given by the frist argument.
int get_process_id() const
BCP_buffer & unpack(T &value)
Unpack a single object of type T.
double upper_bound() const
Return what is the best known upper bound (might be BCP_DBL_MAX)
virtual double objective_value() const =0
The method returning the objective value of the solution.
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...
Print out a message when the default version of an overridable method is executed.
virtual void change_candidate_heap(CoinSearchTreeManager &candidates, const bool new_solution)
dbl_params
Double parameters.
BCP_process_t
This enumerative constant describes the various process types.
virtual void display_final_information(const BCP_lp_statistics &lp_stat)
Display information after BCP finished processing the search tree.
char entry(const chr_params key) const
void set_bcpind(const int bcpind)
Set the internal index of the variable.
char get_param(const BCP_tm_par::chr_params key) const
This class is a very simple impelementation of a constant length string.
void send_message(const int target, const BCP_buffer &buf)
Send a message to a particular process.
virtual BCP_solution * unpack_feasible_solution(BCP_buffer &buf)
Unpack a MIP feasible solution that was packed by the BCP_lp_user::pack_feasible_solution() method...
void set_param(const BCP_tm_par::chr_params key, const bool val)
chr_params
Character parameters.
void set_objective_value(double v)
Set the objective value of the solution.
Which search tree enumeration strategy should be used.
void set_entry(const chr_params key, const char val)
void fint fint fint * phase
BCP_parameter_set< BCP_tm_par > par
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 void init_new_phase(int phase, BCP_column_generation &colgen, CoinSearchTreeBase *&candidates)
Do whatever initialization is necessary before the phase-th phase.
void add_entry(BCP_var *var, double value)
Append a variable and the corresponding value to the end of the appropriate vectors.
Abstract base class that defines members common to all types of variables.
Currently there isn't any error handling in BCP.
void broadcast_message(const BCP_process_t proc_type, const BCP_buffer &buf)
Broadcast the message to all processes of the given type.
BCP_message_environment * msg_env
A class that holds the methods about how to pack things.
int_params
Integer parameters.
void display() const
Print out the statistics.
Invoke "display_feasible_solution" user routine for the best feasible solution after the entire tree ...
std::vector< int > lp_procs
members to measure how long it took to process the root node.
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...
This class describes the message buffer used for all processes of BCP.
virtual void initialize_core(BCP_vec< BCP_var_core * > &vars, BCP_vec< BCP_cut_core * > &cuts, BCP_lp_relax *&matrix)
Create the core of the problem by filling out the last three arguments.
std::multiset< double > lower_bounds
BCP_tm_user * user
A class that holds the methods about how to pack things.
Print statistics: running time, tree size, best solution value.
Used by the user to send a message to the user portion of the other process.
BCP_column_generation
This enumerative constant describes what to do when a search tree node becomes fathomable for the cur...
virtual bool replace_solution(const BCP_solution *old_sol, const BCP_solution *new_sol)
Decide whether to replace old_sol with new_sol.
virtual void display_node_information(BCP_tree &search_tree, const BCP_tm_node &node)
Display user information just before a new node is sent to the LP or diving into a node is acknowledg...
This class holds a MIP feasible primal solution.
int process_id() const
What is the process id of the current process.
void display() const
Display the solution.
char param(BCP_tm_par::chr_params key) const
An object of type BCP_lp_relax holds the description of an lp relaxation.
str_params
String parameters.
double lower_bound() const
Return a global lower bound.
virtual void multicast(int num, const int *targets, const BCP_message_tag tag)=0
Send an empty message (message tag only) to all the processes in the process array.
This is the abstract base class for a solution to a Mixed Integer Programming problem.