55 const int bcpind = cut.
bcpind();
58 const double lb = cut.
lb();
59 const double ub = cut.
ub();
72 printf(
" CG: Default unpack_module_data() executed.\n");
82 printf(
" CG: Default unpack_primal_solution() executed.\n");
87 CG: BCP_Msg_LpSolution_User message arrived but the unpack_primal_solution()\n\
88 function is not overridden.\n");
100 while (--varnum >= 0) {
115 printf(
" CG: Default generate_cuts() executed.\n");
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 current_iteration() const
Return the iteration count within the search tree node for which cuts are being generated.
BCP_buffer & pack(const T &value)
Pack a single object of type T.
int node_index
The index of search tree node where the solution was generated.
The message contains the description of a cut.
BCP_vec< double > x
The primal values corresponding to the variables above.
BCP_buffer & unpack(T &value)
Unpack a single object of type T.
int sender
The process id of the LP process that sent the solution.
void clear()
Delete every entry.
Abstract base class that defines members common to all types of cuts.
int_params
Integer parameters.
char entry(const chr_params key) const
int current_phase() const
Return the phase the algorithm is in.
double ub() const
Return the upper bound on the cut.
void reserve(const size_t n)
Reallocate the object to make space for n entries.
This class is a very simple impelementation of a constant length string.
The user packed everything.
virtual void unpack_primal_solution(BCP_buffer &buf)
Unpack the LP solution arriving from the LP process.
BCP_obj_status
This enumerative constant gives the status of an object (variable or cut).
int current_index() const
Return the internal index of the search tree node for which cuts are being generated.
void set_param(const BCP_cg_par::chr_params key, const bool val)
double lb() const
Return the lower bound on the cut.
BCP_vec< BCP_var * > vars
Cuts are to be generated for the LP solution given by these variables and their values (next member)...
double upper_bound() const
Return what is the best known upper bound (might be BCP_DBL_MAX)
virtual void pack_cut_algo(const BCP_cut_algo *cut, BCP_buffer &buf)
Pack an algorithmic cut.
int phase
The phase the algorithm is in.
char get_param(const BCP_cg_par::chr_params key) const
void set_entry(const chr_params key, const char val)
void send_cut(const BCP_cut &cut)
Pack the argument into the message buffer and send it to the sender of the LP solution.
BCP_obj_status status() const
Return the status of the cut.
Print out a message when the default version of an overridable method is executed.
virtual BCP_object_t obj_type() const =0
Return the type of the variable.
void clear()
Completely clear the buffer.
BCP_message_tag msgtag() const
Return the message tag of the message in the buffer.
BCP_buffer msg_buf
The message buffer of the Cut Generator process.
Currently there isn't any error handling in BCP.
virtual void unpack_module_data(BCP_buffer &buf)
Unpack the initial information sent to the Cut Generator process by the Tree Manager.
virtual void generate_cuts(BCP_vec< BCP_var * > &vars, BCP_vec< double > &x)
Perform the actual cut generation.
int node_iteration
The iteration within the search tree node where the solution was generated.
This class describes the message buffer used for all processes of BCP.
str_params
String parameters.
void unchecked_push_back(const_reference x)
Append x to the end of the vector.
void purge_ptr_vector(BCP_vec< T * > &pvec, typename BCP_vec< T * >::iterator first, typename BCP_vec< T * >::iterator last)
This function purges the entries [first,last) from the vector of pointers pvec.
BCP_user_pack * packer
A class that holds the methods about how to pack things.
dbl_params
There are no double parameters.
BCP_message_environment * msg_env
The message passing environment.
chr_params
Character parameters.
int bcpind() const
Return the internal index of the cut.
BCP_var * unpack_var()
Unpack a variable.
BCP_object_t
This enumerative constant describes the possible types of objects (variables and cuts).
int node_level
The level of search tree node where the solution was generated.
BCP_parameter_set< BCP_cg_par > par
The parameters controlling the Cut Generator process.
double ub() const
Return the current upper bound (BCP_DBL_MAX if there's no upper bound found yet.) ...
void fint fint fint real fint real * x
int current_level() const
Return the level of the search tree node for which cuts are being generated.