aligator  0.6.1
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
expose-dynamics.cpp
Go to the documentation of this file.
1
6#include <proxsuite-nlp/manifold-base.hpp>
7
8namespace aligator {
9namespace python {
10
11// fwd declaration
13// fwd declaration, see expose-explicit-dynamics.cpp
15
20
22using ManifoldPtr = shared_ptr<context::Manifold>;
24
26
27 using PyDynamicsModel = internal::PyStageFunction<DynamicsModel>;
28
29 StdVectorPythonVisitor<std::vector<shared_ptr<DynamicsModel>>, true>::expose(
30 "StdVec_Dynamics");
31
32 bp::class_<PyDynamicsModel, bp::bases<StageFunction>, boost::noncopyable>(
33 "DynamicsModel",
34 "Dynamics models are specific ternary functions f(x,u,x') which map "
35 "to the tangent bundle of the next state variable x'.",
36 bp::init<ManifoldPtr, int>(bp::args("self", "space", "nu")))
37 .def(bp::init<ManifoldPtr, int, ManifoldPtr>(
38 bp::args("self", "space", "nu", "space2")))
39 .def_readonly("space", &DynamicsModel::space_)
40 .def_readonly("space_next", &DynamicsModel::space_next_)
41 .add_property("nx1", &DynamicsModel::nx1)
42 .add_property("nx2", &DynamicsModel::nx2)
43 .add_property("is_explicit", &DynamicsModel::is_explicit,
44 "Return whether the current model is explicit.")
45 .def(
46 CreateDataPolymorphicPythonVisitor<DynamicsModel, PyDynamicsModel>());
47}
48
49} // namespace python
50} // namespace aligator
DynamicsModelTpl< Scalar > DynamicsModel
Definition context.hpp:28
shared_ptr< Manifold > ManifoldPtr
void exposeDynamics()
Expose discrete dynamics.
Main package namespace.