qpOASES
3.0.1
|
00001 /* 00002 * This file is part of qpOASES. 00003 * 00004 * qpOASES -- An Implementation of the Online Active Set Strategy. 00005 * Copyright (C) 2007-2014 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 00092 #define __NO_SNPRINTF__ 00093 00095 #define BEGIN_NAMESPACE_QPOASES 00096 00098 #define END_NAMESPACE_QPOASES 00099 00101 #define USING_NAMESPACE_QPOASES 00102 00104 #define REFER_NAMESPACE_QPOASES :: 00105 00106 #else 00107 00109 #define BEGIN_NAMESPACE_QPOASES namespace qpOASES { 00110 00112 #define END_NAMESPACE_QPOASES } 00113 00115 #define USING_NAMESPACE_QPOASES using namespace qpOASES; 00116 00118 #define REFER_NAMESPACE_QPOASES qpOASES:: 00119 00120 #endif 00121 00122 00124 #define RR( I,J ) R[(I)+nV*(J)] 00125 00127 #define QQ( I,J ) Q[(I)+nV*(J)] 00128 00130 #define TT( I,J ) T[(I)*sizeT+(J)] 00131 00132 00133 00134 BEGIN_NAMESPACE_QPOASES 00135 00136 00138 #ifdef __USE_SINGLE_PRECISION__ 00139 typedef float real_t; 00140 #else 00141 typedef double real_t; 00142 #endif /* __USE_SINGLE_PRECISION__ */ 00143 00144 00146 enum BooleanType 00147 { 00148 BT_FALSE, 00149 BT_TRUE 00150 }; 00151 00152 00155 enum PrintLevel 00156 { 00157 PL_DEBUG_ITER = -2, 00158 PL_TABULAR, 00159 PL_NONE, 00160 PL_LOW, 00161 PL_MEDIUM, 00162 PL_HIGH 00163 }; 00164 00165 00167 enum VisibilityStatus 00168 { 00169 VS_HIDDEN, 00170 VS_VISIBLE 00171 }; 00172 00173 00176 enum QProblemStatus 00177 { 00178 QPS_NOTINITIALISED, 00179 QPS_PREPARINGAUXILIARYQP, 00181 QPS_AUXILIARYQPSOLVED, 00183 QPS_PERFORMINGHOMOTOPY, 00185 QPS_HOMOTOPYQPSOLVED, 00186 QPS_SOLVED 00187 }; 00188 00189 00191 enum HessianType 00192 { 00193 HST_ZERO, 00194 HST_IDENTITY, 00195 HST_POSDEF, 00196 HST_POSDEF_NULLSPACE, 00197 HST_SEMIDEF, 00198 HST_INDEF, 00199 HST_UNKNOWN 00200 }; 00201 00202 00204 enum SubjectToType 00205 { 00206 ST_UNBOUNDED, 00207 ST_BOUNDED, 00208 ST_EQUALITY, 00209 ST_DISABLED, 00210 ST_UNKNOWN 00211 }; 00212 00213 00215 enum SubjectToStatus 00216 { 00217 ST_LOWER = -1, 00218 ST_INACTIVE, 00219 ST_UPPER, 00220 ST_INFEASIBLE_LOWER, 00221 ST_INFEASIBLE_UPPER, 00222 ST_UNDEFINED 00223 }; 00224 00235 struct TabularOutput { 00236 int idxAddB; 00237 int idxRemB; 00238 int idxAddC; 00239 int idxRemC; 00240 int excAddB; 00241 int excRemB; 00242 int excAddC; 00243 int excRemC; 00244 }; 00245 00246 00247 00262 typedef struct { 00263 long numericFormat; 00264 long nRows; 00265 long nCols; 00266 long imaginaryPart; 00267 long nCharName; 00268 } MatMatrixHeader; 00269 00270 00271 00272 00273 END_NAMESPACE_QPOASES 00274 00275 00276 #endif /* QPOASES_TYPES_HPP */ 00277 00278 00279 /* 00280 * end of file 00281 */