integration_algorithm.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_INTEGRATION_ALGORITHM_HPP
35 #define ACADO_TOOLKIT_INTEGRATION_ALGORITHM_HPP
36 
37 
41 
42 
44 
45 
57 {
58  //
59  // PUBLIC MEMBER FUNCTIONS:
60  //
61  public:
62 
65 
68 
70  virtual ~IntegrationAlgorithm( );
71 
74 
75 
77  virtual returnValue addStage( const DynamicSystem &dynamicSystem_,
78  const Grid &stageIntervals,
79  const IntegratorType &integratorType_ = INT_UNKNOWN );
80 
82  virtual returnValue addTransition( const Transition& transition_ );
83 
84 
86  virtual returnValue clear();
87 
88 
101  VariablesGrid *xa,
102  VariablesGrid *p ,
103  VariablesGrid *u ,
104  VariablesGrid *w
105  );
106 
107  returnValue evaluate( OCPiterate& _iter );
108 
110  VariablesGrid *xa,
111  VariablesGrid *p ,
112  VariablesGrid *u ,
113  VariablesGrid *w
114  );
115 
116 
126  returnValue integrate( double t0 ,
127  double tend ,
128  const DVector &x0 ,
129  const DVector &xa = emptyVector ,
130  const DVector &p = emptyVector ,
131  const DVector &u = emptyVector ,
132  const DVector &w = emptyVector
133  );
134 
148  returnValue integrate( const Grid &t ,
149  const DVector &x0 ,
150  const DVector &xa = emptyVector ,
151  const DVector &p = emptyVector ,
152  const DVector &u = emptyVector ,
153  const DVector &w = emptyVector
154  );
155 
156 
168  returnValue setForwardSeed( const BlockMatrix &xSeed_,
169  const BlockMatrix &pSeed_ = emptyBlockMatrix,
170  const BlockMatrix &uSeed_ = emptyBlockMatrix,
171  const BlockMatrix &wSeed_ = emptyBlockMatrix );
172 
177  returnValue setForwardSeed( const DVector &xSeed ,
178  const DVector &pSeed = emptyVector ,
179  const DVector &uSeed = emptyVector ,
180  const DVector &wSeed = emptyVector );
181 
182 
190 
191 
192 
204  returnValue setBackwardSeed( const BlockMatrix &seed );
205 
210  returnValue setBackwardSeed( const DVector &seed );
211 
219 
220 
221 
228 
229 
236 
243 
250  BlockMatrix &hessian
251  );
252 
259  BlockMatrix &hessian
260  );
261 
262 
264 
265 
266  BooleanType isAffine( ) const;
267 
268 
276  returnValue getX( DVector& xEnd
277  ) const;
278 
286  returnValue getXA( DVector& xaEnd
287  ) const;
288 
299  ) const;
300 
301 
312  ) const;
313 
314 
323  ) const;
324 
333  ) const;
334 
335 
344  ) const;
345 
357  DVector &Dx_p = emptyVector,
358  DVector &Dx_u = emptyVector,
359  DVector &Dx_w = emptyVector
360  ) const;
361 
362 
363 
364  //
365  // PROTECTED MEMBER FUNCTIONS:
366  //
367 
368  protected:
369 
370  virtual returnValue setupOptions( );
371  virtual returnValue setupLogging( );
372 
373 
374  //
375  // PROTECTED MEMBERS:
376  //
377 
378  protected:
379 
382 };
383 
384 
386 
387 
388 //#include <acado/dynamic_discretization/integration_algorithm.ipp>
389 
390 
391 #endif // ACADO_TOOLKIT_INTEGRATION_ALGORITHM_HPP
392 
393 // end of file
Data class for storing generic optimization variables.
Definition: ocp_iterate.hpp:57
Implements a very rudimentary block sparse matrix class.
returnValue getBackwardSensitivities(BlockMatrix &D) const
ShootingMethod * integrationMethod
Stores a DifferentialEquation together with an OutputFcn.
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.
returnValue getXA(DVector &xaEnd) const
Allows to conveniently handle (one-dimensional) grids consisting of time points.
Definition: grid.hpp:58
returnValue getX(DVector &xEnd) const
virtual returnValue setupLogging()
returnValue integrate(VariablesGrid *x, VariablesGrid *xa, VariablesGrid *p, VariablesGrid *u, VariablesGrid *w)
#define CLOSE_NAMESPACE_ACADO
static BlockMatrix emptyBlockMatrix
IntegratorType
User-interface to integrate a DynamicSystem, possibly over multiple stages.
returnValue setForwardSeed(const BlockMatrix &xSeed_, const BlockMatrix &pSeed_=emptyBlockMatrix, const BlockMatrix &uSeed_=emptyBlockMatrix, const BlockMatrix &wSeed_=emptyBlockMatrix)
virtual returnValue clear()
Encapsulates all user interaction for setting options, logging data and plotting results.
void rhs(const real_t *x, real_t *f)
virtual returnValue setupOptions()
Allows to setup and evaluate transition functions based on SymbolicExpressions.
Definition: transition.hpp:53
IntegrationAlgorithm & operator=(const IntegrationAlgorithm &rhs)
returnValue setBackwardSeed(const BlockMatrix &seed)
returnValue evaluate(VariablesGrid *x, VariablesGrid *xa, VariablesGrid *p, VariablesGrid *u, VariablesGrid *w)
returnValue getForwardSensitivities(BlockMatrix &D) const
virtual returnValue addStage(const DynamicSystem &dynamicSystem_, const Grid &stageIntervals, const IntegratorType &integratorType_=INT_UNKNOWN)
static DVector emptyVector
Definition: vector.hpp:335
#define BEGIN_NAMESPACE_ACADO
BooleanType isAffine() const
virtual returnValue addTransition(const Transition &transition_)


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