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

Midpoint integration rule. More...

#include <aligator/modelling/dynamics/integrator-midpoint.hpp>

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

Public Types

using Scalar = _Scalar
 
using Base = IntegratorAbstractTpl<Scalar>
 
using ContinuousDynamics = ContinuousDynamicsAbstractTpl<Scalar>
 
using Manifold = ManifoldAbstractTpl<Scalar>
 
using Data = IntegratorMidpointDataTpl<Scalar>
 
using BaseData = DynamicsDataTpl<Scalar>
 
- Public Types inherited from aligator::dynamics::IntegratorAbstractTpl< _Scalar >
using Scalar = _Scalar
 
using Base = DynamicsModelTpl<Scalar>
 
using BaseData = DynamicsDataTpl<Scalar>
 
using ContinuousDynamics = ContinuousDynamicsAbstractTpl<Scalar>
 
- Public Types inherited from aligator::DynamicsModelTpl< _Scalar >
using Scalar
 
using Data
 
using Manifold
 

Public Member Functions

 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
 IntegratorMidpointTpl (const xyz::polymorphic< ContinuousDynamics > &cont_dynamics, const Scalar timestep)
 
void evaluate (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, BaseData &data) const
 
void computeJacobians (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &y, BaseData &data) const
 
shared_ptr< BaseDatacreateData () const
 
- Public Member Functions inherited from aligator::dynamics::IntegratorAbstractTpl< _Scalar >
template<typename U >
U * getDynamics ()
 
template<typename U >
const U * getDynamics () const
 
 IntegratorAbstractTpl (const xyz::polymorphic< ContinuousDynamics > &cont_dynamics)
 Constructor from instances of DynamicsType.
 
virtual ~IntegratorAbstractTpl ()=default
 
- Public Member Functions inherited from aligator::DynamicsModelTpl< _Scalar >
 ALIGATOR_DYNAMIC_TYPEDEFS (_Scalar)
 
const Manifoldspace () const
 State space for the input.
 
const Manifoldspace_next () const
 State space for the output of this dynamics model.
 
virtual bool isExplicit () const
 Check if this dynamics model is implicit or explicit.
 
int nx1 () const
 
int nx2 () const
 
 DynamicsModelTpl (xyz::polymorphic< Manifold > space, const int nu)
 Constructor for dynamics.
 
 DynamicsModelTpl (xyz::polymorphic< Manifold > space, const int nu, xyz::polymorphic< Manifold > space_next)
 Constructor for dynamics. This constructor assumes same dimension for the current and next state.
 
virtual void evaluate (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &xn, Data &) const=0
 
virtual void computeJacobians (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &xn, Data &) const=0
 
virtual void computeVectorHessianProducts (const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &xn, const ConstVectorRef &lbda, Data &data) const
 
virtual ~DynamicsModelTpl ()=default
 

Public Attributes

Scalar timestep_
 
- Public Attributes inherited from aligator::dynamics::IntegratorAbstractTpl< _Scalar >
xyz::polymorphic< ContinuousDynamicscontinuous_dynamics_
 The underlying continuous dynamics.
 
- Public Attributes inherited from aligator::DynamicsModelTpl< _Scalar >
xyz::polymorphic< Manifoldspace_
 State space for the input.
 
xyz::polymorphic< Manifoldspace_next_
 State space for the output of this dynamics model.
 
const int ndx1
 State space dimension.
 
const int nu
 Control dimension.
 
const int ndx2
 Next state space dimension.
 

Detailed Description

template<typename _Scalar>
struct aligator::dynamics::IntegratorMidpointTpl< _Scalar >

Midpoint integration rule.

The rule is described, for general DAEs, as

\[ \phi(x_k, u_k, x_{k+1}) = g(\hat{x}_0, u_k, \frac{x_{k+1}\ominus x_k}{h}) = 0. \]

where \(\hat{x}_0 = \mathrm{Interp}_{1/2}(x_k, x_{k+1})\). Even for ODEs, it is still an implicit integration rule.

The Jacobians are:

\[ \frac{\partial f}{\partial z} = \frac{\partial g}{\partial \hat{x}_0} \frac{\partial \hat{x}_0}{\partial z} + \frac{\partial g}{\partial z} + \frac{\partial g}{\partial v} \frac{\partial v}{\partial z} \]

Definition at line 28 of file integrator-midpoint.hpp.

Member Typedef Documentation

◆ Scalar

template<typename _Scalar >
using aligator::dynamics::IntegratorMidpointTpl< _Scalar >::Scalar = _Scalar

Definition at line 29 of file integrator-midpoint.hpp.

◆ Base

template<typename _Scalar >
using aligator::dynamics::IntegratorMidpointTpl< _Scalar >::Base = IntegratorAbstractTpl<Scalar>

Definition at line 31 of file integrator-midpoint.hpp.

◆ ContinuousDynamics

template<typename _Scalar >
using aligator::dynamics::IntegratorMidpointTpl< _Scalar >::ContinuousDynamics = ContinuousDynamicsAbstractTpl<Scalar>

Definition at line 32 of file integrator-midpoint.hpp.

◆ Manifold

template<typename _Scalar >
using aligator::dynamics::IntegratorMidpointTpl< _Scalar >::Manifold = ManifoldAbstractTpl<Scalar>

Definition at line 33 of file integrator-midpoint.hpp.

◆ Data

template<typename _Scalar >
using aligator::dynamics::IntegratorMidpointTpl< _Scalar >::Data = IntegratorMidpointDataTpl<Scalar>

Definition at line 34 of file integrator-midpoint.hpp.

◆ BaseData

template<typename _Scalar >
using aligator::dynamics::IntegratorMidpointTpl< _Scalar >::BaseData = DynamicsDataTpl<Scalar>

Definition at line 35 of file integrator-midpoint.hpp.

Constructor & Destructor Documentation

◆ IntegratorMidpointTpl()

template<typename _Scalar >
aligator::dynamics::IntegratorMidpointTpl< _Scalar >::IntegratorMidpointTpl ( const xyz::polymorphic< ContinuousDynamics > & cont_dynamics,
const Scalar timestep )

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

template<typename _Scalar >
aligator::dynamics::IntegratorMidpointTpl< _Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS ( Scalar )

◆ evaluate()

template<typename _Scalar >
void aligator::dynamics::IntegratorMidpointTpl< _Scalar >::evaluate ( const ConstVectorRef & x,
const ConstVectorRef & u,
const ConstVectorRef & y,
BaseData & data ) const

◆ computeJacobians()

template<typename _Scalar >
void aligator::dynamics::IntegratorMidpointTpl< _Scalar >::computeJacobians ( const ConstVectorRef & x,
const ConstVectorRef & u,
const ConstVectorRef & y,
BaseData & data ) const

◆ createData()

template<typename _Scalar >
shared_ptr< BaseData > aligator::dynamics::IntegratorMidpointTpl< _Scalar >::createData ( ) const
virtual

Member Data Documentation

◆ timestep_

template<typename _Scalar >
Scalar aligator::dynamics::IntegratorMidpointTpl< _Scalar >::timestep_

Definition at line 37 of file integrator-midpoint.hpp.


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