shooting_method.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of ACADO Toolkit.
3  *
4  * ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
5  * Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
6  * Milan Vukov, Rien Quirynen, KU Leuven.
7  * Developed within the Optimization in Engineering Center (OPTEC)
8  * under supervision of Moritz Diehl. All rights reserved.
9  *
10  * ACADO Toolkit is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 3 of the License, or (at your option) any later version.
14  *
15  * ACADO Toolkit is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with ACADO Toolkit; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24  */
25 
26 
27 
34 #ifndef ACADO_TOOLKIT_SHOOTING_METHOD_HPP
35 #define ACADO_TOOLKIT_SHOOTING_METHOD_HPP
36 
37 
39 
40 
42 
43 
56 {
57  //
58  // PUBLIC MEMBER FUNCTIONS:
59  //
60  public:
61 
64 
65  ShootingMethod( UserInteraction* _userInteraction
66  );
67 
70 
72  virtual ~ShootingMethod( );
73 
76 
78  virtual DynamicDiscretization* clone() const;
79 
80 
82  virtual returnValue addStage( const DynamicSystem &dynamicSystem_,
83  const Grid &stageIntervals,
84  const IntegratorType &integratorType_ = INT_UNKNOWN );
85 
87  virtual returnValue addTransition( const Transition& transition_ );
88 
89 
91  virtual returnValue clear();
92 
93 
94 
106  virtual returnValue evaluate( OCPiterate &iter
107  );
108 
109 
115  virtual returnValue deleteAllSeeds( );
116 
117 
124 
125 
132 
133 
139  virtual returnValue evaluateSensitivities( const BlockMatrix &seed,
140  BlockMatrix &hessian
141  );
142 
143 
144  virtual returnValue unfreeze( );
145 
146 
147  virtual BooleanType isAffine( ) const;
148 
149 
150  //
151  // PROTECTED MEMBER FUNCTIONS:
152  //
153 
154  protected:
155 
157 
158  void copy( const ShootingMethod &arg );
159 
161 
162 
163  returnValue differentiateBackward( const int &idx ,
164  const DMatrix &seed,
165  DMatrix &Gx ,
166  DMatrix &Gp ,
167  DMatrix &Gu ,
168  DMatrix &Gw );
169 
170  returnValue differentiateForward( const int &idx,
171  const DMatrix &dX ,
172  const DMatrix &dP ,
173  const DMatrix &dU ,
174  const DMatrix &dW ,
175  DMatrix &D );
176 
177 
178  returnValue differentiateForwardBackward( const int &idx ,
179  const DMatrix &dX ,
180  const DMatrix &dP ,
181  const DMatrix &dU ,
182  const DMatrix &dW ,
183  const DMatrix &seed,
184  DMatrix &D ,
185  DMatrix &ddX ,
186  DMatrix &ddP ,
187  DMatrix &ddU ,
188  DMatrix &ddW );
189 
190 
191  returnValue update( DMatrix &G, const DMatrix &A, const DMatrix &B );
192 
193 
201  returnValue logTrajectory( const OCPiterate &iter );
202 
203  returnValue rescale( VariablesGrid* trajectory,
204  double tEndNew,
205  double newIntervalLength
206  ) const;
207 
208  //
209  // PROTECTED MEMBERS:
210  //
211 
212  protected:
213 
216 };
217 
218 
220 
221 
222 
223 #include <acado/dynamic_discretization/shooting_method.ipp>
224 
225 
226 #endif // ACADO_TOOLKIT_SHOOTING_METHOD_HPP
227 
228 // end of file
Data class for storing generic optimization variables.
Definition: ocp_iterate.hpp:57
Implements a very rudimentary block sparse matrix class.
virtual returnValue clear()
virtual returnValue evaluate(OCPiterate &iter)
virtual returnValue evaluateSensitivitiesLifted()
returnValue allocateIntegrator(uint idx, IntegratorType type_)
Stores a DifferentialEquation together with an OutputFcn.
virtual returnValue deleteAllSeeds()
returnValue rescale(VariablesGrid *trajectory, double tEndNew, double newIntervalLength) const
Discretizes a DifferentialEquation by means of single or multiple shooting.
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
virtual returnValue evaluateSensitivities()
void copy(const ShootingMethod &arg)
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
Allows to conveniently handle (one-dimensional) grids consisting of time points.
Definition: grid.hpp:58
returnValue differentiateForwardBackward(const int &idx, const DMatrix &dX, const DMatrix &dP, const DMatrix &dU, const DMatrix &dW, const DMatrix &seed, DMatrix &D, DMatrix &ddX, DMatrix &ddP, DMatrix &ddU, DMatrix &ddW)
Integrator ** integrator
#define CLOSE_NAMESPACE_ACADO
Base class for discretizing a DifferentialEquation for use in optimal control algorithms.
Abstract base class for all kinds of algorithms for integrating differential equations (ODEs or DAEs)...
Definition: integrator.hpp:61
returnValue differentiateBackward(const int &idx, const DMatrix &seed, DMatrix &Gx, DMatrix &Gp, DMatrix &Gu, DMatrix &Gw)
ShootingMethod & operator=(const ShootingMethod &rhs)
returnValue logTrajectory(const OCPiterate &iter)
IntegratorType
virtual DynamicDiscretization * clone() const
virtual returnValue addTransition(const Transition &transition_)
Encapsulates all user interaction for setting options, logging data and plotting results.
virtual BooleanType isAffine() const
void rhs(const real_t *x, real_t *f)
returnValue deleteAll()
virtual returnValue unfreeze()
returnValue differentiateForward(const int &idx, const DMatrix &dX, const DMatrix &dP, const DMatrix &dU, const DMatrix &dW, DMatrix &D)
Allows to setup and evaluate transition functions based on SymbolicExpressions.
Definition: transition.hpp:53
#define BEGIN_NAMESPACE_ACADO
virtual ~ShootingMethod()
returnValue update(DMatrix &G, const DMatrix &A, const DMatrix &B)
virtual returnValue addStage(const DynamicSystem &dynamicSystem_, const Grid &stageIntervals, const IntegratorType &integratorType_=INT_UNKNOWN)


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:04