aligator  0.6.1
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
aligator::detail::StateOrControlErrorResidual< _Scalar, arg > Struct Template Reference

Residual \(r(z) = z \ominus z_{tar} \). More...

#include <aligator/modelling/state-error.hpp>

Inheritance diagram for aligator::detail::StateOrControlErrorResidual< _Scalar, arg >:
[legend]
Collaboration diagram for aligator::detail::StateOrControlErrorResidual< _Scalar, arg >:
[legend]

Public Types

using Scalar = _Scalar
 
using Base = StageFunctionTpl<Scalar>
 
using Data = StageFunctionDataTpl<Scalar>
 
using Manifold = ManifoldAbstractTpl<Scalar>
 
using VectorSpace = proxsuite::nlp::VectorSpaceTpl<Scalar, Eigen::Dynamic>
 
- Public Types inherited from aligator::StageFunctionTpl< _Scalar >
using Scalar = _Scalar
 
using Data = StageFunctionDataTpl<Scalar>
 

Public Member Functions

 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
template<unsigned int N = arg, typename = std::enable_if_t<N == 2>>
 StateOrControlErrorResidual (const shared_ptr< Manifold > &xspace, const int nu, const ConstVectorRef &target)
 Constructor using the state space, control dimension and state target.
 
template<unsigned int N = arg, typename = std::enable_if_t<N == 1>>
 StateOrControlErrorResidual (const int ndx, const shared_ptr< Manifold > &uspace, const ConstVectorRef &target)
 Constructor using the state space dimension, control manifold and control target.
 
template<unsigned int N = arg, typename = std::enable_if_t<N == 1>>
 StateOrControlErrorResidual (const int ndx, const ConstVectorRef &target)
 Constructor using state space and control space dimensions, the control space is assumed to be Euclidean.
 
template<unsigned int N = arg, typename = std::enable_if_t<N == 1>>
 StateOrControlErrorResidual (const int ndx, const int nu)
 
void evaluate (const ConstVectorRef &, const ConstVectorRef &u, const ConstVectorRef &y, Data &data) const
 Evaluate the function.
 
void computeJacobians (const ConstVectorRef &, const ConstVectorRef &u, const ConstVectorRef &y, Data &data) const
 Compute Jacobians of this function.
 
- Public Member Functions inherited from aligator::StageFunctionTpl< _Scalar >
 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
 StageFunctionTpl (const int ndx1, const int nu, const int ndx2, const int nr)
 
 StageFunctionTpl (const int ndx, const int nu, const int nr)
 Constructor where ndx2 = ndx1.
 
virtual void computeVectorHessianProducts (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, const ConstVectorRef &lbda, Data &data) const
 Compute the vector-hessian products of this function.
 
virtual ~StageFunctionTpl ()=default
 
virtual shared_ptr< DatacreateData () const
 Instantiate a Data object.
 

Public Attributes

shared_ptr< Manifoldspace_
 
VectorXs target_
 
- Public Attributes inherited from aligator::StageFunctionTpl< _Scalar >
const int ndx1
 Current state dimension.
 
const int nu
 Control dimension.
 
const int ndx2
 Next state dimension.
 
const int nr
 Function codimension.
 

Detailed Description

template<typename _Scalar, unsigned int arg>
struct aligator::detail::StateOrControlErrorResidual< _Scalar, arg >

Residual \(r(z) = z \ominus z_{tar} \).

The arg parameter decides with respect to which the error computation operates – state x or control u.. We use SFINAE to enable or disable the relevant constructors.

Definition at line 51 of file state-error.hpp.

Member Typedef Documentation

◆ Scalar

template<typename _Scalar , unsigned int arg>
using aligator::detail::StateOrControlErrorResidual< _Scalar, arg >::Scalar = _Scalar

Definition at line 53 of file state-error.hpp.

◆ Base

template<typename _Scalar , unsigned int arg>
using aligator::detail::StateOrControlErrorResidual< _Scalar, arg >::Base = StageFunctionTpl<Scalar>

Definition at line 55 of file state-error.hpp.

◆ Data

template<typename _Scalar , unsigned int arg>
using aligator::detail::StateOrControlErrorResidual< _Scalar, arg >::Data = StageFunctionDataTpl<Scalar>

Definition at line 56 of file state-error.hpp.

