/home/coin/SVN-release/Bcp-1.2.1/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_obj_change.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 warmstart;
00034 };
00035 
00036 //#############################################################################
00037 
00042 class BCP_lp_parent {
00043 private:
00047     BCP_lp_parent(const BCP_lp_parent&);
00049     BCP_lp_parent& operator=(const BCP_lp_parent&);
00052 public:
00056     BCP_problem_core_change core_as_change;
00059     BCP_obj_set_change      var_set;
00062     BCP_obj_set_change      cut_set;
00064     BCP_warmstart* warmstart;
00066     int index;
00069 public:
00073     BCP_lp_parent() : warmstart(0) {}
00075     ~BCP_lp_parent();
00078 public:
00082     void clean();
00084 };
00085 
00086 //#############################################################################
00087 
00092 class BCP_lp_node {
00093 private:
00097     BCP_lp_node(const BCP_lp_node&);
00099     BCP_lp_node& operator=(const BCP_lp_node&);
00102 public:
00104     // *FIXME* divide data members into subgroups 
00107     BCP_node_storage_in_tm tm_storage;
00111     int cg;
00113     int cp;
00115     int vg;
00117     int vp;
00120     int level;
00122     int index;
00124     int iteration_count;
00126     BCP_diving_status dive;
00128     BCP_column_generation colgen;
00130     double quality;
00132     double true_lower_bound;
00134     BCP_var_set vars;
00136     BCP_cut_set cuts;
00138     BCP_warmstart* warmstart;
00139     // this is tricky. this vector stores for each cut the lower bound on the
00140     // lp formulation at the time when the cut was added *in this node* OR if
00141     // there were columns added afterwards (stiil in the same node) then the
00142     // lower bound on the lp when columns were added the last time.
00144     BCP_vec<double> lb_at_cutgen;
00147     BCP_user_data* user_data;
00150 public:
00154     BCP_lp_node() :
00155         tm_storage(),
00156         cg(-1), cp(-1), vg(-1), vp(-1),
00157         level(0), index(0), iteration_count(0),
00158         dive(BCP_DoNotDive), colgen(BCP_DoNotGenerateColumns_Fathom),
00159         quality(-BCP_DBL_MAX), true_lower_bound(-BCP_DBL_MAX), vars(), cuts(),
00160         warmstart(0),
00161         user_data(0) {}
00163     ~BCP_lp_node();
00169     inline size_t varnum() const { return vars.size(); }
00171     inline size_t cutnum() const { return cuts.size(); }
00177     void clean();
00179 };
00180 
00181 //#############################################################################
00182 
00183 #endif

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