aligator  0.9.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
expose-filter.cpp
Go to the documentation of this file.
1
4
6#include <eigenpy/std-pair.hpp>
7
8namespace aligator {
9namespace python {
10
12 using Filter = FilterTpl<double>;
13
14 eigenpy::StdPairConverter<std::pair<double, double>>::registration();
15 StdVectorPythonVisitor<std::vector<std::pair<double, double>>, true>::expose(
16 "StdVec_StdPair_double");
17
18 bp::register_ptr_to_python<shared_ptr<Filter>>();
19 bp::class_<Filter>("Filter",
20 "A pair filter implementation to help make larger steps "
21 "during optimization.",
22 bp::init<double, double, std::size_t>(bp::args(
23 "self", "beta", "alpha_min", "max_num_steps")))
24 .def("resetFilter", &Filter::resetFilter,
25 bp::args("self", "beta", "alpha_min", "max_num_steps"),
26 "Reset the filter parameters.")
27 .def("run", &Filter::run, bp::args("self", "phi", "alpha_try"),
28 "Make a step and add pair if step accepted.")
29 .def("accept_pair", &Filter::accept_pair, bp::args("self", "fpair"),
30 "Pair acceptance function.")
31 .def_readwrite("beta", &Filter::beta_,
32 "Distance parameter with other pairs in filter.")
33 .def_readwrite("alpha_min", &Filter::alpha_min_, "Minimum alpha step.")
34 .def_readonly("filter_pairs_", &Filter::filter_pairs_,
35 "Filter pairs vector.");
36}
37
38} // namespace python
39} // namespace aligator
Main package namespace.
A basic filter line-search strategy.
Definition fwd.hpp:131