Public Member Functions | Protected Member Functions | Protected Attributes | List of all members

Allows to simulate the behaviour of actuators within the Process. More...

#include <actuator.hpp>

Inheritance diagram for Actuator:
Inheritance graph
[legend]

Public Member Functions

 Actuator ()
 
 Actuator (uint _nU, uint _nP=0, double _samplingTime=DEFAULT_SAMPLING_TIME)
 
 Actuator (const Actuator &rhs)
 
double getControlDeadTime (uint idx) const
 
DVector getControlDeadTimes () const
 
NoisegetControlNoise (uint idx) const
 
uint getNP () const
 
uint getNU () const
 
double getParameterDeadTime (uint idx) const
 
DVector getParameterDeadTimes () const
 
NoisegetParameterNoise (uint idx) const
 
virtual returnValue init (double _startTime=0.0, const DVector &_startValueU=emptyConstVector, const DVector &_startValueP=emptyConstVector)
 
Actuatoroperator= (const Actuator &rhs)
 
returnValue setControlDeadTime (uint idx, double _deadTime)
 
returnValue setControlDeadTimes (const DVector &_deadTimes)
 
returnValue setControlDeadTimes (double _deadTime)
 
returnValue setControlNoise (const Noise &_noise, double _noiseSamplingTime)
 
returnValue setControlNoise (uint idx, const Noise &_noise, double _noiseSamplingTime)
 
returnValue setParameterDeadTime (uint idx, double _deadTime)
 
returnValue setParameterDeadTimes (const DVector &_deadTimes)
 
returnValue setParameterDeadTimes (double _deadTime)
 
returnValue setParameterNoise (const Noise &_noise, double _noiseSamplingTime)
 
returnValue setParameterNoise (uint idx, const Noise &_noise, double _noiseSamplingTime)
 
virtual returnValue step (VariablesGrid &_u, VariablesGrid &_p=emptyVariablesGrid)
 
virtual ~Actuator ()
 
- Public Member Functions inherited from TransferDevice
uint getDim () const
 
BooleanType hasDeadTime () const
 
BooleanType hasNoise () const
 
BooleanType isEmpty () const
 
TransferDeviceoperator= (const TransferDevice &rhs)
 
 TransferDevice ()
 
 TransferDevice (uint _dim, BlockName _name=BN_DEFAULT, double _samplingTime=DEFAULT_SAMPLING_TIME)
 
 TransferDevice (const TransferDevice &rhs)
 
virtual ~TransferDevice ()
 
- Public Member Functions inherited from SimulationBlock
BlockName getName () const
 
double getSamplingTime () const
 
BooleanType isDefined () const
 
SimulationBlockoperator= (const SimulationBlock &rhs)
 
returnValue setName (BlockName _name)
 
returnValue setSamplingTime (double _samplingTime)
 
 SimulationBlock ()
 
 SimulationBlock (BlockName _name, double _samplingTime=DEFAULT_SAMPLING_TIME)
 
 SimulationBlock (const SimulationBlock &rhs)
 
virtual ~SimulationBlock ()
 
- Public Member Functions inherited from UserInteraction
virtual int addPlotWindow (PlotWindow &_window)
 
virtual int operator<< (PlotWindow &_window)
 
virtual int operator<< (LogRecord &_record)
 
UserInteractionoperator= (const UserInteraction &rhs)
 
 UserInteraction ()
 
 UserInteraction (const UserInteraction &rhs)
 
virtual ~UserInteraction ()
 
- Public Member Functions inherited from Options
returnValue addOptionsList ()
 
returnValue ensureConsistency ()
 
returnValue ensureConsistency ()
 
returnValue get (OptionsName name, int &value) const
 
returnValue get (OptionsName name, double &value) const
 
returnValue get (OptionsName name, std::string &value) const
 
returnValue get (uint idx, OptionsName name, int &value) const
 
returnValue get (uint idx, OptionsName name, double &value) const
 
returnValue get (uint idx, OptionsName name, std::string &value) const
 
uint getNumOptionsLists () const
 
Options getOptions (uint idx) const
 
Optionsoperator= (const Options &rhs)
 
