Bcp 1.4.4
Loading...
Searching...
No Matches
BCP_cg.hpp
Go to the documentation of this file.
1// Copyright (C) 2000, International Business Machines
2// Corporation and others. All Rights Reserved.
3#ifndef _BCP_CG_H
4#define _BCP_CG_H
5
6// This file is fully docified.
7
8#include <cfloat>
9
10#include "BCP_math.hpp"
11#include "BCP_message_tag.hpp"
12#include "BCP_vector.hpp"
13#include "BCP_buffer.hpp"
14#include "BCP_cg_param.hpp"
15#include "BCP_parameters.hpp"
16#include "BCP_process.hpp"
17
18class BCP_cg_user;
19class BCP_user_pack;
22class BCP_var;
23class BCP_cut;
24
32class BCP_cg_prob : public BCP_process {
33private:
39 BCP_cg_prob& operator=(const BCP_cg_prob&);
42public:
45
46 // User provided members ---------------------------------------------------
51
54
59
62
65
68
70 // int tree_manager;
71
74
75 // the lp solution, its sender and at which node in which iteration the lp
76 // solution was generated.
87 int sender;
88
89
91 int phase;
99
102public:
107 BCP_cg_prob(int my_id, int parent);
109 virtual ~BCP_cg_prob();
115 inline bool has_ub() const { return upper_bound < BCP_DBL_MAX / 10; }
118 inline double ub() const { return upper_bound; }
124 inline void ub(const double bd) { upper_bound = bd; }
125
134 //--------------------------------------------------------------------------
135 virtual BCP_buffer& get_message_buffer() { return msg_buf; }
136 virtual void process_message();
137};
138
139// This function is used only internally.
140bool
142
143#endif
bool BCP_cg_process_message(BCP_cg_prob &p, BCP_buffer &buf)
#define BCP_DBL_MAX
Definition BCP_math.hpp:6
This class describes the message buffer used for all processes of BCP.
This class is the central class of the Cut Generator process.
Definition BCP_cg.hpp:32
int node_level
The level of search tree node where the solution was generated.
Definition BCP_cg.hpp:93
BCP_buffer msg_buf
The message buffer of the Cut Generator process.
Definition BCP_cg.hpp:61
double upper_bound
The proc id of the tree manager.
Definition BCP_cg.hpp:73
BCP_var * unpack_var()
Unpack a variable.
BCP_cg_user * user
The user object holding the user's data.
Definition BCP_cg.hpp:50
BCP_cg_prob(int my_id, int parent)
The default constructor.
bool probe_messages()
Test if there is a message in the message queue waiting to be processed.
BCP_vec< BCP_var * > vars
Cuts are to be generated for the LP solution given by these variables and their values (next member).
Definition BCP_cg.hpp:83
int node_iteration
The iteration within the search tree node where the solution was generated.
Definition BCP_cg.hpp:98
int sender
The process id of the LP process that sent the solution.
Definition BCP_cg.hpp:87
int phase
The phase the algorithm is in.
Definition BCP_cg.hpp:91
BCP_parameter_set< BCP_cg_par > par
The parameters controlling the Cut Generator process.
Definition BCP_cg.hpp:64
virtual void process_message()
virtual ~BCP_cg_prob()
The destructor deletes everything.
BCP_user_pack * packer
A class that holds the methods about how to pack things.
Definition BCP_cg.hpp:53
BCP_problem_core * core
The description of the core of the problem.
Definition BCP_cg.hpp:67
double ub() const
Return the current upper bound (BCP_DBL_MAX if there's no upper bound found yet.)
Definition BCP_cg.hpp:118
bool has_ub() const
Return true/false indicating whether any upper bound has been found.
Definition BCP_cg.hpp:115
BCP_vec< double > x
The primal values corresponding to the variables above.
Definition BCP_cg.hpp:85
BCP_message_environment * msg_env
The message passing environment.
Definition BCP_cg.hpp:58
void ub(const double bd)
Set the upper bound equal to the argument.
Definition BCP_cg.hpp:124
virtual BCP_buffer & get_message_buffer()
Definition BCP_cg.hpp:135
int node_index
The index of search tree node where the solution was generated.
Definition BCP_cg.hpp:95
The BCP_cg_user class is the base class from which the user can derive a problem specific class to be...
Abstract base class that defines members common to all types of cuts.
Definition BCP_cut.hpp:29
This is an abstract base class that describes the message passing environment.
This is the class serves as a holder for a set of parameters.
This class describes the core of the MIP problem, the variables/cuts in it as well as the matrix corr...
Abstract base class that defines members common to all types of variables.
Definition BCP_var.hpp:28
The class BCP_vec serves the same purpose as the vector class in the standard template library.