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_HPMPC_HPP
00033 #define ACADO_TOOLKIT_EXPORT_GAUSS_NEWTON_HPMPC_HPP
00034
00035 #include <acado/code_generation/export_nlp_solver.hpp>
00036
00037 BEGIN_NAMESPACE_ACADO
00038
00039 class ExportHpmpcInterface;
00040
00050 class ExportGaussNewtonHpmpc : public ExportNLPSolver
00051 {
00052 public:
00053
00059 ExportGaussNewtonHpmpc( UserInteraction* _userInteraction = 0,
00060 const std::string& _commonHeaderName = ""
00061 );
00062
00065 virtual ~ExportGaussNewtonHpmpc( )
00066 {}
00067
00072 virtual returnValue setup( );
00073
00081 virtual returnValue getDataDeclarations( ExportStatementBlock& declarations,
00082 ExportStruct dataStruct = ACADO_ANY
00083 ) const;
00084
00092 virtual returnValue getFunctionDeclarations( ExportStatementBlock& declarations
00093 ) const;
00094
00095
00103 virtual returnValue getCode( ExportStatementBlock& code
00104 );
00105
00106
00111 unsigned getNumQPvars( ) const;
00112
00113 protected:
00114
00121 virtual returnValue setupObjectiveEvaluation( void );
00122
00128 virtual returnValue setupConstraintsEvaluation( void );
00129
00134 virtual returnValue setupVariables( );
00135
00140 virtual returnValue setupMultiplicationRoutines( );
00141
00146 virtual returnValue setupEvaluation( );
00147
00148 virtual returnValue setupQPInterface( );
00149
00150 private:
00152 ExportVariable x0;
00153
00156 ExportFunction evaluateObjective;
00157
00158 ExportFunction setStagef;
00159
00160 ExportFunction setObjQ1Q2;
00161 ExportFunction setObjR1R2;
00162 ExportFunction setObjS1;
00163 ExportFunction setObjQN1QN2;
00164
00169 ExportFunction evaluateConstraints;
00174 ExportFunction preparation;
00175 ExportFunction feedback;
00176
00177 ExportFunction getKKT;
00182 ExportFunction acc;
00188 ExportVariable qpQ, qpQf, qpS, qpR;
00189
00190 ExportVariable qpq, qpqf, qpr;
00191 ExportVariable qpx, qpu;
00192
00193 ExportVariable evLbValues, evUbValues;
00194 ExportVariable qpLb, qpUb;
00195
00196 ExportVariable qpLambda, qpMu, qpSlacks;
00197
00198 ExportVariable nIt;
00199
00200 std::tr1::shared_ptr< ExportHpmpcInterface > qpInterface;
00202 };
00203
00204 CLOSE_NAMESPACE_ACADO
00205
00206 #endif // ACADO_TOOLKIT_EXPORT_GAUSS_NEWTON_HPMPC_HPP