qpOASES_wrapper.h
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-2015 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 
36 #ifndef QPOASES_WRAPPER_H
37 #define QPOASES_WRAPPER_H
38 
39 
40 #ifndef QPOASES_TYPES_HPP
41 
43  #ifdef __USE_SINGLE_PRECISION__
44  typedef float real_t;
45  #else
46  typedef double real_t;
47  #endif /* __USE_SINGLE_PRECISION__ */
48 
50  #ifdef __USE_LONG_INTEGERS__
51  typedef long int_t;
52  typedef unsigned long uint_t;
53  #else
54  typedef int int_t;
55  typedef unsigned int uint_t;
56  #endif /* __USE_LONG_INTEGERS__ */
57 
58  /* dummy definitions, not used when calling from C */
59  #define QProblemBClass int_t
60  #define OptionsClass int_t
61  #define returnValue int_t
62 
63  /* HessianType */
64  #define HST_ZERO 0
65  #define HST_IDENTITY 1
66  #define HST_POSDEF 2
67  #define HST_POSDEF_NULLSPACE 3
68  #define HST_SEMIDEF 4
69  #define HST_INDEF 5
70  #define HST_UNKNOWN 6
71 
72  /* SubjectToStatus */
73  #define ST_LOWER -1
74  #define ST_INACTIVE 0
75  #define ST_UPPER 1
76  #define ST_INFEASIBLE_LOWER 2
77  #define ST_INFEASIBLE_UPPER 3
78  #define ST_UNDEFINED 4
79 
80  /* PrintLevel */
81  #define PL_DEBUG_ITER -2
82  #define PL_TABULAR -1
83  #define PL_NONE 0
84  #define PL_LOW 1
85  #define PL_MEDIUM 2
86  #define PL_HIGH 3
87 
88 #else
89 
90  #define QProblemBClass QProblemB
91  #define OptionsClass REFER_NAMESPACE_QPOASES Options
92 
93  /* only declare when compiling C++ library */
94  static QProblem* globalQProblemObject = 0;
95  static QProblemB* globalQProblemBObject = 0;
96  static SQProblem* globalSQProblemObject = 0;
97  static Options globalOptionsObject;
98 
99 #endif /* QPOASES_TYPES_HPP */
100 
101 
102 
113 typedef struct
114 {
159 
160 
162  int_t mode
163  );
164 
165 int_t qpOASES_Options_copy( const qpOASES_Options* const from,
166  OptionsClass* const to
167  );
168 
169 
170 int_t qpOASES_obtainOutputs( const QProblemBClass* const globalQpObject,
171  returnValue returnvalue,
172  real_t* const x,
173  real_t* const y,
174  real_t* const obj,
175  int_t* const status
176  );
177 
178 
180  int_t nC,
181  int_t hessianType
182  );
183 
184 int_t QProblem_init( const real_t* const H,
185  const real_t* const g,
186  const real_t* const A,
187  const real_t* const lb,
188  const real_t* const ub,
189  const real_t* const lbA,
190  const real_t* const ubA,
191  int_t* const nWSR,
192  real_t* const cputime,
193  const qpOASES_Options* const options,
194  real_t* const x,
195  real_t* const y,
196  real_t* const obj,
197  int_t* const status
198  );
199 
200 int_t QProblem_hotstart( const real_t* const g,
201  const real_t* const lb,
202  const real_t* const ub,
203  const real_t* const lbA,
204  const real_t* const ubA,
205  int_t* const nWSR,
206  real_t* const cputime,
207  real_t* const x,
208  real_t* const y,
209  real_t* const obj,
210  int_t* const status
211  );
212 
214 
215 
216 
218  int_t hessianType
219  );
220 
221 int_t QProblemB_init( const real_t* const H,
222  const real_t* const g,
223  const real_t* const lb,
224  const real_t* const ub,
225  int_t* const nWSR,
226  real_t* const cputime,
227  const qpOASES_Options* const options,
228  real_t* const x,
229  real_t* const y,
230  real_t* const obj,
231  int_t* const status
232  );
233 
234 int_t QProblemB_hotstart( const real_t* const g,
235  const real_t* const lb,
236  const real_t* const ub,
237  int_t* const nWSR,
238  real_t* const cputime,
239  real_t* const x,
240  real_t* const y,
241  real_t* const obj,
242  int_t* const status
243  );
244 
246 
247 
248 
250  int_t nC,
251  int_t hessianType
252  );
253 
254 int_t SQProblem_init( const real_t* const H,
255  const real_t* const g,
256  const real_t* const A,
257  const real_t* const lb,
258  const real_t* const ub,
259  const real_t* const lbA,
260  const real_t* const ubA,
261  int_t* const nWSR,
262  real_t* const cputime,
263  const qpOASES_Options* const options,
264  real_t* const x,
265  real_t* const y,
266  real_t* const obj,
267  int_t* const status
268  );
269 
270 int_t SQProblem_hotstart( const real_t* const H,
271  const real_t* const g,
272  const real_t* const A,
273  const real_t* const lb,
274  const real_t* const ub,
275  const real_t* const lbA,
276  const real_t* const ubA,
277  int_t* const nWSR,
278  real_t* const cputime,
279  real_t* const x,
280  real_t* const y,
281  real_t* const obj,
282  int_t* const status
283  );
284 
286 
287 
288 #endif /* QPOASES_WRAPPER_H */
289 
290 
291 /*
292  * end of file
293  */
int_t qpOASES_obtainOutputs(const QProblemBClass *const globalQpObject, returnValue returnvalue, real_t *const x, real_t *const y, real_t *const obj, int_t *const status)
int_t SQProblem_cleanup()
int_t enableCholeskyRefactorisation
Implements the online active set strategy for box-constrained QPs.
int_t QProblem_init(const real_t *const H, const real_t *const g, const real_t *const A, const real_t *const lb, const real_t *const ub, const real_t *const lbA, const real_t *const ubA, int_t *const nWSR, real_t *const cputime, const qpOASES_Options *const options, real_t *const x, real_t *const y, real_t *const obj, int_t *const status)
double real_t
Implements the online active set strategy for QPs with varying matrices.
Manages all user-specified options for solving QPs.
Allows to pass back messages to the calling function.
int_t QProblemB_setup(int_t nV, int_t hessianType)
int_t SQProblem_setup(int_t nV, int_t nC, int_t hessianType)
int_t qpOASES_Options_copy(const qpOASES_Options *const from, OptionsClass *const to)
int_t SQProblem_init(const real_t *const H, const real_t *const g, const real_t *const A, const real_t *const lb, const real_t *const ub, const real_t *const lbA, const real_t *const ubA, int_t *const nWSR, real_t *const cputime, const qpOASES_Options *const options, real_t *const x, real_t *const y, real_t *const obj, int_t *const status)
#define QProblemBClass
Provides a generic way to set and pass user-specified options.
Definition: options.hpp:65
int_t SQProblem_hotstart(const real_t *const H, const real_t *const g, const real_t *const A, const real_t *const lb, const real_t *const ub, const real_t *const lbA, const real_t *const ubA, int_t *const nWSR, real_t *const cputime, real_t *const x, real_t *const y, real_t *const obj, int_t *const status)
int_t qpOASES_Options_init(qpOASES_Options *const options, int_t mode)
int_t QProblemB_init(const real_t *const H, const real_t *const g, const real_t *const lb, const real_t *const ub, int_t *const nWSR, real_t *const cputime, const qpOASES_Options *const options, real_t *const x, real_t *const y, real_t *const obj, int_t *const status)
int_t numRegularisationSteps
int_t QProblem_hotstart(const real_t *const g, const real_t *const lb, const real_t *const ub, const real_t *const lbA, const real_t *const ubA, int_t *const nWSR, real_t *const cputime, real_t *const x, real_t *const y, real_t *const obj, int_t *const status)
int_t QProblem_setup(int_t nV, int_t nC, int_t hessianType)
int_t QProblemB_cleanup()
real_t terminationTolerance
int_t QProblemB_hotstart(const real_t *const g, const real_t *const lb, const real_t *const ub, int_t *const nWSR, real_t *const cputime, real_t *const x, real_t *const y, real_t *const obj, int_t *const status)
int int_t
int_t QProblem_cleanup()
unsigned int uint_t
double real_t
Definition: AD_test.c:10
Implements the online active set strategy for QPs with general constraints.
#define OptionsClass
int_t enableInertiaCorrection


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