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 
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         
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                 
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         
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