add_bound

Class method.

add_bound(self, bnd_type, variable, bound)

Add bounds as linear constraints to the OCP.

Note while adding the bound it is not checked if the bounds have the correct shape. This will be verified later during the optimization progress.

Parameters:
  • bnd_type (str) – String defining whether the bound is a lower or upper bound.

  • variable (str) – String defining on which variable the bound should be applied. Possible values are state, control and terminal.

  • bound (array) – Array containing the values of the bound.

For example

>>> constraints.add_bound('lower', 'state', lbx)

will add lbx as lower_bndx while

>>> constraints.add_bound('upper', 'terminal', ub_end)

will add ub_end as upper_bndend.