constraints
- class constraints[source]
Class used to define the constraints of the optimnal control problem.
Support for nonlinear, linear and box constraints are implemented and provided.
To define the constraints, first, an empty object have to be created. Then the individual constraints can be added with the help of the methods
add_bound()
andadd_constr()
.Attributes
Collection of all linear constraints.
Lower bound \(l_x \in \mathbb{R}^{nx}\) of the terminal state.
Lower bound \(l_u \in \mathbb{R}^{nu}\) for the control.
Lower bound \(l_x \in \mathbb{R}^{nx}\) of the state.
Collection of all nonlinear constraints.
Indicating whether all constraints are linear.
Upper bound \(u_x \in \mathbb{R}^{nx}\) of the terminal state.
Upper bound \(u_u \in \mathbb{R}^{nu}\) of the control.
Upper bound \(u_x \in \mathbb{R}^{nx}\) of the state.
Methods
Add bounds as linear constraints to the OCP.
Add linear or nonlinear constraints to the OCP.
Add linear or nonlinear terminal constraints to the OCP.
Loads a nMPyC constraints object from a file.
Saving the constraints to a given file with dill.