export_gauss_newton_hpmpc.hpp
Go to the documentation of this file.
00001 /*
00002  *    This file is part of ACADO Toolkit.
00003  *
00004  *    ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
00005  *    Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
00006  *    Milan Vukov, Rien Quirynen, KU Leuven.
00007  *    Developed within the Optimization in Engineering Center (OPTEC)
00008  *    under supervision of Moritz Diehl. All rights reserved.
00009  *
00010  *    ACADO Toolkit is free software; you can redistribute it and/or
00011  *    modify it under the terms of the GNU Lesser General Public
00012  *    License as published by the Free Software Foundation; either
00013  *    version 3 of the License, or (at your option) any later version.
00014  *
00015  *    ACADO Toolkit is distributed in the hope that it will be useful,
00016  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  *    Lesser General Public License for more details.
00019  *
00020  *    You should have received a copy of the GNU Lesser General Public
00021  *    License along with ACADO Toolkit; if not, write to the Free Software
00022  *    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 11:58:09