/home/coin/SVN-release/CoinAll-1.1.0/Bcp/src/include/BCP_lp_node.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_LP_NODE_H
00004 #define _BCP_LP_NODE_H
00005 
00006 #include "BCP_math.hpp"
00007 #include "BCP_enum_branch.hpp"
00008 #include "BCP_problem_core.hpp"
00009 #include "BCP_var.hpp"
00010 #include "BCP_cut.hpp"
00011 #include "BCP_indexed_pricing.hpp"
00012 
00013 //#############################################################################
00014 
00015 class BCP_warmstart;
00016 class BCP_user_data;
00017 
00018 //#############################################################################
00019 
00025 struct BCP_node_storage_in_tm{
00027    BCP_storage_t core_change;
00029    BCP_storage_t var_change;
00031    BCP_storage_t cut_change;
00033    BCP_storage_t indexed_pricing;
00035    BCP_storage_t warmstart;
00036 };
00037 
00038 //#############################################################################
00039 
00044 class BCP_lp_parent{
00045 private:
00049    BCP_lp_parent(const BCP_lp_parent&);
00051    BCP_lp_parent& operator=(const BCP_lp_parent&);
00054 public:
00058    BCP_problem_core_change  core_as_change;
00060    BCP_vec<int>   added_vars_index;
00062    BCP_vec<BCP_obj_change>  added_vars_desc;
00064    BCP_vec<int>   added_cuts_index;
00066    BCP_vec<BCP_obj_change>  added_cuts_desc;
00068    BCP_indexed_pricing_list indexed_pricing;
00070    BCP_warmstart* warmstart;
00073 public:
00077    BCP_lp_parent() :
00078       core_as_change(),
00079       added_vars_index(),
00080       added_vars_desc(),
00081       added_cuts_index(),
00082       added_cuts_desc(),
00083       indexed_pricing(),
00084       warmstart(0)
00085    {}
00087    ~BCP_lp_parent();
00090 public:
00094    void clean();
00096 };
00097 
00098 //#############################################################################
00099 
00104 class BCP_lp_node {
00105 private:
00109    BCP_lp_node(const BCP_lp_node&);
00111    BCP_lp_node& operator=(const BCP_lp_node&);
00114 public:
00116    // *FIXME* divide data members into subgroups 
00119    BCP_node_storage_in_tm tm_storage;
00123    BCP_proc_id* cg;
00125    BCP_proc_id* cp;
00127    BCP_proc_id* vg;
00129    BCP_proc_id* vp;
00132    int level;
00134    int index;
00136    int iteration_count;
00138    BCP_diving_status dive;
00140    BCP_column_generation colgen;
00142    double quality;
00144    double true_lower_bound;
00146    BCP_var_set vars;
00148    BCP_cut_set cuts;
00150    BCP_indexed_pricing_list indexed_pricing;
00152    BCP_warmstart* warmstart;
00153    // this is tricky. this vector stores for each cut the lower bound on the
00154    // lp formulation at the time when the cut was added *in this node* OR if
00155    // there were columns added afterwards (stiil in the same node) then the
00156    // lower bound on the lp when columns were added the last time.
00158    BCP_vec<double> lb_at_cutgen;
00161    BCP_user_data* user_data;
00164 public:
00168    BCP_lp_node() :
00169       tm_storage(),
00170       cg(0), cp(0), vg(0), vp(0),
00171       level(0), index(0), iteration_count(0),
00172       dive(BCP_DoNotDive), colgen(BCP_DoNotGenerateColumns_Fathom),
00173       quality(-BCP_DBL_MAX), true_lower_bound(-BCP_DBL_MAX), vars(), cuts(),
00174       indexed_pricing(),
00175       warmstart(0),
00176       user_data(0) {}
00178    ~BCP_lp_node();
00184    inline size_t varnum() const { return vars.size(); }
00186    inline size_t cutnum() const { return cuts.size(); }
00192    void clean();
00194 };
00195 
00196 //#############################################################################
00197 
00198 #endif

Generated on Sun Nov 14 14:06:29 2010 for Coin-All by  doxygen 1.4.7