relaxopt.h

Go to the documentation of this file.
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 RELAXOPT_H
00008 #define RELAXOPT_H
00009 
00010 #include "standard.h"
00011 #include "opt.h"
00012 #include "func.h"
00013 #include "minlpopt.h"
00014 #include "MINLPData.h"
00015 
00016 //-------------------------------------------------------------------------
00017 
00018 class PartitionHeu;
00019 class MinlpNode;
00020 class IntervalGradientCutInfo;
00021 
00024 class RelaxationSolver : public Solver {
00025         friend class PartitionHeu;
00026         friend class MinlpNode;
00027         private:
00028                 Pointer<LocOpt> LocOpt_NLP;
00029 
00030         protected:
00033                 Pointer<Param> param;
00034 
00037                 Pointer<MinlpProblem> orig_prob; // (P)
00038 
00041                 Pointer<MinlpProblem> split_prob; // (S)
00042 
00045                 Pointer<MinlpProblem> convex_prob; // (C)
00046 
00049                 Pointer<LinearRelax> linear_relax; // (R)
00050 
00053                 Pointer<Reformulation> reform;
00054                 
00055                 Pointer<MINLPData> minlpdata;
00056 
00057                 Pointer<LevelCutHandler> levelcuts;
00058 
00059                 bool is_gams_prob;
00060 
00061                 int last_impr_iter;
00062                 int point_conversion_warnings;
00063 
00064                 void make_sub_prob(Pointer<MinlpProblem>& out, Pointer<MinlpProblem> in, Pointer<MinlpNode> node);
00065 
00066                 pair<int, bool> locopt_NLP(dvector& start);
00067                 pair<int, bool> locopt_NLP(dvector& start, dvector& sol_point);
00068 
00069                 virtual bool add_sol_candidate(const dvector& x);
00070 
00071                 void clean_sub_problems() { }
00072 
00073                 double sol_cand_closeval_tol;
00074                 Pointer<dvector> sol_cand_diam;
00075 
00076         public:
00077                 set<SolCandidate> sol_cand;
00078 
00079                 double lower_bound;
00080 
00081                 RelaxationSolver(Pointer<MinlpProblem> orig_prob_, bool is_gams_prob=false,
00082                         double closeval_tol_=0., Pointer<dvector> diam_=NULL, Pointer<Param> param_=NULL,
00083                         Pointer<ostream> out_solver_p_=out_out_p, Pointer<ostream> out_solver_log_p_=out_log_p);
00084 
00085                 void set_split_prob(Pointer<MinlpProblem> split_prob_) {
00086                         split_prob=split_prob_;
00087                 }
00088 
00089                 virtual void set_reform(Pointer<Reformulation> reform_) {
00090                         reform=reform_;
00091                 }
00092 
00093                 void set_convex_prob(Pointer<MinlpProblem> convex_prob_) {
00094                         convex_prob=convex_prob_;
00095                 }
00096 
00097                 void set_linear_relax(Pointer<LinearRelax> linear_relax_) {
00098                         linear_relax=linear_relax_;
00099                 }
00100 
00101                 void set_upper_bound(double upper_bound) {
00102                         opt_val_=upper_bound;
00103                 }
00104 
00105                 void set_levelcut_handler(Pointer<LevelCutHandler> levelcuts_) {
00106                         levelcuts=levelcuts_;
00107                 }
00108                 
00109                 void set_MINLPData(Pointer<MINLPData> minlpdata_) {
00110                         minlpdata=minlpdata_;
00111                 }
00112 
00113 };
00114 
00115 #endif

Generated on Mon Oct 20 03:12:06 2008 for LaGO by  doxygen 1.4.7