Add new Outputs to Simulink S-Function

Hi there :wave:,

same as this post(Include slack variables in s-function outputs - #2 by FreyJo) I would like to include the slack variables t as an output to my S-Function, as they are not available in the simulink_opts.

I looked at this: Simulink: add options for S functions by FreyJo 路 Pull Request #690 路 acados/acados 路 GitHub, but I did not get what I have to change in order to include the additional outputs in my s-function.

Is there an easy way of doing this?

Thanks Jannis

Hi Jannis,

the t slacks have been removed from acados in Remove `t` slacks from `ocp_nlp_out` by FreyJo 路 Pull Request #1148 路 acados/acados 路 GitHub

If you want to add a Simulink output option yourself, I think that this commit is a good reference: Simulink interface: add initialization functionalities and tests by FreyJo 路 Pull Request #1158 路 acados/acados 路 GitHub

Note that I updated the Simulink examples to use the new Matlab interface in Update Simulink examples to be based on new interface by FreyJo 路 Pull Request #1228 路 acados/acados 路 GitHub

Best,
Jonathan