Optionsoperator= (const Options &rhs)
 
 Options ()
 
 Options ()
 
 Options (const Options &rhs)
 
 Options (const Options &rhs)
 
 Options ()
 
 Options (const OptionsList &_optionsList)
 
returnValue print () const
 
returnValue print () const
 
returnValue printOptionsList () const
 
returnValue printOptionsList (uint idx) const
 
returnValue set (OptionsName name, int value)
 
returnValue set (OptionsName name, double value)
 
returnValue set (OptionsName name, const std::string &value)
 
returnValue set (uint idx, OptionsName name, int value)
 
returnValue set (uint idx, OptionsName name, double value)
 
returnValue set (uint idx, OptionsName name, const std::string &value)
 
returnValue setOptions (const Options &arg)
 
returnValue setOptions (uint idx, const Options &arg)
 
returnValue setToDefault ()
 
returnValue setToDefault ()
 
returnValue setToFast ()
 
returnValue setToFast ()
 
returnValue setToMPC ()
 
returnValue setToReliable ()
 
returnValue setToReliable ()
 
 ~Options ()
 
 ~Options ()
 
virtual ~Options ()
 
- Public Member Functions inherited from Logging
int addLogRecord (LogRecord &record)
 
returnValue getAll (LogName _name, MatrixVariablesGrid &values) const
 
returnValue getFirst (LogName _name, DMatrix &firstValue) const
 
returnValue getFirst (LogName _name, VariablesGrid &firstValue) const
 
returnValue getLast (LogName _name, DMatrix &lastValue) const
 
returnValue getLast (LogName _name, VariablesGrid &lastValue) const
 
returnValue getLogRecord (LogRecord &_record) const
 
uint getNumLogRecords () const
 
 Logging ()
 
int operator<< (LogRecord &record)
 
returnValue printLoggingInfo () const
 
returnValue printNumDoubles () const
 
returnValue setAll (LogName _name, const MatrixVariablesGrid &values)
 
returnValue setLast (LogName _name, const DMatrix &value, double time=-INFTY)
 
returnValue setLast (LogName _name, VariablesGrid &value, double time=-INFTY)
 
returnValue updateLogRecord (LogRecord &_record) const
 
virtual ~Logging ()
 
- Public Member Functions inherited from Plotting
int addPlotWindow (PlotWindow &_window)
 
uint getNumPlotWindows () const
 
returnValue getPlotWindow (uint idx, PlotWindow &_window) const
 
returnValue getPlotWindow (PlotWindow &_window) const
 
int operator<< (PlotWindow &_window)
 
Plottingoperator= (const Plotting &rhs)
 
virtual returnValue plot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 
 Plotting ()
 
 Plotting (const Plotting &rhs)
 
virtual returnValue replot (PlotFrequency _frequency=PLOT_IN_ANY_CASE)
 
virtual ~Plotting ()
 

Protected Member Functions

returnValue addActuatorNoise (VariablesGrid &_u, VariablesGrid &_p) const
 
returnValue checkInputConsistency (const VariablesGrid &_u, const VariablesGrid &_p) const
 
returnValue delayActuatorInput (VariablesGrid &_u, VariablesGrid &_p)
 
returnValue getDelayedInputGrids (const VariablesGrid &_u, const VariablesGrid &_p, VariablesGrid &_uDelayed, VariablesGrid &_pDelayed) const
 
- Protected Member Functions inherited from TransferDevice
virtual returnValue generateNoise (double startTime, double endTime, VariablesGrid &currentNoise) const
 
virtual returnValue init (double _startTime=0.0, const DVector &_startValue=emptyConstVector)
 
- Protected Member Functions inherited from UserInteraction
virtual returnValue getPlotDataFromMemberLoggings (PlotWindow &_window) const
 
BlockStatus getStatus () const
 
returnValue setStatus (BlockStatus _status)
 
- Protected Member Functions inherited from Options
returnValue addOption (OptionsName name, int value)
 
returnValue addOption (OptionsName name, double value)
 
returnValue addOption (OptionsName name, const std::string &value)
 
returnValue addOption (uint idx, OptionsName name, int value)
 
