55 const int bcpind = var.
bcpind();
59 const double obj = var.
obj();
60 const double lb = var.
lb();
61 const double ub = var.
ub();
75 printf(
" VG: Default unpack_module_data() executed.\n");
85 printf(
" VG: Default unpack_dual_solution() executed.\n");
90 VG: BCP_Msg_LpSolution_User message arrived but the unpack_dual_solution() \n\
91 function is not overridden.\n");
103 while (--cutnum >= 0) {
118 printf(
" VG: Default generate_vars() 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.
BCP_buffer & pack(const T &value)
Pack a single object of type T.
int current_level() const
Return the level of the search tree node for which cuts are being generated.
BCP_buffer & unpack(T &value)
Unpack a single object of type T.
int current_iteration() const
Return the iteration count within the search tree node for which cuts are being generated.
void clear()
Delete every entry.
virtual void unpack_dual_solution(BCP_buffer &buf)
Unpack the LP solution arriving from the LP process.
double upper_bound() const
Return what is the best known upper bound (might be BCP_DBL_MAX)
Print out a message when the default version of an overridable method is executed.
BCP_message_environment * msg_env
The message passing environment.
char entry(const chr_params key) const
void set_param(const BCP_vg_par::chr_params key, const bool val)
int phase
The phase the algorithm is in.
BCP_buffer msg_buf
The message buffer of the Variable Generator process.
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.
static const CouNumber pi
BCP_obj_status
This enumerative constant gives the status of an object (variable or cut).
int sender
The process id of the LP process that sent the solution.
double ub() const
Return the current upper bound (BCP_DBL_MAX/10 if there's no upper bound found yet.)
The user packed everything.
char get_param(const BCP_vg_par::chr_params key) const
double ub() const
Return the upper bound.
int node_index
The index of search tree node where the solution was generated.
void set_entry(const chr_params key, const char val)
BCP_cut * unpack_cut()
Unpack a cut.
The message contains the description of a variable.
double obj() const
Return the objective coefficient.
void clear()
Completely clear the buffer.
BCP_parameter_set< BCP_vg_par > par
The parameters controlling the Variable Generator process.
virtual void generate_vars(BCP_vec< BCP_cut * > &cuts, BCP_vec< double > &pi)
Perform the actual variable generation.
BCP_message_tag msgtag() const
Return the message tag of the message in the buffer.
BCP_var_t var_type() const
Return the integrality type of the variable.
Abstract base class that defines members common to all types of variables.
Currently there isn't any error handling in BCP.
int node_level
The level of search tree node where the solution was generated.
int bcpind() const
Return the internal index of the variable.
int current_index() const
Return the internal index of the search tree node for which cuts are being generated.
BCP_obj_status status() const
Return the status of the variable.
This class describes the message buffer used for all processes of BCP.
virtual void pack_var_algo(const BCP_var_algo *var, BCP_buffer &buf)
Pack an algorithmic variable.
void unchecked_push_back(const_reference x)
Append x to the end of the vector.
int node_iteration
The iteration within the search tree node where the solution was generated.
double lb() const
Return the lower bound.
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.
void send_var(const BCP_var &var)
Pack the argument into the message buffer and send it to the sender of the LP solution.
BCP_user_pack * packer
A class that holds the methods about how to pack things.
BCP_vec< BCP_cut * > cuts
Variables are to be generated for the LP solution given by these cuts and their values (next member)...
int current_phase() const
Return the phase the algorithm is in.
BCP_object_t
This enumerative constant describes the possible types of objects (variables and cuts).
BCP_vec< double > pi
The dual values corresponding to the cuts above.
virtual BCP_object_t obj_type() const =0
Return the type of the variable.
virtual void unpack_module_data(BCP_buffer &buf)
Unpack the initial information sent to the Variable Generator process by the Tree Manager...
BCP_var_t
This enumerative constant describes the integrality type of a variable.