Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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
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
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
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
00251