◆ Manifold

template<typename _Scalar , unsigned int arg>
using aligator::detail::StateOrControlErrorResidual< _Scalar, arg >::Manifold = ManifoldAbstractTpl<Scalar>

Definition at line 57 of file state-error.hpp.

◆ VectorSpace

template<typename _Scalar , unsigned int arg>
using aligator::detail::StateOrControlErrorResidual< _Scalar, arg >::VectorSpace = proxsuite::nlp::VectorSpaceTpl<Scalar, Eigen::Dynamic>

Definition at line 58 of file state-error.hpp.

Constructor & Destructor Documentation

◆ StateOrControlErrorResidual() [1/4]

template<typename Scalar , unsigned int arg>
template<unsigned int N, typename >
aligator::detail::StateOrControlErrorResidual< Scalar, arg >::StateOrControlErrorResidual ( const shared_ptr< Manifold > & xspace,
const int nu,
const ConstVectorRef & target )

Constructor using the state space, control dimension and state target.

Definition at line 132 of file state-error.hpp.

◆ StateOrControlErrorResidual() [2/4]

template<typename _Scalar , unsigned int arg>
template<unsigned int N = arg, typename = std::enable_if_t<N == 1>>
aligator::detail::StateOrControlErrorResidual< _Scalar, arg >::StateOrControlErrorResidual ( const int ndx,
const shared_ptr< Manifold > & uspace,
const ConstVectorRef & target )
inline

Constructor using the state space dimension, control manifold and control target.

Definition at line 72 of file state-error.hpp.

◆ StateOrControlErrorResidual() [3/4]

template<typename _Scalar , unsigned int arg>
template<unsigned int N = arg, typename = std::enable_if_t<N == 1>>
aligator::detail::StateOrControlErrorResidual< _Scalar, arg >::StateOrControlErrorResidual ( const int ndx,
const ConstVectorRef & target )
inline

Constructor using state space and control space dimensions, the control space is assumed to be Euclidean.

Definition at line 82 of file state-error.hpp.

◆ StateOrControlErrorResidual() [4/4]

template<typename _Scalar , unsigned int arg>
template<unsigned int N = arg, typename = std::enable_if_t<N == 1>>
aligator::detail::StateOrControlErrorResidual< _Scalar, arg >::StateOrControlErrorResidual ( const int ndx,
const int nu )
inline

Definition at line 87 of file state-error.hpp.

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

template<typename _Scalar , unsigned int arg>
aligator::detail::StateOrControlErrorResidual< _Scalar, arg >::ALIGATOR_DYNAMIC_TYPEDEFS ( Scalar )

◆ evaluate()

template<typename _Scalar , unsigned int arg>
void aligator::detail::StateOrControlErrorResidual< _Scalar, arg >::evaluate ( const ConstVectorRef & x,
const ConstVectorRef & u,
const ConstVectorRef & y,
Data & data ) const
inlinevirtual

Evaluate the function.

Parameters
xCurrent state.
uControls.
yNext state.
dataData holding struct.

Implements aligator::StageFunctionTpl< _Scalar >.

Definition at line 93 of file state-error.hpp.

◆ computeJacobians()

template<typename _Scalar , unsigned int arg>
void aligator::detail::StateOrControlErrorResidual< _Scalar, arg >::computeJacobians ( const ConstVectorRef & x,
const ConstVectorRef & u,
const ConstVectorRef & y,
Data & data ) const
inlinevirtual

Compute Jacobians of this function.

This computes the Jacobians \( (\frac{\partial f}{\partial x}, \frac{\partial f}{\partial u}, \frac{\partial f}{\partial x'}) \)

Parameters
xCurrent state.
uControls.
yNext state.
dataData holding struct.

Implements aligator::StageFunctionTpl< _Scalar >.

Definition at line 107 of file state-error.hpp.

Member Data Documentation

◆ space_

template<typename _Scalar , unsigned int arg>
shared_ptr<Manifold> aligator::detail::StateOrControlErrorResidual< _Scalar, arg >::space_

Definition at line 60 of file state-error.hpp.

◆ target_

template<typename _Scalar , unsigned int arg>
VectorXs aligator::detail::StateOrControlErrorResidual< _Scalar, arg >::target_

Definition at line 61 of file state-error.hpp.


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