shooting_method.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 
00026 
00027 
00034 #ifndef ACADO_TOOLKIT_SHOOTING_METHOD_HPP
00035 #define ACADO_TOOLKIT_SHOOTING_METHOD_HPP
00036 
00037 
00038 #include <acado/dynamic_discretization/dynamic_discretization.hpp>
00039 
00040 
00041 BEGIN_NAMESPACE_ACADO
00042 
00043 
00055 class ShootingMethod : public DynamicDiscretization
00056 {
00057         //
00058         // PUBLIC MEMBER FUNCTIONS:
00059         //
00060         public:
00061 
00063                 ShootingMethod();
00064 
00065                 ShootingMethod( UserInteraction* _userInteraction
00066                                                 );
00067 
00069                 ShootingMethod( const ShootingMethod& rhs );
00070 
00072                 virtual ~ShootingMethod( );
00073 
00075                 ShootingMethod& operator=( const ShootingMethod& rhs );
00076 
00078                 virtual DynamicDiscretization* clone() const;
00079 
00080 
00082         virtual returnValue addStage( const DynamicSystem  &dynamicSystem_,
00083                                       const Grid           &stageIntervals,
00084                                       const IntegratorType &integratorType_ = INT_UNKNOWN );
00085 
00087                 virtual returnValue addTransition( const Transition& transition_ );
00088 
00089 
00091         virtual returnValue clear();
00092 
00093 
00094 
00106                 virtual returnValue evaluate(   OCPiterate &iter
00107                                                                                 );
00108 
00109 
00115                 virtual returnValue deleteAllSeeds( );
00116 
00117 
00123                 virtual returnValue evaluateSensitivities( );
00124 
00125 
00131                 virtual returnValue evaluateSensitivitiesLifted( );
00132 
00133 
00139                 virtual returnValue evaluateSensitivities(      const BlockMatrix &seed,
00140                                                                                                         BlockMatrix &hessian
00141                                                                                                         );
00142 
00143 
00144         virtual returnValue unfreeze( );
00145 
00146 
00147                 virtual BooleanType isAffine( ) const;
00148 
00149 
00150                 //
00151                 // PROTECTED MEMBER FUNCTIONS:
00152                 //
00153 
00154                 protected:
00155 
00156                         returnValue deleteAll( );
00157 
00158                         void copy( const ShootingMethod &arg );
00159 
00160             returnValue allocateIntegrator( uint idx, IntegratorType type_ );
00161 
00162 
00163             returnValue differentiateBackward( const int    &idx ,
00164                                                const DMatrix &seed,
00165                                                      DMatrix &Gx  ,
00166                                                      DMatrix &Gp  ,
00167                                                      DMatrix &Gu  ,
00168                                                      DMatrix &Gw    );
00169 
00170             returnValue differentiateForward(  const int     &idx,
00171                                                const DMatrix  &dX ,
00172                                                const DMatrix  &dP ,
00173                                                const DMatrix  &dU ,
00174                                                const DMatrix  &dW ,
00175                                                      DMatrix  &D    );
00176 
00177 
00178             returnValue differentiateForwardBackward( const int     &idx ,
00179                                                       const DMatrix  &dX  ,
00180                                                       const DMatrix  &dP  ,
00181                                                       const DMatrix  &dU  ,
00182                                                       const DMatrix  &dW  ,
00183                                                       const DMatrix  &seed,
00184                                                             DMatrix  &D   ,
00185                                                             DMatrix  &ddX ,
00186                                                             DMatrix  &ddP ,
00187                                                             DMatrix  &ddU ,
00188                                                             DMatrix  &ddW   );
00189 
00190 
00191             returnValue update( DMatrix &G, const DMatrix &A, const DMatrix &B );
00192 
00193 
00201                         returnValue logTrajectory( const OCPiterate &iter );
00202 
00203                         returnValue rescale(    VariablesGrid* trajectory,
00204                                                                         double tEndNew,
00205                                                                         double newIntervalLength
00206                                                                         ) const;
00207 
00208         //
00209         // PROTECTED MEMBERS:
00210         //
00211 
00212         protected:
00213 
00214             Integrator **integrator;
00215             DMatrix       breakPoints;
00216 };
00217 
00218 
00219 CLOSE_NAMESPACE_ACADO
00220 
00221 
00222 
00223 #include <acado/dynamic_discretization/shooting_method.ipp>
00224 
00225 
00226 #endif  // ACADO_TOOLKIT_SHOOTING_METHOD_HPP
00227 
00228 // end of file


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Thu Aug 27 2015 12:00:00