returnValue addOption (uint idx, OptionsName name, double value)
 
returnValue addOption (uint idx, OptionsName name, const std::string &value)
 
returnValue clearOptionsList ()
 
returnValue copy (const Options &rhs)
 
returnValue copy (const Options &rhs)
 
returnValue declareOptionsUnchanged ()
 
returnValue declareOptionsUnchanged (uint idx)
 
BooleanType haveOptionsChanged () const
 
BooleanType haveOptionsChanged (uint idx) const
 
virtual returnValue setupOptions ()
 
- Protected Member Functions inherited from Logging
virtual returnValue setupLogging ()
 

Protected Attributes

uint nP
 
uint nU
 
- Protected Attributes inherited from TransferDevice
Noise ** additiveNoise
 
DVector deadTimes
 
VariablesGrid lastSignal
 
DVector noiseSamplingTimes
 
- Protected Attributes inherited from SimulationBlock
BlockName name
 
RealClock realClock
 
double samplingTime
 
- Protected Attributes inherited from UserInteraction
BlockStatus status
 
- Protected Attributes inherited from Options
std::vector< OptionsListlists
 
- Protected Attributes inherited from Logging
std::vector< LogRecordlogCollection
 
int logIdx
 
- Protected Attributes inherited from Plotting
PlotCollection plotCollection
 

Additional Inherited Members

- Public Attributes inherited from Options
real_t boundRelaxation
 
real_t boundTolerance
 
int dropBoundPriority
 
int_t dropBoundPriority
 
int dropEqConPriority
 
int_t dropEqConPriority
 
int dropIneqConPriority
 
int_t dropIneqConPriority
 
int enableCholeskyRefactorisation
 
int_t enableCholeskyRefactorisation
 
int enableDriftCorrection
 
int_t enableDriftCorrection
 
BooleanType enableDropInfeasibles
 
BooleanType enableEqualities
 
BooleanType enableFarBounds
 
BooleanType enableFlippingBounds
 
BooleanType enableFullLITests
 
BooleanType enableInertiaCorrection
 
BooleanType enableNZCTests
 
BooleanType enableRamping
 
BooleanType enableRegularisation
 
real_t epsDen
 
real_t epsFlipping
 
real_t epsIterRef
 
real_t epsLITests
 
real_t epsNum
 
real_t epsNZCTests
 
real_t epsRegularisation
 
real_t finalRamping
 
real_t growFarBounds
 
real_t initialFarBounds
 
real_t initialRamping
 
SubjectToStatus initialStatusBounds
 
real_t maxDualJump
 
real_t maxPrimalJump
 
int numRefinementSteps
 
int_t numRefinementSteps
 
int numRegularisationSteps
 
int_t numRegularisationSteps
 
PrintLevel printLevel
 
real_t rcondSMin
 
real_t terminationTolerance
 

Detailed Description

Allows to simulate the behaviour of actuators within the Process.

The class Actuator allows to simulate the behaviour of actuators within the Process.

Author
Hans Joachim Ferreau, Boris Houska

Definition at line 54 of file actuator.hpp.

Constructor & Destructor Documentation

BEGIN_NAMESPACE_ACADO Actuator::Actuator ( )

Default constructor.

Definition at line 46 of file actuator.cpp.

Actuator::Actuator ( uint  _nU,
uint  _nP = 0,
double  _samplingTime = DEFAULT_SAMPLING_TIME 
)

Constructor which takes the number of process inputs and the sampling time.

@param[in] _nU                              Number of control inputs to the process.
@param[in] _nP                              Number of parameter inputs to the process.
@param[in] _samplingTime    Sampling time.

Definition at line 53 of file actuator.cpp.

Actuator::Actuator ( const Actuator rhs)

Copy constructor (deep copy).

@param[in] rhs      Right-hand side object.

Definition at line 63 of file actuator.cpp.

Actuator::~Actuator ( )
virtual

Destructor.

Definition at line 70 of file actuator.cpp.

Member Function Documentation

returnValue Actuator::addActuatorNoise ( VariablesGrid _u,
VariablesGrid _p 
) const
protected

