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_CONDENSED_HPP
00033 #define ACADO_TOOLKIT_EXPORT_GAUSS_NEWTON_CONDENSED_HPP
00034
00035 #include <acado/code_generation/export_nlp_solver.hpp>
00036 #include <acado/code_generation/linear_solvers/export_cholesky_solver.hpp>
00037
00038 BEGIN_NAMESPACE_ACADO
00039
00051 class ExportGaussNewtonCondensed : public ExportNLPSolver
00052 {
00053 public:
00054
00060 ExportGaussNewtonCondensed( UserInteraction* _userInteraction = 0,
00061 const std::string& _commonHeaderName = ""
00062 );
00063
00066 virtual ~ExportGaussNewtonCondensed( )
00067 {}
00068
00073 virtual returnValue setup( );
00074
00082 virtual returnValue getDataDeclarations( ExportStatementBlock& declarations,
00083 ExportStruct dataStruct = ACADO_ANY
00084 ) const;
00085
00093 virtual returnValue getFunctionDeclarations( ExportStatementBlock& declarations
00094 ) const;
00095
00096
00104 virtual returnValue getCode( ExportStatementBlock& code
00105 );
00106
00107
00112 unsigned getNumQPvars( ) const;
00113
00118 virtual unsigned getNumStateBounds( ) const;
00119
00120 protected:
00121
00128 virtual returnValue setupObjectiveEvaluation( void );
00129
00135 virtual returnValue setupConstraintsEvaluation( void );
00136
00141 virtual returnValue setupVariables( );
00142
00147 virtual returnValue setupMultiplicationRoutines( );
00148
00153 virtual returnValue setupEvaluation( );
00154
00156 virtual returnValue setupQPInterface( );
00157
00159 virtual returnValue setupCondensing( );
00160
00162 bool performFullCondensing( ) const;
00163
00164 private:
00165
00167 ExportVariable x0;
00169 ExportVariable Dx0;
00170
00173 ExportFunction evaluateObjective;
00174 ExportFunction setObjQ1Q2;
00175 ExportFunction setObjR1R2;
00176 ExportFunction setObjQN1QN2;
00181 ExportFunction condensePrep;
00182 ExportFunction condenseFdb;
00183 ExportFunction expand;
00184
00185 ExportVariable T, E, QE, QGx, QDy, Qd;
00186
00187 ExportVariable H00, H10, H11;
00188 ExportVariable g0, g1;
00189
00190 ExportCholeskySolver cholSolver;
00191
00192 std::vector< unsigned > xBoundsIdx;
00193 ExportVariable lbValues, ubValues;
00194 ExportVariable lbAValues, ubAValues;
00199 ExportFunction multGxd;
00200 ExportFunction moveGxT;
00201 ExportFunction multGxGx;
00202 ExportFunction multGxGu;
00203 ExportFunction moveGuE;
00204 ExportFunction setBlockH11;
00205 ExportFunction setBlockH11_R1;
00206 ExportFunction zeroBlockH11;
00207 ExportFunction copyHTH;
00208 ExportFunction multQ1d;
00209 ExportFunction multQN1d;
00210 ExportFunction multRDy;
00211 ExportFunction multQDy;
00212 ExportFunction multEQDy;
00213 ExportFunction multQETGx;
00214 ExportFunction zeroBlockH10;
00215 ExportFunction multEDu;
00216 ExportFunction multQ1Gx;
00217 ExportFunction multQN1Gx;
00218 ExportFunction multQ1Gu;
00219 ExportFunction multQN1Gu;
00220 ExportFunction zeroBlockH00;
00221 ExportFunction multCTQC;
00222
00223 ExportFunction macCTSlx;
00224 ExportFunction macETSlu;
00225
00226 ExportFunction multHxC;
00227 ExportFunction multHxE;
00228 ExportFunction macHxd;
00233 ExportVariable A10;
00234 ExportVariable A20;
00235 ExportVariable pacA01Dx0;
00236 ExportVariable pocA02Dx0;
00241 ExportFunction preparation;
00242 ExportFunction feedback;
00243
00244 ExportFunction getKKT;
00249 ExportVariable CEN, sigmaTmp, sigma, sigmaN;
00250 ExportFunction calculateCovariance;
00256 ExportVariable H;
00258 ExportVariable R;
00260 ExportVariable A;
00262 ExportVariable g;
00264 ExportVariable lb;
00266 ExportVariable ub;
00268 ExportVariable lbA;
00270 ExportVariable ubA;
00272 ExportVariable xVars;
00274 ExportVariable yVars;
00276 };
00277
00278 CLOSE_NAMESPACE_ACADO
00279
00280 #endif // ACADO_TOOLKIT_EXPORT_GAUSS_NEWTON_CONDENSED_HPP