proxsuite-nlp  0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear programming on manifolds.
Loading...
Searching...
No Matches
expose-problem.cpp
Go to the documentation of this file.
4
5namespace proxsuite {
6namespace nlp {
7namespace python {
8
12 using context::Problem;
13
14 bp::class_<Problem>("Problem", "Problem definition class.", bp::no_init)
15 .def(bp::init<const polymorphic<Manifold> &, shared_ptr<context::Cost>,
16 const std::vector<Constraint> &>(
17 ("self"_a, "space", "cost", "constraints"_a = bp::list())))
18 .def_readwrite("cost", &Problem::cost_, "The cost function instance.")
19 .def_readwrite("manifold", &Problem::manifold_, "Problem manifold.")
20 .add_property("num_constraint_blocks", &Problem::getNumConstraints,
21 "Get the number of constraint blocks.")
22 .add_property("total_constraint_dim", &Problem::getTotalConstraintDim,
23 "Get the total dimension of the constraints.")
24 .add_property("nx", &Problem::nx, "Get the problem tangent space dim.")
25 .add_property("ndx", &Problem::ndx, "Get the problem tangent space dim.")
26 .def("add_constraint", &Problem::addConstraint<const Constraint &>,
27 ("self"_a, "cstr"), "Add a constraint to the problem.");
28}
29
30} // namespace python
31} // namespace nlp
32} // namespace proxsuite
Main package namespace.
Definition bcl-params.hpp:5
Packs a ConstraintSetTpl and C2FunctionTpl together.
Definition fwd.hpp:112