As Jonathan already mentioned, you cannot do that by means of the slack variables functionality provided by the QPs in
HPIPM, which are then inherited in
The new encoding
idxs_rev would allow for a single slack per stage for all lower constraints, plus another single slack for all the upper constraints, but the IPM solver currently requires one slack per single lower constraint, and same for upper (as it was designed for a different encoding
In any case, even the new encoding itself does not allow to have the same slack for upper and lower constraints.
Obviously you can do that by modeling yourself the slacks as extra inputs as you would do in a solver not supporting slacks as a special variable type.
Related to that, currently in
acados the only QP solver able to natively handle slack variables is
In the case of all other solvers the slack variables are anyway transformed into extra input variables by the
acados wrapper to the QP solver.