Bcp 1.4.4
Loading...
Searching...
No Matches
BCP_vg.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_VG_H
4#define _BCP_VG_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_vg_param.hpp"
15#include "BCP_parameters.hpp"
16#include "BCP_process.hpp"
17
18class BCP_vg_user;
19class BCP_user_pack;
22class BCP_var;
23class BCP_cut;
24
32class BCP_vg_prob : public BCP_process {
33private:
39 BCP_vg_prob& operator=(const BCP_vg_prob&);
42public:
45 // User provided members--------------------------------------------------
50
53
58
61
64
67
69 // int tree_manager;
70
73
74 // the cuts and corresponding dual values in the LP formulation that were
75 // sent over to generate variables from. Also, the sender and which node
76 // in which iteration do these cuts/duals belong to.
86 int sender;
87
89 int phase;
97
100public:
105 BCP_vg_prob(int my_id, int parent);
107 virtual ~BCP_vg_prob();
113 inline bool has_ub() const { return upper_bound < BCP_DBL_MAX / 10; }
116 inline double ub() const { return upper_bound; }
122 inline void ub(const double bd) { upper_bound = bd; }
123
132 //--------------------------------------------------------------------------
133 virtual BCP_buffer& get_message_buffer() { return msg_buf; }
134 virtual void process_message();
135};
136
137// This function is used only internally.
138bool
140
141#endif
#define BCP_DBL_MAX
Definition BCP_math.hpp:6
bool BCP_vg_process_message(BCP_vg_prob &p, BCP_buffer &buf)
This class describes the message buffer used for all processes of BCP.
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.
This class is the central class of the Variable Generator process.
Definition BCP_vg.hpp:32
int node_level
The level of search tree node where the solution was generated.
Definition BCP_vg.hpp:91
bool probe_messages()
Test if there is a message in the message queue waiting to be processed.
void ub(const double bd)
Set the upper bound equal to the argument.
Definition BCP_vg.hpp:122
BCP_vec< double > pi
The dual values corresponding to the cuts above.
Definition BCP_vg.hpp:84
BCP_vg_user * user
The user object holding the user's data.
Definition BCP_vg.hpp:49
BCP_user_pack * packer
A class that holds the methods about how to pack things.
Definition BCP_vg.hpp:52
int node_iteration
The iteration within the search tree node where the solution was generated.
Definition BCP_vg.hpp:96
double upper_bound
The proc id of the Tree Manager.
Definition BCP_vg.hpp:72
double ub() const
Return the current upper bound (BCP_DBL_MAX/10 if there's no upper bound found yet....
Definition BCP_vg.hpp:116
int phase
The phase the algorithm is in.
Definition BCP_vg.hpp:89
virtual ~BCP_vg_prob()
The destructor deletes everything.
bool has_ub() const
Return true/false indicating whether any upper bound has been found.
Definition BCP_vg.hpp:113
virtual BCP_buffer & get_message_buffer()
Definition BCP_vg.hpp:133
BCP_vg_prob(int my_id, int parent)
The default constructor.
BCP_parameter_set< BCP_vg_par > par
The parameters controlling the Variable Generator process.
Definition BCP_vg.hpp:63
BCP_message_environment * msg_env
The message passing environment.
Definition BCP_vg.hpp:57
BCP_buffer msg_buf
The message buffer of the Variable Generator process.
Definition BCP_vg.hpp:60
int sender
The process id of the LP process that sent the solution.
Definition BCP_vg.hpp:86
BCP_vec< BCP_cut * > cuts
Variables are to be generated for the LP solution given by these cuts and their values (next member).
Definition BCP_vg.hpp:82
BCP_problem_core * core
The description of the core of the problem.
Definition BCP_vg.hpp:66
BCP_cut * unpack_cut()
Unpack a cut.
int node_index
The index of search tree node where the solution was generated.
Definition BCP_vg.hpp:93
virtual void process_message()
The BCP_vg_user class is the base class from which the user can derive a problem specific class to be...