aligator  0.9.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
integrator-abstract.hpp
Go to the documentation of this file.
1#pragma once
5
8
9namespace aligator {
10namespace dynamics {
11
23template <typename _Scalar>
25public:
26 using Scalar = _Scalar;
30
32 xyz::polymorphic<ContinuousDynamics> continuous_dynamics_;
33
34 template <typename U> U *getDynamics() {
35 return dynamic_cast<U *>(&*continuous_dynamics_);
36 }
37 template <typename U> const U *getDynamics() const {
38 return dynamic_cast<const U *>(&*continuous_dynamics_);
39 }
40
43 const xyz::polymorphic<ContinuousDynamics> &cont_dynamics);
44 virtual ~IntegratorAbstractTpl() = default;
45 shared_ptr<BaseData> createData() const;
46};
47
49template <typename _Scalar>
51 using Scalar = _Scalar;
53 using VectorXs = typename math_types<Scalar>::VectorXs;
54 shared_ptr<ContinuousDynamicsDataTpl<Scalar>> continuous_data;
55
56 using Base::Huu_;
57 using Base::Huy_;
58 using Base::Hxu_;
59 using Base::Hxx_;
60 using Base::Hxy_;
61 using Base::Hyy_;
62 using Base::Ju_;
63 using Base::Jx_;
64 using Base::Jy_;
65 using Base::value_;
66
69
71 virtual ~IntegratorDataTpl() = default;
72};
73
74} // namespace dynamics
75} // namespace aligator
76
77#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
78#include "aligator/modelling/dynamics/integrator-abstract.txx"
79#endif
Base definitions for continuous dynamics.
Main package namespace.
MatrixRef Jx_
Jacobian with respect to .
Definition dynamics.hpp:93
MatrixRef Jy_
Jacobian with respect to .
Definition dynamics.hpp:97
VectorXs value_
Function value.
Definition dynamics.hpp:88
MatrixRef Ju_
Jacobian with respect to .
Definition dynamics.hpp:95
Dynamics model: describes system dynamics through an implicit relation .
Definition fwd.hpp:71
Continuous dynamics described by differential-algebraic equations (DAEs) .
Definition fwd.hpp:12
Base class for (implicit) numerical integrators.
xyz::polymorphic< ContinuousDynamics > continuous_dynamics_
The underlying continuous dynamics.
shared_ptr< BaseData > createData() const
IntegratorAbstractTpl(const xyz::polymorphic< ContinuousDynamics > &cont_dynamics)
Constructor from instances of DynamicsType.
Data class for numerical integrators (IntegratorAbstractTpl).
typename math_types< Scalar >::VectorXs VectorXs
shared_ptr< ContinuousDynamicsDataTpl< Scalar > > continuous_data
VectorXs xdot_
Value of the time-derivative to use in the integration rule.
IntegratorDataTpl(const IntegratorAbstractTpl< Scalar > &integrator)