/home/coin/SVN-release/Bcp-1.2.1/Bcp/src/include/BCP_vg.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2000, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 #ifndef _BCP_VG_H
00004 #define _BCP_VG_H
00005 
00006 // This file is fully docified.
00007 
00008 #include <cfloat>
00009 
00010 #include "BCP_math.hpp"
00011 #include "BCP_message_tag.hpp"
00012 #include "BCP_vector.hpp"
00013 #include "BCP_buffer.hpp"
00014 #include "BCP_vg_param.hpp"
00015 #include "BCP_parameters.hpp"
00016 #include "BCP_process.hpp"
00017 
00018 class BCP_vg_user;
00019 class BCP_user_pack;
00020 class BCP_message_environment;
00021 class BCP_problem_core;
00022 class BCP_var;
00023 class BCP_cut;
00024 
00032 class BCP_vg_prob : public BCP_process {
00033 private:
00037    BCP_vg_prob(const BCP_vg_prob&);
00039    BCP_vg_prob& operator=(const BCP_vg_prob&);
00042 public:
00045    // User provided members--------------------------------------------------
00049    BCP_vg_user* user;
00050 
00052    BCP_user_pack* packer;
00053 
00057    BCP_message_environment* msg_env;
00058 
00060    BCP_buffer  msg_buf;
00061 
00063    BCP_parameter_set<BCP_vg_par> par;
00064 
00066    BCP_problem_core* core;
00067    
00069     //   int tree_manager;
00070 
00072    double upper_bound;
00073 
00074    // the cuts and corresponding dual values in the LP formulation that were
00075    // sent over to generate variables from. Also, the sender and which node
00076    // in which iteration do these cuts/duals belong to.
00082    BCP_vec<BCP_cut*> cuts;
00084    BCP_vec<double>   pi;
00086    int      sender;
00087 
00089    int phase;
00091    int node_level;
00093    int node_index;
00096    int node_iteration;
00097 
00100 public:
00105    BCP_vg_prob(int my_id, int parent);
00107    virtual ~BCP_vg_prob();
00113    inline bool has_ub() const { return upper_bound < BCP_DBL_MAX / 10; }
00116    inline double ub() const   { return upper_bound; }
00122    inline void ub(const double bd) { upper_bound = bd; }
00123 
00126    bool probe_messages();
00131    BCP_cut* unpack_cut();
00132    //--------------------------------------------------------------------------
00133    virtual BCP_buffer& get_message_buffer() { return msg_buf; }
00134    virtual void process_message();
00135 };
00136 
00137 // This function is used only internally.
00138 bool
00139 BCP_vg_process_message(BCP_vg_prob& p, BCP_buffer& buf);
00140 
00141 #endif

Generated on Thu Jan 15 03:00:59 2009 for coin-Bcp by  doxygen 1.4.7