Is it possible to have the cost of Slack variables tunable?

Hi all!
I was wondering if it is possible to have the cost Zl of slack variables parametric in the S-Fucntion, like it is possible for cost_W_0, cost_W and cost_W_e.

Thanks

Samuele

Yes this is possible! The feature has been added only recently though, so maybe check your acados version.
For an example, see this test which uses the OCP formulation defined here.

Thanks for the quick reply. It is the best forum in the world :heart_eyes: :heart_eyes: :heart_eyes:

Samuele

2 Likes

I’ve updated Acados to the latest version, and it works.
Thanks

Samuele