dynamic_discretization.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_DYNAMIC_DISCRETIZATION_HPP
35 #define ACADO_TOOLKIT_DYNAMIC_DISCRETIZATION_HPP
36 
37 
40 
47 
48 
50 
51 
63 {
64  //
65  // PUBLIC MEMBER FUNCTIONS:
66  //
67 
68  public:
69 
72 
73  DynamicDiscretization( UserInteraction* _userInteraction
74  );
75 
78 
80  virtual ~DynamicDiscretization( );
81 
84 
86  virtual DynamicDiscretization* clone() const = 0;
87 
88 
89 
91  virtual returnValue addStage( const DynamicSystem &dynamicSystem_,
92  const Grid &stageIntervals,
93  const IntegratorType &integratorType_ = INT_UNKNOWN ) = 0;
94 
96  virtual returnValue addTransition( const Transition& transition_ ) = 0;
97 
98 
100  virtual returnValue clear() = 0;
101 
102 
103 
115  virtual returnValue setForwardSeed( const BlockMatrix &xSeed_,
116  const BlockMatrix &pSeed_,
117  const BlockMatrix &uSeed_,
118  const BlockMatrix &wSeed_ );
119 
120 
128 
129 
130 
142  virtual returnValue setBackwardSeed( const BlockMatrix &seed );
143 
144 
145 
153 
154 
155 
161  virtual returnValue deleteAllSeeds();
162 
163 
164 
176  virtual returnValue evaluate( OCPiterate &iter ) = 0;
177 
178 
179 
185  virtual returnValue evaluateSensitivities( ) = 0;
186 
187 
188 
194  virtual returnValue evaluateSensitivities( const BlockMatrix &seed, BlockMatrix &hessian ) = 0;
195 
196 
197 
204 
205 
206 
207 
212  virtual returnValue getResiduum( BlockMatrix &residuum_ ) const;
213 
214 
215 
221  virtual returnValue getForwardSensitivities( BlockMatrix &D ) const;
224 
225 
226 
235 
236 
237 
239  inline int getNumberOfIntervals( ) const;
240 
241 
242 
243  virtual BooleanType isAffine( ) const = 0;
244 
245 
246  virtual returnValue unfreeze( ) = 0;
247 
248 
249  //
250  // PROTECTED MEMBER FUNCTIONS:
251  //
252 
253  protected:
254  virtual returnValue setupOptions( );
255  virtual returnValue setupLogging( );
256 
257  void copy( const DynamicDiscretization& rhs );
258  void initializeVariables();
259 
261 
262 
263  //
264  // PROTECTED MEMBERS:
265  //
266 
267  protected:
268 
270  int N ;
275  // DIMENSIONS:
276  // -----------
277  int nx;
278  int na;
279  int np;
280  int nu;
281  int nw;
282 
283 
284  // INPUT STORAGE:
285  // ------------------------
294  // RESULTS:
295  // ------------------------
300 };
301 
302 
304 
305 
306 
307 #include <acado/dynamic_discretization/dynamic_discretization.ipp>
308 
309 //#include <acado/dynamic_discretization/simulation_algorithm.hpp>
310 //#include <acado/dynamic_discretization/simulation_by_integration.hpp>
311 //#include <acado/dynamic_discretization/simulation_by_collocation.hpp>
314 
315 
316 #endif // ACADO_TOOLKIT_DYNAMIC_DISCRETIZATION_HPP
317 
318 
319 // end of file
virtual returnValue getForwardSensitivities(BlockMatrix &D) const
Data class for storing generic optimization variables.
Definition: ocp_iterate.hpp:57
Implements a very rudimentary block sparse matrix class.
virtual returnValue clear()=0
virtual returnValue getResiduum(BlockMatrix &residuum_) const
Stores a DifferentialEquation together with an OutputFcn.
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 addStage(const DynamicSystem &dynamicSystem_, const Grid &stageIntervals, const IntegratorType &integratorType_=INT_UNKNOWN)=0
Base class for all algorithmic modules within the ACADO Toolkit providing some basic functionality...
virtual returnValue setBackwardSeed(const BlockMatrix &seed)
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
DynamicDiscretization & operator=(const DynamicDiscretization &rhs)
virtual returnValue deleteAllSeeds()
virtual DynamicDiscretization * clone() const =0
#define CLOSE_NAMESPACE_ACADO
Base class for discretizing a DifferentialEquation for use in optimal control algorithms.
virtual returnValue unfreeze()=0
virtual returnValue setUnitForwardSeed()
virtual returnValue setupOptions()
IntegratorType
virtual returnValue addTransition(const Transition &transition_)=0
int getNumberOfIntervals() const
Encapsulates all user interaction for setting options, logging data and plotting results.
virtual returnValue evaluateSensitivities()=0
void rhs(const real_t *x, real_t *f)
PrintLevel
virtual returnValue evaluate(OCPiterate &iter)=0
virtual BooleanType isAffine() const =0
Allows to setup and evaluate transition functions based on SymbolicExpressions.
Definition: transition.hpp:53
virtual returnValue evaluateSensitivitiesLifted()=0
virtual returnValue setForwardSeed(const BlockMatrix &xSeed_, const BlockMatrix &pSeed_, const BlockMatrix &uSeed_, const BlockMatrix &wSeed_)
#define BEGIN_NAMESPACE_ACADO
virtual returnValue getBackwardSensitivities(BlockMatrix &D) const
virtual returnValue setUnitBackwardSeed()
virtual returnValue setupLogging()
void copy(const DynamicDiscretization &rhs)


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