rmp.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 RMP_H
00008 #define RMP_H
00009 
00010 #include "standard.h"
00011 #include "linrelax.h"
00012 #include "node.h"
00013 #include "opt.h"
00014 
00022 class RMPManager {
00023         private:
00024                 Pointer<LinearRelax> linear_relax;
00025                 Pointer<MinlpNode> node;
00026                 Pointer<Param> param;
00027 
00028                 double y_penalty_delta, y_penalty_scale;
00029 
00030                 int coresize;
00031                 int blocknr;
00032                 int linrelaxdim;
00033 
00034                 Pointer<MIPSolver> RMP;
00035 
00036                 Pointer<SparseVector<double> > compute_col(const ExtremePoint& w, int k);
00037                 void init();
00038 
00039         public:
00040                 RMPManager(Pointer<LinearRelax> linear_relax_, Pointer<MinlpNode> node_, Pointer<Param> param_);
00041 
00042                 int dim() const { return RMP->nr_col(); }
00043 
00044                 int colindex(const ExtremePoint& w);
00045 
00046                 void add_column(ExtremePoint& w, int k);
00047 
00048                 void update_column(const ExtremePoint& w, int k);
00049 
00050                 void update_s(const dvector& x, bool set_start=false);
00051                 void restrict_y(const dvector& y);
00052 
00053                 MIPSolver::SolutionStatus solve() { return RMP->solve(); };
00054                 MIPSolver::SolutionStatus solve(const UserVector<double>& start) { return RMP->solve(start); }
00055 
00056                 void get_yz(dvector& yz) { RMP->get_primal(yz); }
00057                 void get_dual(UserVector<double>& mu) { RMP->get_dual(mu); };
00058                 double get_optval() { return RMP->get_optval(); };
00059 
00060                 void get_x(UserVector<double>& x, const dvector &yz);
00061 
00062                 int prune();
00063 };
00064 
00065 #endif

Generated on Wed Oct 22 03:12:39 2008 for LaGO by  doxygen 1.4.7