00001 // Copyright (C) 2006 Ivo Nowak and Stefan Vigerske 00002 // All Rights Reserved. 00003 // This code is published under the Common Public License. 00004 // 00005 // Author: Stefan Vigerske 00006 00007 #ifndef COLUMN_H 00008 #define COLUMN_H 00009 00010 #include "standard.h" 00011 #include "problem.h" 00012 #include "func.h" 00013 #include "opt.h" 00014 //#include "node.h" 00015 #include "minlpopt.h" 00016 #include "bcp.h" 00017 #include "rmp.h" 00018 00019 class MinlpNode; 00020 00021 00039 class ColumnGenerator { 00040 private: 00043 Pointer<MinlpNode> node; 00044 00045 MinlpBCP& bcp; 00046 00047 Pointer<Param> param; 00048 00050 Pointer<RMPManager> RMP; 00051 00052 int max_major_iter; 00053 int max_minor_iter; 00054 int max_initRMP_iter; 00055 00056 double rc_tol; 00057 00058 void add_cut(Pointer<SepQcFunc> cut, int k); 00059 00060 int get_search_dir2(dvector& a, double& c, int k); 00061 00062 public: 00063 ColumnGenerator(Pointer<MinlpNode> node_, MinlpBCP& bcp_); 00064 00068 int init_RMP(); 00069 int solve_RMP(); 00070 00071 void clear_RMP() { RMP=NULL; } 00072 00073 void solve_lag_problem(MinlpBCP::LagSolveStatus& status, int k, Pointer<SepQcFunc> temp_cut=NULL); 00074 00076 void update_ExtremePoints(); 00077 00082 void mult_W(UserVector<double>& x, const dvector &z, int k); 00083 00085 int generate_RMP(); 00086 00090 double subprobl_key(double rc, int k); 00091 00092 void print(ostream& out) const; 00093 }; 00094 00095 #endif