Adds noise to given signals.

@param[in,out]  _u          Actuator control signal to be noised.
@param[in,out]  _p          Actuator parameter signal to be noised.
Returns
SUCCESSFUL_RETURN,
RET_GENERATING_NOISE_FAILED

Definition at line 498 of file actuator.cpp.

returnValue Actuator::checkInputConsistency ( const VariablesGrid _u,
const VariablesGrid _p 
) const
protected

Checks whether the two actuator signal are valid and compatible.

@param[in]  _u              Actuator control signal.
@param[in]  _p              Actuator parameter signal.
Returns
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS,
RET_CONTROL_DIMENSION_MISMATCH,
RET_PARAMETER_DIMENSION_MISMATCH

Definition at line 340 of file actuator.cpp.

returnValue Actuator::delayActuatorInput ( VariablesGrid _u,
VariablesGrid _p 
)
protected

Delays given signals according to the internal dead times.

@param[in,out]  _u          Actuator control signal to be delayed.
@param[in,out]  _p          Actuator parameter signal to be delayed.
Returns
SUCCESSFUL_RETURN,
RET_DELAYING_INPUTS_FAILED

Definition at line 375 of file actuator.cpp.

double Actuator::getControlDeadTime ( uint  idx) const
inline

Returns dead time of given component of the actuator control signal.

@param[in]  idx                     Index of component.
Returns
Dead time of given component
DVector Actuator::getControlDeadTimes ( ) const
inline

Returns dead times of the actuator control signal.

Returns
Dead times of actuator control signal
Noise* Actuator::getControlNoise ( uint  idx) const
inline

Returns pointer to additive noise of given component of the actuator control signal.

@param[in]  idx                     Index of component.
Returns
Pointer to additive noise of given component
returnValue Actuator::getDelayedInputGrids ( const VariablesGrid _u,
const VariablesGrid _p,
VariablesGrid _uDelayed,
VariablesGrid _pDelayed 
) const
protected

Returns time grids for representing the given actuator signals in delayed form.

Parameters
[in]_uActuator control signal to be delayed.
[in]_pActuator parameter signal to be delayed.
[out]_uDelayedTime grid for representing delayed actuator control signal.
[out]_pDelayedTime grid for representing delayed actuator parameter signal.
Returns
SUCCESSFUL_RETURN

Definition at line 434 of file actuator.cpp.

uint Actuator::getNP ( ) const
inline

Returns number of actuator parameter signal components.

\return Number of actuator parameter signal components.
uint Actuator::getNU ( ) const
inline

Returns number of actuator control signal components.

\return Number of actuator control signal components.
double Actuator::getParameterDeadTime ( uint  idx) const
inline

Returns dead time of given component of the actuator parameter signal.

@param[in]  idx                     Index of component.
Returns
Dead time of given component
DVector Actuator::getParameterDeadTimes ( ) const
inline

Returns dead times of the actuator parameter signal.

Returns
Dead times of actuator parameter signal
Noise* Actuator::getParameterNoise ( uint  idx) const
inline

Returns pointer to additive noise of given component of the actuator parameter signal.

@param[in]  idx                     Index of component.
Returns
Pointer to additive noise of given component
returnValue Actuator::init ( double  _startTime = 0.0,
const DVector _startValueU = emptyConstVector,
const DVector _startValueP = emptyConstVector 
)
virtual

Initializes all components of the actuator and the lastSignal member based on the given start information.

Parameters
[in]_startTimeStart time.
[in]_startValueUInitial value of the actuator control signal.
[in]_startValuePInitial value of the actuator parameter signal.
Returns
SUCCESSFUL_RETURN

Definition at line 286 of file actuator.cpp.

Actuator & Actuator::operator= ( const Actuator rhs)

Assignment operator (deep copy).

@param[in] rhs      Right-hand side object.

Definition at line 75 of file actuator.cpp.

returnValue Actuator::setControlDeadTime ( uint  idx,
double  _deadTime 
)

Assigns new dead time to given component of the actuator control signal.

@param[in]  idx                                     Index of component.
@param[in]  _deadTimes                      New dead time.
Returns
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS,
RET_MEMBER_NOT_INITIALISED

