dense_qp_solver.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of ACADO Toolkit.
3  *
4  * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
5  * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
6  * Milan Vukov, Rien Quirynen, KU Leuven.
7  * Developed within the Optimization in Engineering Center (OPTEC)
8  * under supervision of Moritz Diehl. All rights reserved.
9  *
10  * ACADO Toolkit is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 3 of the License, or (at your option) any later version.
14  *
15  * ACADO Toolkit is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with ACADO Toolkit; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 
26 
34 #ifndef ACADO_TOOLKIT_DENSE_QP_SOLVER_HPP
35 #define ACADO_TOOLKIT_DENSE_QP_SOLVER_HPP
36 
37 
41 
42 
44 
45 
58 {
59  //
60  // PUBLIC MEMBER FUNCTIONS:
61  //
62  public:
63 
65  DenseQPsolver( );
66 
67  DenseQPsolver( UserInteraction* _userInteraction
68  );
69 
72 
74  ~DenseQPsolver( );
75 
77  DenseQPsolver& operator=( const DenseQPsolver& rhs );
78 
79  virtual DenseCPsolver* clone( ) const = 0;
80 
81  virtual DenseQPsolver* cloneDenseQPsolver( ) const = 0;
82 
83 
84 
89  virtual returnValue init( const DenseCP *cp );
90 
91 
92 
94  virtual returnValue init( uint nV,
95  uint nC
96  );
97 
98 
99 
101  virtual returnValue solve( DenseCP *cp_ );
102 
103 
105  virtual returnValue solve( double* H,
106  double* A,
107  double* g,
108  double* lb,
109  double* ub,
110  double* lbA,
111  double* ubA,
112  uint maxIter
113  ) = 0;
114 
116  virtual returnValue solve( DMatrix *H,
117  DMatrix *A,
118  DVector *g,
119  DVector *lb,
120  DVector *ub,
121  DVector *lbA,
122  DVector *ubA,
123  uint maxIter
124  ) = 0;
125 
126 
128  virtual returnValue step( double* H,
129  double* A,
130  double* g,
131  double* lb,
132  double* ub,
133  double* lbA,
134  double* ubA
135  ) = 0;
136 
137 
139  virtual returnValue step( DMatrix *H,
140  DMatrix *A,
141  DVector *g,
142  DVector *lb,
143  DVector *ub,
144  DVector *lbA,
145  DVector *ubA
146  ) = 0;
147 
148 
151  inline QPStatus getStatus( ) const;
152 
155  inline BooleanType isSolved( ) const;
156 
159  inline BooleanType isInfeasible( ) const;
160 
163  inline BooleanType isUnbounded( ) const;
164 
165 
170  ) const = 0;
171 
175  virtual returnValue getDualSolution( DVector& yOpt
176  ) const = 0;
177 
178 
183  virtual double getObjVal( ) const = 0;
184 
185 
188  virtual uint getNumberOfIterations( ) const;
189 
190  virtual uint getNumberOfVariables( ) const = 0;
191  virtual uint getNumberOfConstraints( ) const = 0;
192 
193 
199  virtual returnValue getVarianceCovariance( DMatrix &var ) = 0;
200 
201 
207  virtual returnValue getVarianceCovariance( DMatrix &H, DMatrix &var ) = 0;
208 
209 
210 
211  //
212  // PROTECTED MEMBER FUNCTIONS:
213  //
214  protected:
215 
216  virtual returnValue setupLogging( );
217 
218 
222  virtual returnValue setupQPobject( uint nV,
223  uint nC
224  ) = 0;
225 
227  ) const;
228 
229 
230  //
231  // DATA MEMBERS:
232  //
233  protected:
234 
237 };
238 
239 
241 
242 
243 
244 #include <acado/conic_solver/dense_qp_solver.ipp>
245 
246 
247 #endif // ACADO_TOOLKIT_QP_SOLVER_HPP
248 
249 /*
250  * end of file
251  */
virtual returnValue setupLogging()
DenseQPsolver & operator=(const DenseQPsolver &rhs)
virtual returnValue step(double *H, double *A, double *g, double *lb, double *ub, double *lbA, double *ubA)=0
virtual DenseCPsolver * clone() const =0
Allows to pass back messages to the calling function.
BooleanType isInfeasible() const
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
BooleanType isUnbounded() const
virtual returnValue setupQPobject(uint nV, uint nC)=0
#define CLOSE_NAMESPACE_ACADO
virtual returnValue makeBoundsConsistent(DenseCP *cp) const
Abstract base class for algorithms solving quadratic programs.
BooleanType isSolved() const
virtual double getObjVal() const =0
Data class for storing generic conic programs.
Definition: dense_cp.hpp:55
virtual returnValue getDualSolution(DVector &yOpt) const =0
virtual returnValue init(const DenseCP *cp)
QPStatus getStatus() const
Encapsulates all user interaction for setting options, logging data and plotting results.
void rhs(const real_t *x, real_t *f)
virtual returnValue getPrimalSolution(DVector &xOpt) const =0
virtual uint getNumberOfVariables() const =0
QPStatus
virtual DenseQPsolver * cloneDenseQPsolver() const =0
virtual uint getNumberOfIterations() const
virtual returnValue solve(DenseCP *cp_)
virtual uint getNumberOfConstraints() const =0
#define BEGIN_NAMESPACE_ACADO
virtual returnValue getVarianceCovariance(DMatrix &var)=0
Base class for algorithms solving conic programs.


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:34:32