A simple function \(f(u) = [u_{\min} - u; u - u_{\max}]\). More...
#include <aligator/modelling/control-box-function.hpp>
Public Types | |
using | Scalar = _Scalar |
using | Base = StageFunctionTpl<Scalar> |
using | Data = StageFunctionDataTpl<Scalar> |
![]() | |
using | Scalar = _Scalar |
using | Data = StageFunctionDataTpl<Scalar> |
Public Member Functions | |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
ControlBoxFunctionTpl (const int ndx, const VectorXs &umin, const VectorXs &umax) | |
Standard constructor: takes state space dimension and desired control bounds as vectors. | |
ControlBoxFunctionTpl (const int ndx, const int nu, const Scalar umin, const Scalar umax) | |
Constructor which takes control bounds as scalars cast into vectors of appropriate dimension. | |
void | evaluate (const ConstVectorRef &, const ConstVectorRef &u, Data &data) const override |
Evaluate the function. | |
void | computeJacobians (const ConstVectorRef &, const ConstVectorRef &, Data &data) const override |
Compute Jacobians of this function. | |
virtual shared_ptr< Data > | createData () const override |
Instantiate a Data object. | |
![]() | |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
StageFunctionTpl (const int ndx, const int nu, const int nr) | |
virtual void | computeVectorHessianProducts (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &lbda, Data &data) const |
Compute the vector-hessian products of this function. | |
virtual | ~StageFunctionTpl ()=default |
Public Attributes | |
VectorXs | umin_ |
VectorXs | umax_ |
![]() | |
const int | ndx1 |
Current state dimension. | |
const int | nu |
Control dimension. | |
const int | nr |
Function codimension. | |
A simple function \(f(u) = [u_{\min} - u; u - u_{\max}]\).
Definition at line 16 of file control-box-function.hpp.
using aligator::ControlBoxFunctionTpl< _Scalar >::Scalar = _Scalar |
Definition at line 19 of file control-box-function.hpp.
using aligator::ControlBoxFunctionTpl< _Scalar >::Base = StageFunctionTpl<Scalar> |
Definition at line 21 of file control-box-function.hpp.
using aligator::ControlBoxFunctionTpl< _Scalar >::Data = StageFunctionDataTpl<Scalar> |
Definition at line 22 of file control-box-function.hpp.
aligator::ControlBoxFunctionTpl< _Scalar >::ControlBoxFunctionTpl | ( | const int | ndx, |
const VectorXs & | umin, | ||
const VectorXs & | umax ) |
Standard constructor: takes state space dimension and desired control bounds as vectors.
aligator::ControlBoxFunctionTpl< _Scalar >::ControlBoxFunctionTpl | ( | const int | ndx, |
const int | nu, | ||
const Scalar | umin, | ||
const Scalar | umax ) |
Constructor which takes control bounds as scalars cast into vectors of appropriate dimension.
aligator::ControlBoxFunctionTpl< _Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS | ( | Scalar | ) |
|
overridevirtual |
Evaluate the function.
x | Current state. |
u | Controls. |
data | Data holding struct. |
Implements aligator::StageFunctionTpl< _Scalar >.
|
overridevirtual |
Compute Jacobians of this function.
This implementation does nothing: the values of the Jacobians are already set in createData().
Implements aligator::StageFunctionTpl< _Scalar >.
|
overridevirtual |
Instantiate a Data object.
This override sets the appropriate values of the Jacobians.
Reimplemented from aligator::StageFunctionTpl< _Scalar >.
VectorXs aligator::ControlBoxFunctionTpl< _Scalar >::umin_ |
Definition at line 24 of file control-box-function.hpp.
VectorXs aligator::ControlBoxFunctionTpl< _Scalar >::umax_ |
Definition at line 24 of file control-box-function.hpp.