qpOASES  3.2.1
An Implementation of the Online Active Set Strategy
SQProblem.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of qpOASES.
3  *
4  * qpOASES -- An Implementation of the Online Active Set Strategy.
5  * Copyright (C) 2007-2017 by Hans Joachim Ferreau, Andreas Potschka,
6  * Christian Kirches et al. All rights reserved.
7  *
8  * qpOASES is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * qpOASES is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  * See the GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with qpOASES; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  */
23 
24 
38 #ifndef QPOASES_SQPROBLEM_HPP
39 #define QPOASES_SQPROBLEM_HPP
40 
41 
42 #include <qpOASES/QProblem.hpp>
43 
44 
46 
47 
59 class SQProblem : public QProblem
60 {
61  /* allow SolutionAnalysis class to access private members */
62  friend class SolutionAnalysis;
63 
64  /*
65  * PUBLIC MEMBER FUNCTIONS
66  */
67  public:
69  SQProblem( );
70 
76  SQProblem( int_t _nV,
77  int_t _nC,
78  HessianType _hessianType = HST_UNKNOWN,
79  BooleanType allocDenseMats = BT_TRUE
80  );
81 
83  SQProblem( const SQProblem& rhs
84  );
85 
87  virtual ~SQProblem( );
88 
90  virtual SQProblem& operator=( const SQProblem& rhs
91  );
92 
93 
110  const real_t* const g_new,
111  Matrix *A_new,
113  const real_t* const lb_new,
115  const real_t* const ub_new,
117  const real_t* const lbA_new,
119  const real_t* const ubA_new,
121  int_t& nWSR,
123  real_t* const cputime = 0,
125  const Bounds* const guessedBounds = 0,
127  const Constraints* const guessedConstraints = 0
129  );
130 
145  returnValue hotstart( const real_t* const H_new,
147  const real_t* const g_new,
148  const real_t* const A_new,
150  const real_t* const lb_new,
152  const real_t* const ub_new,
154  const real_t* const lbA_new,
156  const real_t* const ubA_new,
158  int_t& nWSR,
160  real_t* const cputime = 0,
162  const Bounds* const guessedBounds = 0,
164  const Constraints* const guessedConstraints = 0
166  );
167 
184  returnValue hotstart( const char* const H_file,
186  const char* const g_file,
187  const char* const A_file,
189  const char* const lb_file,
191  const char* const ub_file,
193  const char* const lbA_file,
195  const char* const ubA_file,
197  int_t& nWSR,
199  real_t* const cputime = 0,
201  const Bounds* const guessedBounds = 0,
203  const Constraints* const guessedConstraints = 0
205  );
206 
225  returnValue hotstart( const real_t* const g_new,
226  const real_t* const lb_new,
228  const real_t* const ub_new,
230  const real_t* const lbA_new,
232  const real_t* const ubA_new,
234  int_t& nWSR,
236  real_t* const cputime = 0,
238  const Bounds* const guessedBounds = 0,
240  const Constraints* const guessedConstraints = 0
242  );
243 
264  returnValue hotstart( const char* const g_file,
265  const char* const lb_file,
267  const char* const ub_file,
269  const char* const lbA_file,
271  const char* const ubA_file,
273  int_t& nWSR,
275  real_t* const cputime = 0,
277  const Bounds* const guessedBounds = 0,
279  const Constraints* const guessedConstraints = 0
281  );
282 
283 
284  #ifdef __MATLAB__
285 
288  returnValue resetMatrixPointers( );
289  #endif
290 
291 
292  /*
293  * PROTECTED MEMBER FUNCTIONS
294  */
295  protected:
296 
307  Matrix *A_new,
309  const real_t *lb_new,
311  const real_t *ub_new,
313  const real_t *lbA_new,
315  const real_t *ubA_new
317  );
318 
327  virtual returnValue setupNewAuxiliaryQP( const real_t* const H_new,
329  const real_t* const A_new,
331  const real_t *lb_new,
333  const real_t *ub_new,
335  const real_t *lbA_new,
337  const real_t *ubA_new
339  );
340 
341 
342  /*
343  * PROTECTED MEMBER VARIABLES
344  */
345  protected:
346 
347 };
348 
349 
351 
352 #include <qpOASES/SQProblem.ipp>
353 
354 #endif /* QPOASES_SQPROBLEM_HPP */
355 
356 
357 /*
358  * end of file
359  */
#define BEGIN_NAMESPACE_QPOASES
Definition: Types.hpp:107
#define END_NAMESPACE_QPOASES
Definition: Types.hpp:110
Manages working sets of constraints.
Definition: Constraints.hpp:56
virtual ~SQProblem()
Definition: SQProblem.cpp:76
returnValue hotstart(SymmetricMatrix *H_new, const real_t *const g_new, Matrix *A_new, const real_t *const lb_new, const real_t *const ub_new, const real_t *const lbA_new, const real_t *const ubA_new, int_t &nWSR, real_t *const cputime=0, const Bounds *const guessedBounds=0, const Constraints *const guessedConstraints=0)
Definition: SQProblem.cpp:99
int int_t
Definition: Types.hpp:180
Implements the online active set strategy for QPs with varying matrices.
Definition: SQProblem.hpp:59
HessianType
Definition: Types.hpp:248
SQProblem()
Definition: SQProblem.cpp:51
virtual SQProblem & operator=(const SQProblem &rhs)
Definition: SQProblem.cpp:84
Definition: Types.hpp:206
Provides additional tools for analysing QP solutions.
Definition: SolutionAnalysis.hpp:57
returnValue
Defines all symbols for global return values.
Definition: MessageHandling.hpp:64
Abstract base class for interfacing tailored matrix-vector operations.
Definition: Matrices.hpp:59
Definition: Types.hpp:256
virtual returnValue setupNewAuxiliaryQP(SymmetricMatrix *H_new, Matrix *A_new, const real_t *lb_new, const real_t *ub_new, const real_t *lbA_new, const real_t *ubA_new)
Definition: SQProblem.cpp:335
Manages working sets of bounds (i.e. box constraints).
Definition: Bounds.hpp:56
Implements the online active set strategy for QPs with general constraints.
Definition: QProblem.hpp:61
BooleanType
Definition: Types.hpp:203
BEGIN_NAMESPACE_QPOASES typedef double real_t
Definition: Types.hpp:171
Abstract base class for interfacing matrix-vector operations tailored to symmetric matrices...
Definition: Matrices.hpp:292