aligator  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
expose-direct-sum.cpp
Go to the documentation of this file.
1
3
8
9namespace aligator {
10namespace python {
11
12using context::Scalar;
16
20
21 register_polymorphic_to_python<xyz::polymorphic<DirectSumExplicitDynamics>>();
22 bp::class_<DirectSumExplicitDynamics, bp::bases<ExplicitDynamics>>(
23 "DirectSumExplicitDynamics",
24 "Direct sum :math:`f \\oplus g` of two explicit dynamical models.",
25 bp::no_init)
26 .def(bp::init<xyz::polymorphic<ExplicitDynamics>,
27 xyz::polymorphic<ExplicitDynamics>>(("self"_a, "f", "g")))
29
31 bp::bases<context::ExplicitDynamicsData>>(
32 "DirectSumExplicitDynamicsData", bp::no_init)
33 .def_readwrite("data1", &DirectSumExplicitDynamics::Data::data1_)
34 .def_readwrite("data2", &DirectSumExplicitDynamics::Data::data2_);
35
36 bp::def("directSum", directSum<Scalar>, ("f"_a, "g"),
37 "Produce the direct sum.");
38}
39
40} // namespace python
41} // namespace aligator
PolymorphicMultiBaseVisitor< DynamicsModel, ExplicitDynamics > exp_dynamics_visitor
Main package namespace.
auto directSum(xyz::polymorphic< CostAbstractTpl< Scalar > > const &c1, xyz::polymorphic< CostAbstractTpl< Scalar > > const &c2)
Dynamics model: describes system dynamics through an implicit relation .
Definition fwd.hpp:68
DynamicsDataTpl< _Scalar > Data
Definition dynamics.hpp:17
Explicit forward dynamics model .
Definition fwd.hpp:77