dense_qp_solver.hpp
Go to the documentation of this file.
00001 /*
00002  *    This file is part of ACADO Toolkit.
00003  *
00004  *    ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
00005  *    Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
00006  *    Milan Vukov, Rien Quirynen, KU Leuven.
00007  *    Developed within the Optimization in Engineering Center (OPTEC)
00008  *    under supervision of Moritz Diehl. All rights reserved.
00009  *
00010  *    ACADO Toolkit is free software; you can redistribute it and/or
00011  *    modify it under the terms of the GNU Lesser General Public
00012  *    License as published by the Free Software Foundation; either
00013  *    version 3 of the License, or (at your option) any later version.
00014  *
00015  *    ACADO Toolkit is distributed in the hope that it will be useful,
00016  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  *    Lesser General Public License for more details.
00019  *
00020  *    You should have received a copy of the GNU Lesser General Public
00021  *    License along with ACADO Toolkit; if not, write to the Free Software
00022  *    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00023  *
00024  */
00025 
00026 
00034 #ifndef ACADO_TOOLKIT_DENSE_QP_SOLVER_HPP
00035 #define ACADO_TOOLKIT_DENSE_QP_SOLVER_HPP
00036 
00037 
00038 #include <acado/nlp_solver/nlp_solver.hpp>
00039 #include <acado/matrix_vector/matrix_vector.hpp>
00040 #include <acado/conic_solver/dense_cp_solver.hpp>
00041 
00042 
00043 BEGIN_NAMESPACE_ACADO
00044 
00045 
00057 class DenseQPsolver : public DenseCPsolver
00058 {
00059     //
00060     // PUBLIC MEMBER FUNCTIONS:
00061     //
00062     public:
00063 
00065         DenseQPsolver( );
00066 
00067         DenseQPsolver(  UserInteraction* _userInteraction
00068                                                 );
00069 
00071         DenseQPsolver( const DenseQPsolver& rhs );
00072 
00074         ~DenseQPsolver( );
00075 
00077         DenseQPsolver& operator=( const DenseQPsolver& rhs );
00078 
00079         virtual DenseCPsolver* clone( ) const = 0;
00080 
00081         virtual DenseQPsolver* cloneDenseQPsolver( ) const = 0;
00082 
00083 
00084 
00089         virtual returnValue init( const DenseCP *cp );
00090 
00091 
00092 
00094         virtual returnValue init(       uint nV,        
00095                                                                         uint nC         
00096                                                                         );
00097 
00098 
00099 
00101         virtual returnValue solve( DenseCP *cp_  );
00102 
00103 
00105         virtual returnValue solve(      double* H,      
00106                                                                         double* A,      
00107                                                                         double* g,      
00108                                                                         double* lb,     
00109                                                                         double* ub,     
00110                                                                         double* lbA,    
00111                                                                         double* ubA,    
00112                                                                         uint maxIter            
00113                                                                         ) = 0;
00114 
00116         virtual returnValue solve(  DMatrix *H,    
00117                                     DMatrix *A,    
00118                                     DVector *g,    
00119                                     DVector *lb,   
00120                                     DVector *ub,   
00121                                     DVector *lbA,  
00122                                     DVector *ubA,  
00123                                     uint maxIter        
00124                                                                         ) = 0;
00125 
00126 
00128         virtual returnValue step(       double* H,              
00129                                                                         double* A,              
00130                                                                         double* g,              
00131                                                                         double* lb,             
00132                                                                         double* ub,             
00133                                                                         double* lbA,    
00134                                                                         double* ubA             
00135                                                                         ) = 0;
00136 
00137 
00139         virtual returnValue step(       DMatrix *H,    
00140                                     DMatrix *A,    
00141                                     DVector *g,    
00142                                     DVector *lb,   
00143                                     DVector *ub,   
00144                                     DVector *lbA,  
00145                                     DVector *ubA  
00146                                                                         ) = 0;
00147 
00148 
00151                 inline QPStatus getStatus( ) const;
00152 
00155                 inline BooleanType isSolved( ) const;
00156 
00159                 inline BooleanType isInfeasible( ) const;
00160 
00163                 inline BooleanType isUnbounded( ) const;
00164 
00165 
00169                 virtual returnValue getPrimalSolution(  DVector& xOpt   
00170                                                                                                 ) const = 0;
00171 
00175                 virtual returnValue getDualSolution(    DVector& yOpt   
00176                                                                                                 ) const = 0;
00177 
00178 
00183                 virtual double getObjVal( ) const = 0;
00184 
00185 
00188                 virtual uint getNumberOfIterations( ) const;
00189 
00190                 virtual uint getNumberOfVariables( ) const = 0;
00191                 virtual uint getNumberOfConstraints( ) const = 0;
00192 
00193 
00199         virtual returnValue getVarianceCovariance( DMatrix &var ) = 0;
00200 
00201 
00207         virtual returnValue getVarianceCovariance( DMatrix &H, DMatrix &var ) = 0;
00208 
00209 
00210 
00211     //
00212     // PROTECTED MEMBER FUNCTIONS:
00213     //
00214     protected:
00215 
00216                 virtual returnValue setupLogging( );
00217           
00218           
00222         virtual returnValue setupQPobject(      uint nV,        
00223                                                                                         uint nC         
00224                                                                                         ) = 0;
00225 
00226                 virtual returnValue makeBoundsConsistent(       DenseCP *cp
00227                                                                                                         ) const;
00228 
00229 
00230     //
00231     // DATA MEMBERS:
00232     //
00233     protected:
00234 
00235         QPStatus qpStatus;
00236         int numberOfSteps;
00237 };
00238 
00239 
00240 CLOSE_NAMESPACE_ACADO
00241 
00242 
00243 
00244 #include <acado/conic_solver/dense_qp_solver.ipp>
00245 
00246 
00247 #endif  // ACADO_TOOLKIT_QP_SOLVER_HPP
00248 
00249 /*
00250  *      end of file
00251  */


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:36:57