ACADO Toolkit
1.2.0beta
Toolkit for Automatic Control and Dynamic Optimization
|
Allows to define a simulated reference trajectory that the ControlLaw aims to track. More...
#include <simulated_reference_trajectory.hpp>
Public Member Functions | |
SimulatedReferenceTrajectory () | |
Default constructor. | |
SimulatedReferenceTrajectory (const DynamicSystem &_dynamicSystem, IntegratorType _integratorType=INT_UNKNOWN) | |
Default constructor. | |
SimulatedReferenceTrajectory (const SimulatedReferenceTrajectory &rhs) | |
Copy constructor (deep copy). | |
virtual | ~SimulatedReferenceTrajectory () |
Destructor. | |
SimulatedReferenceTrajectory & | operator= (const SimulatedReferenceTrajectory &rhs) |
Assignment operator (deep copy). | |
virtual ReferenceTrajectory * | clone () const |
Clone constructor (deep copy). | |
virtual returnValue | init (double startTime=0.0, const Vector &_x=emptyConstVector, const Vector &_xa=emptyConstVector, const Vector &_u=emptyConstVector, const Vector &_p=emptyConstVector, const Vector &_w=emptyConstVector) |
Initializes the reference trajectory evaluation based on the given inputs. | |
virtual returnValue | step (double _currentTime, const Vector &_y, const Vector &_x=emptyConstVector, const Vector &_xa=emptyConstVector, const Vector &_u=emptyConstVector, const Vector &_p=emptyConstVector, const Vector &_w=emptyConstVector) |
Updates the reference trajectory evaluation based on the given inputs. | |
virtual returnValue | step (const Vector &_x, const VariablesGrid &_u=emptyConstVariablesGrid, const VariablesGrid &_p=emptyConstVariablesGrid, const VariablesGrid &_w=emptyConstVariablesGrid) |
Updates the reference trajectory evaluation based on the given inputs. | |
virtual returnValue | getReference (double tStart, double tEnd, VariablesGrid &_yRef) const |
Returns a piece of the reference trajectory starting and ending at given times. | |
virtual uint | getDim () const |
Returns dimension of reference trajectory. | |
BooleanType | isDefined () const |
Returns whether reference trajectory is defined (i.e. | |
Protected Attributes | |
Process * | process |
The class SimulatedReferenceTrajectory allows to define an reference trajectory that is determined online based on the simulation of a dynamic system. The ControlLaw can aim to track this reference trajectory while computing its control action.
SimulatedReferenceTrajectory::SimulatedReferenceTrajectory | ( | const DynamicSystem & | _dynamicSystem, |
IntegratorType | _integratorType = INT_UNKNOWN |
||
) |
References process.
SimulatedReferenceTrajectory::SimulatedReferenceTrajectory | ( | const SimulatedReferenceTrajectory & | rhs | ) |
[in] | rhs | Right-hand side object. |
References process.
References process.
ReferenceTrajectory * SimulatedReferenceTrajectory::clone | ( | ) | const [virtual] |
Implements AdaptiveReferenceTrajectory.
References SimulatedReferenceTrajectory().
uint SimulatedReferenceTrajectory::getDim | ( | ) | const [virtual] |
Reimplemented from AdaptiveReferenceTrajectory.
References Process::getNY(), and process.
returnValue SimulatedReferenceTrajectory::getReference | ( | double | tStart, |
double | tEnd, | ||
VariablesGrid & | _yRef | ||
) | const [virtual] |
[in] | tStart | Start time of reference piece. |
[in] | tEnd | End time of reference piece. |
[out] | _yRef | Desired piece of the reference trajectory. |
Implements AdaptiveReferenceTrajectory.
References ACADOERROR, and RET_NOT_YET_IMPLEMENTED.
returnValue SimulatedReferenceTrajectory::init | ( | double | startTime = 0.0 , |
const Vector & | _x = emptyConstVector , |
||
const Vector & | _xa = emptyConstVector , |
||
const Vector & | _u = emptyConstVector , |
||
const Vector & | _p = emptyConstVector , |
||
const Vector & | _w = emptyConstVector |
||
) | [virtual] |
[in] | _startTime | Start time. |
[in] | _x | Initial value for differential states. |
[in] | _xa | Initial value for algebraic states. |
[in] | _u | Initial value for controls. |
[in] | _p | Initial value for parameters. |
[in] | _w | Initial value for disturbances. |
Implements AdaptiveReferenceTrajectory.
References ACADOERROR, and RET_NOT_YET_IMPLEMENTED.
BEGIN_NAMESPACE_ACADO BooleanType ReferenceTrajectory::isDefined | ( | ) | const [inline, inherited] |
has positive dimension).
References BT_FALSE, BT_TRUE, and ReferenceTrajectory::getDim().
Referenced by Controller::Controller(), and Controller::setReferenceTrajectory().
SimulatedReferenceTrajectory & SimulatedReferenceTrajectory::operator= | ( | const SimulatedReferenceTrajectory & | rhs | ) |
[in] | rhs | Right-hand side object. |
References process.
returnValue SimulatedReferenceTrajectory::step | ( | double | _currentTime, |
const Vector & | _y, | ||
const Vector & | _x = emptyConstVector , |
||
const Vector & | _xa = emptyConstVector , |
||
const Vector & | _u = emptyConstVector , |
||
const Vector & | _p = emptyConstVector , |
||
const Vector & | _w = emptyConstVector |
||
) | [virtual] |
[in] | _currentTime | Start time. |
[in] | _y | Current process output. |
[in] | _x | Estimated current value for differential states. |
[in] | _xa | Estimated current value for algebraic states. |
[in] | _u | Estimated current value for controls. |
[in] | _p | Estimated current value for parameters. |
[in] | _w | Estimated current value for disturbances. |
Implements AdaptiveReferenceTrajectory.
References ACADOERROR, and RET_NOT_YET_IMPLEMENTED.
returnValue SimulatedReferenceTrajectory::step | ( | const Vector & | _x, |
const VariablesGrid & | _u = emptyConstVariablesGrid , |
||
const VariablesGrid & | _p = emptyConstVariablesGrid , |
||
const VariablesGrid & | _w = emptyConstVariablesGrid |
||
) | [virtual] |
[in] | _x | Estimated current value for differential states. |
[in] | _u | Estimated current time-varying value for controls. |
[in] | _p | Estimated current time-varying value for parameters. |
[in] | _w | Estimated current time-varying value for disturbances. |
Implements AdaptiveReferenceTrajectory.
References SUCCESSFUL_RETURN.
Process* SimulatedReferenceTrajectory::process [protected] |
Referenced by getDim(), operator=(), SimulatedReferenceTrajectory(), and ~SimulatedReferenceTrajectory().