Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00032 #ifndef ACADO_TOOLKIT_EXPORT_GAUSS_NEWTON_CN2_HPP
00033 #define ACADO_TOOLKIT_EXPORT_GAUSS_NEWTON_CN2_HPP
00034
00035 #include <acado/code_generation/export_nlp_solver.hpp>
00036
00037 BEGIN_NAMESPACE_ACADO
00038
00048 class ExportGaussNewtonCN2 : public ExportNLPSolver
00049 {
00050 public:
00051
00057 ExportGaussNewtonCN2( UserInteraction* _userInteraction = 0,
00058 const std::string& _commonHeaderName = ""
00059 );
00060
00062 virtual ~ExportGaussNewtonCN2( )
00063 {}
00064
00069 virtual returnValue setup( );
00070
00078 virtual returnValue getDataDeclarations( ExportStatementBlock& declarations,
00079 ExportStruct dataStruct = ACADO_ANY
00080 ) const;
00081
00089 virtual returnValue getFunctionDeclarations( ExportStatementBlock& declarations
00090 ) const;
00091
00092
00100 virtual returnValue getCode( ExportStatementBlock& code
00101 );
00102
00103
00108 unsigned getNumQPvars( ) const;
00109
00114 virtual unsigned getNumStateBounds( ) const;
00115
00116 protected:
00117
00124 virtual returnValue setupObjectiveEvaluation( void );
00125
00131 virtual returnValue setupConstraintsEvaluation( void );
00132
00137 virtual returnValue setupVariables( );
00138
00143 virtual returnValue setupMultiplicationRoutines( );
00144
00149 virtual returnValue setupEvaluation( );
00150
00151 virtual returnValue setupQPInterface( );
00152
00153 virtual returnValue setupCondensing( );
00154
00155 bool performFullCondensing( ) const;
00156
00157 protected:
00158
00159 ExportFunction evaluateObjective;
00160
00161 ExportVariable x0, Dx0;
00162
00163 ExportFunction setObjQ1Q2;
00164 ExportFunction setObjR1R2;
00165 ExportFunction setObjS1;
00166 ExportFunction setObjQN1QN2;
00167
00169 ExportVariable H;
00171 ExportVariable A;
00172
00174 ExportVariable g;
00175
00177 ExportVariable lb;
00178
00180 ExportVariable ub;
00181
00183 ExportVariable lbA;
00184
00186 ExportVariable ubA;
00187
00189 ExportVariable xVars;
00190
00192 ExportVariable yVars;
00193
00194 std::vector< unsigned > xBoundsIdx;
00195 ExportVariable lbValues, ubValues;
00196 ExportVariable lbAValues, ubAValues;
00197
00198 ExportFunction condensePrep;
00199 ExportFunction condenseFdb;
00200 ExportFunction expand;
00201
00202 ExportVariable C, E, QDy, Qd;
00203
00204 ExportFunction multGxd;
00205 ExportFunction moveGxT;
00206 ExportFunction multGxGx;
00207 ExportFunction multGxGu;
00208 ExportFunction moveGuE;
00209 ExportFunction copyHTH;
00210 ExportFunction copyHTH1;
00211 ExportFunction multQ1d;
00212 ExportFunction multQN1d;
00213 ExportFunction multRDy;
00214 ExportFunction multQDy;
00215 ExportFunction multEQDy;
00216 ExportFunction multQETGx;
00217 ExportFunction multEDu;
00218 ExportFunction multQ1Gx;
00219 ExportFunction multQN1Gx;
00220 ExportFunction multQ1Gu;
00221 ExportFunction multQN1Gu;
00222
00223 ExportFunction preparation;
00224 ExportFunction feedback;
00225
00226 ExportFunction getKKT;
00227
00228
00229
00230
00231 ExportVariable T1, T2, W1, W2;
00232 ExportVariable sbar, w1, w2;
00233
00234 ExportFunction multBTW1, macBTW1_R1, multGxTGu, macQEW2, mac_S1T_E;
00235 ExportFunction macATw1QDy, macBTw1, macQSbarW2, macASbar, macS1TSbar;
00236 ExportFunction expansionStep;
00237
00238
00239 ExportFunction expansionStep2;
00240
00241
00242 ExportFunction mult_BT_T1, mac_ST_C, multGxTGx, macGxTGx;
00243 };
00244
00245 CLOSE_NAMESPACE_ACADO
00246
00247 #endif // ACADO_TOOLKIT_EXPORT_GAUSS_NEWTON_CN2_HPP