/home/coin/Bcp-1.0.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_enum_branch.hpp"
00007 #include "BCP_problem_core.hpp"
00008 #include "BCP_var.hpp"
00009 #include "BCP_cut.hpp"
00010 #include "BCP_indexed_pricing.hpp"
00011 
00012 //#############################################################################
00013 
00014 class BCP_warmstart;
00015 class BCP_user_data;
00016 
00017 //#############################################################################
00018 
00024 struct BCP_node_storage_in_tm{
00026    BCP_storage_t core_change;
00028    BCP_storage_t var_change;
00030    BCP_storage_t cut_change;
00032    BCP_storage_t indexed_pricing;
00034    BCP_storage_t warmstart;
00035 };
00036 
00037 //#############################################################################
00038 
00043 class BCP_lp_parent{
00044 private:
00048    BCP_lp_parent(const BCP_lp_parent&);
00050    BCP_lp_parent& operator=(const BCP_lp_parent&);
00053 public:
00057    BCP_problem_core_change  core_as_change;
00059    BCP_vec<int>   added_vars_index;
00061    BCP_vec<BCP_obj_change>  added_vars_desc;
00063    BCP_vec<int>   added_cuts_index;
00065    BCP_vec<BCP_obj_change>  added_cuts_desc;
00067    BCP_indexed_pricing_list indexed_pricing;
00069    BCP_warmstart* warmstart;
00072 public:
00076    BCP_lp_parent() :
00077       core_as_change(),
00078       added_vars_index(),
00079       added_vars_desc(),
00080       added_cuts_index(),
00081       added_cuts_desc(),
00082       indexed_pricing(),
00083       warmstart(0)
00084    {}
00086    ~BCP_lp_parent();
00089 public:
00093    void clean();
00095 };
00096 
00097 //#############################################################################
00098 
00103 class BCP_lp_node {
00104 private:
00108    BCP_lp_node(const BCP_lp_node&);
00110    BCP_lp_node& operator=(const BCP_lp_node&);
00113 public:
00115    // *FIXME* divide data members into subgroups 
00118    BCP_node_storage_in_tm tm_storage;
00122    BCP_proc_id* cg;
00124    BCP_proc_id* cp;
00126    BCP_proc_id* vg;
00128    BCP_proc_id* vp;
00131    int level;
00133    int index;
00135    int iteration_count;
00137    BCP_diving_status dive;
00139    BCP_column_generation colgen;
00141    double quality;
00143    double true_lower_bound;
00145    BCP_var_set vars;
00147    BCP_cut_set cuts;
00149    BCP_indexed_pricing_list indexed_pricing;
00151    BCP_warmstart* warmstart;
00152    // this is tricky. this vector stores for each cut the lower bound on the
00153    // lp formulation at the time when the cut was added *in this node* OR if
00154    // there were columns added afterwards (stiil in the same node) then the
00155    // lower bound on the lp when columns were added the last time.
00157    BCP_vec<double> lb_at_cutgen;
00160    BCP_user_data* user_data;
00163 public:
00167    BCP_lp_node() :
00168       tm_storage(),
00169       cg(0), cp(0), vg(0), vp(0),
00170       level(0), index(0), iteration_count(0),
00171       dive(BCP_DoNotDive), colgen(BCP_DoNotGenerateColumns_Fathom),
00172       quality(-DBL_MAX), true_lower_bound(-DBL_MAX), vars(), cuts(),
00173       indexed_pricing(),
00174       warmstart(0),
00175       user_data(0) {}
00177    ~BCP_lp_node();
00183    inline size_t varnum() const { return vars.size(); }
00185    inline size_t cutnum() const { return cuts.size(); }
00191    void clean();
00193 };
00194 
00195 //#############################################################################
00196 
00197 #endif

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