aligator  0.6.1
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
results.hpp
Go to the documentation of this file.
1
3#pragma once
4
6
7namespace aligator {
8
10template <typename _Scalar> struct ResultsTpl : ResultsBaseTpl<_Scalar> {
11 using Scalar = _Scalar;
13 using Base = ResultsBaseTpl<Scalar>;
14 using Base::conv;
15 using Base::gains_;
16 using Base::num_iters;
17 using Base::us;
18 using Base::xs;
19
21 std::vector<VectorXs> lams;
23 std::vector<VectorXs> vs;
25 std::size_t al_iter = 0;
26
28
29 ResultsTpl(const ResultsTpl &) = delete;
30 ResultsTpl &operator=(const ResultsTpl &) = delete;
31
32 ResultsTpl(ResultsTpl &&) = default;
34
37 explicit ResultsTpl(const TrajOptProblemTpl<Scalar> &problem);
38};
39
40template <typename Scalar>
41std::ostream &operator<<(std::ostream &oss, const ResultsTpl<Scalar> &self) {
42 oss << "Results {";
43 self.printBase(oss);
44 return oss << fmt::format("\n al_iters: {:d},", self.al_iter) << "\n}";
45}
46
47} // namespace aligator
48
49template <typename Scalar>
50struct fmt::formatter<aligator::ResultsTpl<Scalar>> : fmt::ostream_formatter {};
51
52#include "./results.hxx"
53
54#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
55#include "./results.txx"
56#endif
Main package namespace.
std::ostream & operator<<(std::ostream &oss, const ExplicitDynamicsDataTpl< S > &self)
std::vector< VectorXs > us
Controls.
std::vector< VectorXs > xs
States.
std::vector< MatrixXs > gains_
Riccati gains.
Results holder struct.
Definition results.hpp:10
ResultsTpl(ResultsTpl &&)=default
ResultsTpl(const ResultsTpl &)=delete
std::size_t al_iter
Proximal/AL iteration count.
Definition results.hpp:25
ResultsTpl(const TrajOptProblemTpl< Scalar > &problem)
Create the results struct from a problem (TrajOptProblemTpl) instance.
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
std::vector< VectorXs > lams
Problem co-states.
Definition results.hpp:21
ResultsTpl & operator=(ResultsTpl &&)=default
std::vector< VectorXs > vs
Path constraint multipliers.
Definition results.hpp:23
ResultsTpl & operator=(const ResultsTpl &)=delete