I have a quick question regarding the bounds on slack constraints. I’m implementing a nlp ocp using python templating, and I have a single nonlinear constraint I’m implementing as a soft constraint on the upper bound. For example:
0.0 <= h(x,p)
h(x,p) - upper_slack_variable <= 10.0
I understand setting my basic
ocp.constraints.lh / uh, (e.g. 0 and 10 here), but I am slightly confused on how I should be setting
ocp.constraints.lsh / ush, and what they exactly mean. (I was under the impression that the slack variables would all have built in lower bounds of 0 based on the acados problem formulation, and have no upper bound).
Would I set
ush = 0.0, and leave out
lsh, to indicate that the slack variable is only on the upper bound? (Along with setting
idxsh = 0, since only a single constraint).