actuator.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_ACTUATOR_HPP
34 #define ACADO_TOOLKIT_ACTUATOR_HPP
35 
36 
39 
40 
42 
43 
54 class Actuator : public TransferDevice
55 {
56  //
57  // PUBLIC MEMBER FUNCTIONS:
58  //
59  public:
60 
63  Actuator( );
64 
71  Actuator( uint _nU,
72  uint _nP = 0,
73  double _samplingTime = DEFAULT_SAMPLING_TIME
74  );
75 
80  Actuator( const Actuator& rhs
81  );
82 
85  virtual ~Actuator( );
86 
91  Actuator& operator=( const Actuator& rhs
92  );
93 
94 
104  returnValue setControlNoise( const Noise& _noise,
105  double _noiseSamplingTime
106  );
107 
119  const Noise& _noise,
120  double _noiseSamplingTime
121  );
122 
123 
133  returnValue setParameterNoise( const Noise& _noise,
134  double _noiseSamplingTime
135  );
136 
148  const Noise& _noise,
149  double _noiseSamplingTime
150  );
151 
152 
161  returnValue setControlDeadTimes( const DVector& _deadTimes
162  );
163 
172  returnValue setControlDeadTimes( double _deadTime
173  );
174 
185  double _deadTime
186  );
187 
188 
197  returnValue setParameterDeadTimes( const DVector& _deadTimes
198  );
199 
208  returnValue setParameterDeadTimes( double _deadTime
209  );
210 
221  double _deadTime
222  );
223 
224 
234  virtual returnValue init( double _startTime = 0.0,
235  const DVector& _startValueU = emptyConstVector,
236  const DVector& _startValueP = emptyConstVector
237  );
238 
239 
251  virtual returnValue step( VariablesGrid& _u,
253  );
254 
255 
260  inline uint getNU( ) const;
261 
266  inline uint getNP( ) const;
267 
268 
275  inline Noise* getControlNoise( uint idx
276  ) const;
277 
284  inline Noise* getParameterNoise( uint idx
285  ) const;
286 
287 
294  inline double getControlDeadTime( uint idx
295  ) const;
296 
301  inline DVector getControlDeadTimes( ) const;
302 
303 
310  inline double getParameterDeadTime( uint idx
311  ) const;
312 
317  inline DVector getParameterDeadTimes( ) const;
318 
319 
320 
321  //
322  // PROTECTED MEMBER FUNCTIONS:
323  //
324  protected:
325 
337  const VariablesGrid& _p
338  ) const;
339 
340 
350  VariablesGrid& _p
351  );
352 
364  const VariablesGrid& _p,
365  VariablesGrid& _uDelayed,
366  VariablesGrid& _pDelayed
367  ) const;
368 
369 
379  VariablesGrid& _p
380  ) const;
381 
382 
383 
384  //
385  // DATA MEMBERS:
386  //
387  protected:
388 
391 };
392 
393 
395 
396 
397 #include <acado/transfer_device/actuator.ipp>
398 
399 
400 #endif // ACADO_TOOLKIT_ACTUATOR_HPP
401 
402 /*
403  * end of file
404  */
returnValue setParameterNoise(const Noise &_noise, double _noiseSamplingTime)
Definition: actuator.cpp:132
Noise * getParameterNoise(uint idx) const
returnValue delayActuatorInput(VariablesGrid &_u, VariablesGrid &_p)
Definition: actuator.cpp:375
returnValue setParameterDeadTime(uint idx, double _deadTime)
Definition: actuator.cpp:266
returnValue addActuatorNoise(VariablesGrid &_u, VariablesGrid &_p) const
Definition: actuator.cpp:498
returnValue setParameterDeadTimes(const DVector &_deadTimes)
Definition: actuator.cpp:231
Provides a time grid consisting of vector-valued optimization variables at each grid point...
Allows to pass back messages to the calling function.
DVector getControlDeadTimes() const
Base class for generating pseudo-random noise for simulating the Process.
Definition: noise.hpp:56
BEGIN_NAMESPACE_ACADO typedef unsigned int uint
Definition: acado_types.hpp:42
uint nP
Definition: actuator.hpp:390
uint getNP() const
#define CLOSE_NAMESPACE_ACADO
double getParameterDeadTime(uint idx) const
Actuator & operator=(const Actuator &rhs)
Definition: actuator.cpp:75
CLOSE_NAMESPACE_ACADO static BEGIN_NAMESPACE_ACADO VariablesGrid emptyVariablesGrid
returnValue checkInputConsistency(const VariablesGrid &_u, const VariablesGrid &_p) const
Definition: actuator.cpp:340
static const DVector emptyConstVector
Definition: vector.hpp:336
returnValue setControlDeadTime(uint idx, double _deadTime)
Definition: actuator.cpp:211
uint getNU() const
double getControlDeadTime(uint idx) const
void rhs(const real_t *x, real_t *f)
virtual returnValue init(double _startTime=0.0, const DVector &_startValueU=emptyConstVector, const DVector &_startValueP=emptyConstVector)
Definition: actuator.cpp:286
Noise * getControlNoise(uint idx) const
const double DEFAULT_SAMPLING_TIME
returnValue getDelayedInputGrids(const VariablesGrid &_u, const VariablesGrid &_p, VariablesGrid &_uDelayed, VariablesGrid &_pDelayed) const
Definition: actuator.cpp:434
uint nU
Definition: actuator.hpp:389
DVector getParameterDeadTimes() const
#define BEGIN_NAMESPACE_ACADO
returnValue setControlNoise(const Noise &_noise, double _noiseSamplingTime)
Definition: actuator.cpp:89
Allows to simulate the behaviour of actuators within the Process.
Definition: actuator.hpp:54
virtual ~Actuator()
Definition: actuator.cpp:70
virtual returnValue step(VariablesGrid &_u, VariablesGrid &_p=emptyVariablesGrid)
Definition: actuator.cpp:307
Actuator()
Definition: actuator.cpp:46
Base class for simulating Actuator and Sensor behaviour wihtin the Process.
returnValue setControlDeadTimes(const DVector &_deadTimes)
Definition: actuator.cpp:176


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