Definition at line 211 of file actuator.cpp.

returnValue Actuator::setControlDeadTimes ( const DVector _deadTimes)

Assigns new dead times to each component of the actuator control signal.

@param[in]  _deadTimes                      New dead times.
Returns
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS,
RET_MEMBER_NOT_INITIALISED

Definition at line 176 of file actuator.cpp.

returnValue Actuator::setControlDeadTimes ( double  _deadTime)

Assigns new dead time to all components of the actuator control signal.

@param[in]  _deadTime                       New dead time.
Returns
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS,
RET_MEMBER_NOT_INITIALISED

Definition at line 195 of file actuator.cpp.

returnValue Actuator::setControlNoise ( const Noise _noise,
double  _noiseSamplingTime 
)

Assigns new additive noise with given sampling time to all components of the actuator control signal.

Parameters
[in]_noiseNew additive noise.
[in]_noiseSamplingTimeNew noise sampling time.
Returns
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS

Definition at line 89 of file actuator.cpp.

returnValue Actuator::setControlNoise ( uint  idx,
const Noise _noise,
double  _noiseSamplingTime 
)

Assigns new additive noise with given sampling time to given component of the actuator control signal.

Parameters
[in]idxIndex of component.
[in]_noiseNew additive noise.
[in]_noiseSamplingTimeNew noise sampling time.
Returns
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS

Definition at line 110 of file actuator.cpp.

returnValue Actuator::setParameterDeadTime ( uint  idx,
double  _deadTime 
)

Assigns new dead time to given component of the actuator parameter signal.

@param[in]  idx                                     Index of component.
@param[in]  _deadTimes                      New dead time.
Returns
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS,
RET_MEMBER_NOT_INITIALISED

Definition at line 266 of file actuator.cpp.

returnValue Actuator::setParameterDeadTimes ( const DVector _deadTimes)

Assigns new dead times to each component of the actuator parameter signal.

@param[in]  _deadTimes                      New dead times.
Returns
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS,
RET_MEMBER_NOT_INITIALISED

Definition at line 231 of file actuator.cpp.

returnValue Actuator::setParameterDeadTimes ( double  _deadTime)

Assigns new dead time to all components of the actuator parameter signal.

@param[in]  _deadTime                       New dead time.
Returns
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS,
RET_MEMBER_NOT_INITIALISED

Definition at line 250 of file actuator.cpp.

returnValue Actuator::setParameterNoise ( const Noise _noise,
double  _noiseSamplingTime 
)

Assigns new additive noise with given sampling time to all components of the actuator parameter signal.

Parameters
[in]_noiseNew additive noise.
[in]_noiseSamplingTimeNew noise sampling time.
Returns
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS

Definition at line 132 of file actuator.cpp.

returnValue Actuator::setParameterNoise ( uint  idx,
const Noise _noise,
double  _noiseSamplingTime 
)

Assigns new additive noise with given sampling time to given component of the actuator parameter signal.

Parameters
[in]idxIndex of component.
[in]_noiseNew additive noise.
[in]_noiseSamplingTimeNew noise sampling time.
Returns
SUCCESSFUL_RETURN,
RET_INVALID_ARGUMENTS

Definition at line 153 of file actuator.cpp.

returnValue Actuator::step ( VariablesGrid _u,
VariablesGrid _p = emptyVariablesGrid 
)
virtual

Performs one step of the actuator transforming the given signals according to the internal actuator settings.

Parameters
[in,out]_uActuator control signal to be transformed.
[in,out]_pActuator parameter signal to be transformed.
Returns
SUCCESSFUL_RETURN,
RET_BLOCK_NOT_READY,
RET_INVALID_ARGUMENTS,
RET_ACTUATOR_STEP_FAILED

Definition at line 307 of file actuator.cpp.

Member Data Documentation

uint Actuator::nP
protected

Number of actuator parameter signal components.

Definition at line 390 of file actuator.hpp.

uint Actuator::nU
protected

Number of actuator control signal components.

Definition at line 389 of file actuator.hpp.


The documentation for this class was generated from the following files:


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