robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
solver_statistics.hpp
Go to the documentation of this file.
1#ifndef ROBOTOC_SOLVER_STATISTICS_HPP_
2#define ROBOTOC_SOLVER_STATISTICS_HPP_
3
4#include <vector>
5#include <deque>
6#include <iostream>
7
9
10
11namespace robotoc {
12
21 bool convergence = false;
22
26 int iter = 0;
27
31 std::vector<PerformanceIndex> performance_index;
32
36 std::vector<double> primal_step_size;
37
41 std::vector<double> dual_step_size;
42
46 std::vector<std::deque<double>> ts;
47
51 std::vector<int> mesh_refinement_iter;
52
56 double cpu_time = 0;
57
62 void reserve(const int size);
63
67 void clear();
68
72 void disp(std::ostream& os) const;
73
74 friend std::ostream& operator<<(std::ostream& os,
75 const SolverStatistics& solver_statistics);
76
77};
78
79} // namespace robotoc
80
81#endif // ROBOTOC_SOLVER_STATISTICS_HPP_
Definition: constraint_component_base.hpp:17
Statistics of optimal control solvers.
Definition: solver_statistics.hpp:17
std::vector< std::deque< double > > ts
Switching times at each iteration.
Definition: solver_statistics.hpp:46
std::vector< double > dual_step_size
Dual step sizes at each iteration.
Definition: solver_statistics.hpp:41
double cpu_time
CPU time is stored if SolverOptions::enable_benchmark is true.
Definition: solver_statistics.hpp:56
std::vector< PerformanceIndex > performance_index
Performance measurements at each iteration.
Definition: solver_statistics.hpp:31
std::vector< double > primal_step_size
Primal step sizes at each iteration.
Definition: solver_statistics.hpp:36
std::vector< int > mesh_refinement_iter
Iterations where the mesh-refinements are carried out.
Definition: solver_statistics.hpp:51
void clear()
Clear the all elements.
bool convergence
Flags whether the convergence is achieved.
Definition: solver_statistics.hpp:21
int iter
Number of iterations until convergence.
Definition: solver_statistics.hpp:26
friend std::ostream & operator<<(std::ostream &os, const SolverStatistics &solver_statistics)
void reserve(const int size)
Reserves the data.
void disp(std::ostream &os) const
Displays the solver statistics onto a ostream.