/home/coin/Bcp-1.0.0/Bcp/src/include/BCP_cg.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_CG_H
00004 #define _BCP_CG_H
00005 
00006 // This file is fully docified.
00007 
00008 #include <cfloat>
00009 
00010 #include "BCP_message_tag.hpp"
00011 #include "BCP_vector.hpp"
00012 #include "BCP_buffer.hpp"
00013 #include "BCP_cg_param.hpp"
00014 #include "BCP_parameters.hpp"
00015 #include "BCP_process.hpp"
00016 
00017 class BCP_cg_user;
00018 class BCP_message_environment;
00019 class BCP_proc_id;
00020 class BCP_problem_core;
00021 class BCP_var;
00022 class BCP_cut;
00023 
00031 class BCP_cg_prob : public BCP_process {
00032 private:
00036    BCP_cg_prob(const BCP_cg_prob&);
00038    BCP_cg_prob& operator=(const BCP_cg_prob&);
00041 public:
00044 
00045    // User provided members ---------------------------------------------------
00049    BCP_cg_user* user;
00050 
00054    BCP_message_environment* msg_env;
00055 
00057    BCP_buffer  msg_buf;
00058 
00060    BCP_parameter_set<BCP_cg_par> par;
00061 
00063    BCP_problem_core* core;
00064    
00066     //   BCP_proc_id* tree_manager;
00067 
00069    double upper_bound;
00070 
00071    // the lp solution, its sender and at which node in which iteration the lp
00072    // solution was generated.
00079    BCP_vec<BCP_var*> vars;
00081    BCP_vec<double>   x;
00083    BCP_proc_id*      sender;
00084 
00085 
00087    int phase;
00089    int node_level;
00091    int node_index;
00094    int node_iteration;
00095 
00098 public:
00103    BCP_cg_prob(BCP_proc_id* my_id, BCP_proc_id* parent);
00105    virtual ~BCP_cg_prob();
00111    inline bool has_ub() const { return upper_bound < DBL_MAX; }
00114    inline double ub() const   { return upper_bound; }
00120    inline void ub(const double bd) { upper_bound = bd; }
00121 
00124    bool probe_messages();
00129    BCP_var* unpack_var();
00130    //--------------------------------------------------------------------------
00131    virtual BCP_buffer& get_message_buffer() { return msg_buf; }
00132    virtual void process_message();
00133 };
00134 
00135 // This function is used only internally. 
00136 bool
00137 BCP_cg_process_message(BCP_cg_prob& p, BCP_buffer& buf);
00138 
00139 #endif

Generated on Wed Aug 22 03:00:53 2007 for coin-Bcp by  doxygen 1.4.7