qpOASES
3.2.1
An Implementation of the Online Active Set Strategy
|
00001 /* 00002 * This file is part of qpOASES. 00003 * 00004 * qpOASES -- An Implementation of the Online Active Set Strategy. 00005 * Copyright (C) 2007-2017 by Hans Joachim Ferreau, Andreas Potschka, 00006 * Christian Kirches et al. All rights reserved. 00007 * 00008 * qpOASES is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2.1 of the License, or (at your option) any later version. 00012 * 00013 * qpOASES is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00016 * See the GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with qpOASES; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00021 * 00022 */ 00023 00024 00035 #ifndef QPOASES_TYPES_HPP 00036 #define QPOASES_TYPES_HPP 00037 00038 00039 /* If your compiler does not support the snprintf() function, 00040 * uncomment the following line and try to compile again. */ 00041 /* #define __NO_SNPRINTF__ */ 00042 00043 00044 /* Uncomment the following line for setting the __DSPACE__ flag. */ 00045 /* #define __DSPACE__ */ 00046 00047 /* Uncomment the following line for setting the __XPCTARGET__ flag. */ 00048 /* #define __XPCTARGET__ */ 00049 00050 00051 /* Uncomment the following line for setting the __NO_FMATH__ flag. */ 00052 /* #define __NO_FMATH__ */ 00053 00054 /* Uncomment the following line to enable debug information. */ 00055 /* #define __DEBUG__ */ 00056 00057 /* Uncomment the following line to enable suppress any kind of console output. */ 00058 /* #define __SUPPRESSANYOUTPUT__ */ 00059 00060 00063 #define __ALWAYS_INITIALISE_WITH_ALL_EQUALITIES__ 00064 00065 00066 /* Uncomment the following line to activate the use of an alternative Givens 00067 * plane rotation requiring only three multiplications. */ 00068 /* #define __USE_THREE_MULTS_GIVENS__ */ 00069 00070 /* Uncomment the following line to activate the use of single precision arithmetic. */ 00071 /* #define __USE_SINGLE_PRECISION__ */ 00072 00073 00074 00075 /* Work-around for Borland BCC 5.5 compiler. */ 00076 #ifdef __BORLANDC__ 00077 #if __BORLANDC__ < 0x0561 00078 #define __STDC__ 1 00079 #endif 00080 #endif 00081 00082 00083 /* Work-around for Microsoft compilers. */ 00084 #ifdef _MSC_VER 00085 #define __NO_SNPRINTF__ 00086 #pragma warning( disable : 4061 4100 4250 4514 4996 ) 00087 #endif 00088 00089 00090 #ifdef __DSPACE__ 00091 00093 #define BEGIN_NAMESPACE_QPOASES 00094 00096 #define END_NAMESPACE_QPOASES 00097 00099 #define USING_NAMESPACE_QPOASES 00100 00102 #define REFER_NAMESPACE_QPOASES :: 00103 00104 #else 00105 00107 #define BEGIN_NAMESPACE_QPOASES namespace qpOASES { 00108 00110 #define END_NAMESPACE_QPOASES } 00111 00113 #define USING_NAMESPACE_QPOASES using namespace qpOASES; 00114 00116 #define REFER_NAMESPACE_QPOASES qpOASES:: 00117 00118 #endif 00119 00120 00121 /* Avoid any printing on embedded platforms. */ 00122 #if defined(__DSPACE__) || defined(__XPCTARGET__) 00123 #define __SUPPRESSANYOUTPUT__ 00124 #define __NO_SNPRINTF__ 00125 #endif 00126 00127 00128 #ifdef __NO_SNPRINTF__ 00129 #if (!defined(_MSC_VER)) || defined(__DSPACE__) || defined(__XPCTARGET__) 00130 /* If snprintf is not available, provide an empty implementation... */ 00131 int snprintf( char* s, size_t n, const char* format, ... ); 00132 #else 00133 /* ... or substitute snprintf by _snprintf for Microsoft compilers. */ 00134 #define snprintf _snprintf 00135 #endif 00136 #endif /* __NO_SNPRINTF__ */ 00137 00138 00139 00141 #define RR( I,J ) R[(I)+nV*(J)] 00142 00144 #define QQ( I,J ) Q[(I)+nV*(J)] 00145 00147 #define TT( I,J ) T[(I)*sizeT+(J)] 00148 00149 00150 /* If neither MA57 nor MA27 are selected, activate the dummy solver */ 00151 #if !defined(SOLVER_MA27) && !defined(SOLVER_MA57) && !defined(SOLVER_NONE) 00152 #define SOLVER_NONE 00153 #endif 00154 00155 00161 typedef long la_int_t; 00162 typedef unsigned long la_uint_t; 00163 00164 00165 BEGIN_NAMESPACE_QPOASES 00166 00168 #ifdef __USE_SINGLE_PRECISION__ 00169 typedef float real_t; 00170 #else 00171 typedef double real_t; 00172 #endif /* __USE_SINGLE_PRECISION__ */ 00173 00174 00176 #ifdef __USE_LONG_INTEGERS__ 00177 typedef long int_t; 00178 typedef unsigned long uint_t; 00179 #else 00180 typedef int int_t; 00181 typedef unsigned int uint_t; 00182 #endif /* __USE_LONG_INTEGERS__ */ 00183 00184 00186 #ifdef __USE_LONG_FINTS__ 00187 typedef long fint_t; 00188 #else 00189 typedef int fint_t; 00190 #endif /* __USE_LONG_FINTS__ */ 00191 00192 00199 typedef int_t sparse_int_t; 00200 00201 00203 enum BooleanType 00204 { 00205 BT_FALSE, 00206 BT_TRUE 00207 }; 00208 00209 00212 enum PrintLevel 00213 { 00214 PL_DEBUG_ITER = -2, 00215 PL_TABULAR, 00216 PL_NONE, 00217 PL_LOW, 00218 PL_MEDIUM, 00219 PL_HIGH 00220 }; 00221 00222 00224 enum VisibilityStatus 00225 { 00226 VS_HIDDEN, 00227 VS_VISIBLE 00228 }; 00229 00230 00233 enum QProblemStatus 00234 { 00235 QPS_NOTINITIALISED, 00236 QPS_PREPARINGAUXILIARYQP, 00238 QPS_AUXILIARYQPSOLVED, 00240 QPS_PERFORMINGHOMOTOPY, 00242 QPS_HOMOTOPYQPSOLVED, 00243 QPS_SOLVED 00244 }; 00245 00246 00248 enum HessianType 00249 { 00250 HST_ZERO, 00251 HST_IDENTITY, 00252 HST_POSDEF, 00253 HST_POSDEF_NULLSPACE, 00254 HST_SEMIDEF, 00255 HST_INDEF, 00256 HST_UNKNOWN 00257 }; 00258 00259 00261 enum SubjectToType 00262 { 00263 ST_UNBOUNDED, 00264 ST_BOUNDED, 00265 ST_EQUALITY, 00266 ST_DISABLED, 00267 ST_UNKNOWN 00268 }; 00269 00270 00272 enum SubjectToStatus 00273 { 00274 ST_LOWER = -1, 00275 ST_INACTIVE, 00276 ST_UPPER, 00277 ST_INFEASIBLE_LOWER, 00278 ST_INFEASIBLE_UPPER, 00279 ST_UNDEFINED 00280 }; 00281 00283 enum SchurUpdateType 00284 { 00285 SUT_VarFixed, 00286 SUT_VarFreed, 00287 SUT_ConAdded, 00288 SUT_ConRemoved, 00289 SUT_UNDEFINED 00290 }; 00291 00302 struct TabularOutput { 00303 int_t idxAddB; 00304 int_t idxRemB; 00305 int_t idxAddC; 00306 int_t idxRemC; 00307 int_t excAddB; 00308 int_t excRemB; 00309 int_t excAddC; 00310 int_t excRemC; 00311 }; 00312 00313 00314 00329 typedef struct { 00330 long numericFormat; 00331 long nRows; 00332 long nCols; 00333 long imaginaryPart; 00334 long nCharName; 00335 } MatMatrixHeader; 00336 00337 00338 00339 00340 END_NAMESPACE_QPOASES 00341 00342 00343 #endif /* QPOASES_TYPES_HPP */ 00344 00345 00346 /* 00347 * end of file 00348 */