aligator  0.14.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
 
Loading...
Searching...
No Matches
aligator::ControlBoxFunctionTpl< _Scalar > Struct Template Reference

A simple function \(f(u) = [u_{\min} - u; u - u_{\max}]\). More...

#include <aligator/modelling/control-box-function.hpp>

Inheritance diagram for aligator::ControlBoxFunctionTpl< _Scalar >:
[legend]
Collaboration diagram for aligator::ControlBoxFunctionTpl< _Scalar >:
[legend]

Public Types

using Scalar = _Scalar
 
using Base = StageFunctionTpl<Scalar>
 
using Data = StageFunctionDataTpl<Scalar>
 
- Public Types inherited from aligator::StageFunctionTpl< _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< DatacreateData () const override
 Instantiate a Data object.
 
- Public Member Functions inherited from aligator::StageFunctionTpl< _Scalar >
 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_
 
- Public Attributes inherited from aligator::StageFunctionTpl< _Scalar >
const int ndx1
 Current state dimension.
 
const int nu
 Control dimension.
 
const int nr
 Function codimension.
 

Detailed Description

template<typename _Scalar>
struct aligator::ControlBoxFunctionTpl< _Scalar >

A simple function \(f(u) = [u_{\min} - u; u - u_{\max}]\).

Note
This function was initially meant to be used along with NegativeOrthantTpl to create control bound constraints. For this purpose, please use BoxConstraintTpl instead.
Deprecated
This class is not meant to be used anymore, and has been deprecated. It might be removed in the future. Use BoxContraintTpl to implement control bounds. See related note.

Definition at line 16 of file control-box-function.hpp.

Member Typedef Documentation

◆ Scalar

template<typename _Scalar>
using aligator::ControlBoxFunctionTpl< _Scalar >::Scalar = _Scalar

Definition at line 19 of file control-box-function.hpp.

◆ Base

template<typename _Scalar>
using aligator::ControlBoxFunctionTpl< _Scalar >::Base = StageFunctionTpl<Scalar>

Definition at line 21 of file control-box-function.hpp.

◆ Data

template<typename _Scalar>
using aligator::ControlBoxFunctionTpl< _Scalar >::Data = StageFunctionDataTpl<Scalar>

Definition at line 22 of file control-box-function.hpp.

Constructor & Destructor Documentation

◆ ControlBoxFunctionTpl() [1/2]

template<typename _Scalar>
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.

◆ ControlBoxFunctionTpl() [2/2]

template<typename _Scalar>
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.

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

template<typename _Scalar>
aligator::ControlBoxFunctionTpl< _Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS ( Scalar )

◆ evaluate()

template<typename _Scalar>
void aligator::ControlBoxFunctionTpl< _Scalar >::evaluate ( const ConstVectorRef & x,
const ConstVectorRef & u,
Data & data ) const
overridevirtual

Evaluate the function.

Parameters
xCurrent state.
uControls.
dataData holding struct.

Implements aligator::StageFunctionTpl< _Scalar >.

◆ computeJacobians()

template<typename _Scalar>
void aligator::ControlBoxFunctionTpl< _Scalar >::computeJacobians ( const ConstVectorRef & ,
const ConstVectorRef & ,
Data & data ) const
overridevirtual

Compute Jacobians of this function.

This implementation does nothing: the values of the Jacobians are already set in createData().

Implements aligator::StageFunctionTpl< _Scalar >.

◆ createData()

template<typename _Scalar>
virtual shared_ptr< Data > aligator::ControlBoxFunctionTpl< _Scalar >::createData ( ) const
overridevirtual

Instantiate a Data object.

This override sets the appropriate values of the Jacobians.

Reimplemented from aligator::StageFunctionTpl< _Scalar >.

Member Data Documentation

◆ umin_

template<typename _Scalar>
VectorXs aligator::ControlBoxFunctionTpl< _Scalar >::umin_

Definition at line 24 of file control-box-function.hpp.

◆ umax_

template<typename _Scalar>
VectorXs aligator::ControlBoxFunctionTpl< _Scalar >::umax_

Definition at line 24 of file control-box-function.hpp.


The documentation for this struct was generated from the following file: