robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
unconstr_ocp_data.hpp
Go to the documentation of this file.
1#ifndef ROBOTOC_UNCONSTR_OCP_DATA_HPP_
2#define ROBOTOC_UNCONSTR_OCP_DATA_HPP_
3
8
9
10namespace robotoc {
11
22
27
32
37
45 template <int p=1>
46 double primalFeasibility() const {
47 double feasibility = 0;
48 feasibility += constraints_data.template primalFeasibility<p>();
49 feasibility += unconstr_dynamics.template primalFeasibility<p>();
50 return feasibility;
51 }
52
60 template <int p=1>
61 double dualFeasibility() const {
62 double feasibility = 0;
63 feasibility += constraints_data.template dualFeasibility<p>();
64 return feasibility;
65 }
66
72 double KKTError() const {
73 double error = 0;
74 error += constraints_data.KKTError();
75 error += unconstr_dynamics.KKTError();
76 return error;
77 }
78};
79
80} // namespace robotoc
81
82#endif // ROBOTOC_UNCONSTR_OCP_DATA_HPP_
Data for constraints. Composed of ConstraintComponentData corrensponding to the components of Constra...
Definition: constraints_data.hpp:16
double KKTError() const
Returns the sum of the squared norm of the KKT error (primal residual and complementary slackness) of...
Definition: constraints_data.hxx:9
Inverse dynamics constraint without constraints (floating base or contacts).
Definition: unconstr_dynamics.hpp:20
double KKTError() const
Returns squared norm of the KKT residual, that is, the residual in the unconstrained dynamics constra...
Definition: unconstr_dynamics.hpp:114
Definition: constraint_component_base.hpp:17
Composed of data used to compute the cost function and its derivatives.
Definition: cost_function_data.hpp:17
Performance index of optimal control problems.
Definition: performance_index.hpp:13
Data structure for the optimal control problem of unconstrained rigid-body systems.
Definition: unconstr_ocp_data.hpp:17
CostFunctionData cost_data
Cost function data.
Definition: unconstr_ocp_data.hpp:26
double KKTError() const
Returns the squared norm of the KKT residual, that is, the primal and dual residual.
Definition: unconstr_ocp_data.hpp:72
double primalFeasibility() const
Returns the lp norm of the primal feasibility, i.e., the constraint violation. Default norm is l1-nor...
Definition: unconstr_ocp_data.hpp:46
double dualFeasibility() const
Returns the lp norm of the dual feasibility. Default norm is l1-norm. You can also specify l-infty no...
Definition: unconstr_ocp_data.hpp:61
ConstraintsData constraints_data
Constraints data.
Definition: unconstr_ocp_data.hpp:31
PerformanceIndex performance_index
Performance index.
Definition: unconstr_ocp_data.hpp:21
UnconstrDynamics unconstr_dynamics
State equation data.
Definition: unconstr_ocp_data.hpp:36