curve.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 
33 #ifndef ACADO_TOOLKIT_CURVE_HPP
34 #define ACADO_TOOLKIT_CURVE_HPP
35 
38 
40 
41 
52 class Curve{
53 
54  //
55  // PUBLIC MEMBER FUNCTIONS:
56  //
57  public:
58 
60  Curve();
61 
63  Curve( const Curve& arg );
64 
66  ~Curve( );
67 
69  Curve& operator=( const Curve& arg );
70 
71 
72  Curve operator()( uint idx
73  ) const;
74 
92  returnValue add( double tStart,
93  double tEnd,
94  const DVector constant );
95 
96 
115  returnValue add( const VariablesGrid& sampledData, InterpolationMode mode = IM_LINEAR );
116 
117 
135  returnValue add( double tStart,
136  double tEnd,
137  const Function& parameterization_ );
138 
139 
145  inline int getDim( ) const;
146 
147 
153  inline BooleanType isEmpty( ) const;
154 
155 
156 
162  inline BooleanType isContinuous( ) const;
163 
164 
165 
171  inline int getNumIntervals( ) const;
172 
173 
174 
198  returnValue evaluate( double t, double *result ) const;
199 
200 
212  returnValue evaluate( double t, DVector &result ) const;
213 
214 
232  returnValue evaluate( double tStart, double tEnd, VariablesGrid &result ) const;
233 
234 
235 
249  returnValue discretize( const Grid &discretizationGrid, VariablesGrid &result ) const;
250 
251 
252 
259  returnValue getTimeDomain( double tStart, double tEnd ) const;
260 
261 
273  returnValue getTimeDomain( const uint &idx, double tStart, double tEnd ) const;
274 
275 
276 
283  BooleanType isInTimeDomain( double t
284  ) const;
285 
286 
287 
288 
289 
290  //
291  // PROTECTED MEMBER FUNCTIONS:
292  //
293  protected:
294 
295 
296  //
297  // DATA MEMBERS:
298  //
299  protected:
300 
301  uint nIntervals ; // number of intervals of the curve.
302  uint dim ; // the dimension of the curve.
303  Function **parameterization; // the parameterizations of the curve pieces
304  Grid *grid ; // the grid points associated with the intervals of the curve.
305 };
306 
307 
309 
310 
311 #include <acado/curve/curve.ipp>
312 
313 
314 #endif // ACADO_TOOLKIT_CURVE_HPP
315 
316 /*
317  * end of file
318  */
Allows to setup and evaluate a general function based on SymbolicExpressions.
Definition: function_.hpp:59
returnValue evaluate(double t, double *result) const
Definition: curve.cpp:314
returnValue add(double tStart, double tEnd, const DVector constant)
Definition: curve.cpp:143
Provides a time grid consisting of vector-valued optimization variables at each grid point...
int getNumIntervals() const
Allows to pass back messages to the calling function.
BooleanType isInTimeDomain(double t) const
Definition: curve.cpp:445
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
Curve()
Definition: curve.cpp:45
uint nIntervals
Definition: curve.hpp:301
#define CLOSE_NAMESPACE_ACADO
uint dim
Definition: curve.hpp:302
Function ** parameterization
Definition: curve.hpp:303
Grid * grid
Definition: curve.hpp:304
~Curve()
Definition: curve.cpp:72
Curve & operator=(const Curve &arg)
Definition: curve.cpp:85
Allows to work with piecewise-continous function defined over a scalar time interval.
Definition: curve.hpp:52
returnValue getTimeDomain(double tStart, double tEnd) const
Definition: curve.cpp:410
Curve operator()(uint idx) const
Definition: curve.cpp:114
#define BEGIN_NAMESPACE_ACADO
returnValue discretize(const Grid &discretizationGrid, VariablesGrid &result) const
Definition: curve.cpp:392
BooleanType isContinuous() const
int getDim() const
BooleanType isEmpty() const
InterpolationMode


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