robotoc
robotoc - efficient ROBOT Optimal Control solvers
Loading...
Searching...
No Matches
ocp_data.hpp
Go to the documentation of this file.
1#ifndef ROBOTOC_OCP_DATA_HPP_
2#define ROBOTOC_OCP_DATA_HPP_
3
10
11
12namespace robotoc {
13
18struct OCPData {
23
28
33
38
43
48
56 template <int p=1>
57 double primalFeasibility() const {
58 double feasibility = 0;
59 feasibility += constraints_data.template primalFeasibility<p>();
60 feasibility += contact_dynamics_data.template primalFeasibility<p>();
61 return feasibility;
62 }
63
71 template <int p=1>
72 double dualFeasibility() const {
73 double feasibility = 0;
74 feasibility += constraints_data.template dualFeasibility<p>();
75 feasibility += contact_dynamics_data.template dualFeasibility<p>();
76 return feasibility;
77 }
78
84 double KKTError() const {
85 double error = 0;
87 error += constraints_data.KKTError();
88 return error;
89 }
90
91};
92
93} // namespace robotoc
94
95#endif // ROBOTOC_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
Data used in ContactDynamics.
Definition: contact_dynamics_data.hpp:14
double KKTError() const
Definition: contact_dynamics_data.hpp:204
Data for the state equations.
Definition: state_equation_data.hpp:16
Data for the switching constraint.
Definition: switching_constraint_data.hpp:13
Definition: constraint_component_base.hpp:17
Composed of data used to compute the cost function and its derivatives.
Definition: cost_function_data.hpp:17
A data structure for an optimal control problem.
Definition: ocp_data.hpp:18
double primalFeasibility() const
Returns the lp norm of the primal feasibility, i.e., the constraint violation. Default norm is l1-nor...
Definition: ocp_data.hpp:57
double dualFeasibility() const
Returns the lp norm of the dual feasibility. Default norm is l1-norm. You can also specify l-infty no...
Definition: ocp_data.hpp:72
SwitchingConstraintData switching_constraint_data
Switching constraint data.
Definition: ocp_data.hpp:47
PerformanceIndex performance_index
Performance index.
Definition: ocp_data.hpp:22
CostFunctionData cost_data
Cost function data.
Definition: ocp_data.hpp:27
double KKTError() const
Returns the squared norm of the KKT residual, that is, the primal and dual residual.
Definition: ocp_data.hpp:84
ConstraintsData constraints_data
Constraints data.
Definition: ocp_data.hpp:32
StateEquationData state_equation_data
State equation data.
Definition: ocp_data.hpp:37
ContactDynamicsData contact_dynamics_data
Contact dynamics data.
Definition: ocp_data.hpp:42
Performance index of optimal control problems.
Definition: performance_index.hpp:13