7#include <proxsuite-nlp/manifold-base.hpp>
19template <
typename _Scalar>
37 void virtual forward(
const ConstVectorRef &x,
const ConstVectorRef &u,
38 Data &data)
const = 0;
41 void virtual dForward(
const ConstVectorRef &x,
const ConstVectorRef &u,
42 Data &data)
const = 0;
44 void evaluate(
const ConstVectorRef &x,
const ConstVectorRef &u,
45 const ConstVectorRef &y,
BaseData &data)
const;
48 const ConstVectorRef &y,
BaseData &data)
const;
55template <
typename _Scalar>
57 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
87 oss <<
"ExplicitDynamicsData { ";
88 oss << fmt::format(
"ndx: {:d}, ", self.
ndx1);
89 oss << fmt::format(
"nu: {:d}", self.
nu);
96#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
97#include "aligator/core/explicit-dynamics.txx"
std::ostream & operator<<(std::ostream &oss, const ExplicitDynamicsDataTpl< S > &self)
DynamicsDataTpl(const DynamicsModelTpl< Scalar > &model)
const Manifold & space() const
DynamicsModelTpl(xyz::polymorphic< Manifold > space, const int nu)
Constructor for dynamics.
Specific data struct for explicit dynamics ExplicitDynamicsModelTpl.
ExplicitDynamicsDataTpl(const int ndx1, const int nu, const int nx2, const int ndx2)
friend std::ostream & operator<<(std::ostream &oss, const ExplicitDynamicsDataTpl< S > &self)
virtual ~ExplicitDynamicsDataTpl()=default
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
DynamicsDataTpl< Scalar > Base
ExplicitDynamicsDataTpl< Scalar > Data
virtual ~ExplicitDynamicsModelTpl()=default
virtual shared_ptr< BaseData > createData() const
bool isExplicit() const
Check if this dynamics model is implicit or explicit.
virtual void forward(const ConstVectorRef &x, const ConstVectorRef &u, Data &data) const =0
Evaluate the forward discrete dynamics.
ExplicitDynamicsModelTpl(const ManifoldPtr &space, const int nu)
Constructor requires providing the next state's manifold.
ManifoldAbstractTpl< Scalar > Manifold
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
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
xyz::polymorphic< Manifold > ManifoldPtr
virtual void dForward(const ConstVectorRef &x, const ConstVectorRef &u, Data &data) const =0
Compute the Jacobians of the forward dynamics.
DynamicsModelTpl< Scalar > Base
DynamicsDataTpl< Scalar > BaseData