Create Simulink wrapper from Python


I have a question about the Workflow in Acados.
I would like to work mainly through the Python interface and at times evaluate the controller in Simulink as S-functions.
I run Acados Python Interface through Windows WSL and have Matlab for Windows.

And really my first question here is if it is even possible?

All examples towards S-Functions and Simulink are through the Matlab Interface.
However, I have seen that in the Python interface for the method: AcadosOCPSolves.generate() there is a parameter for simulink_opts.

I tried running ocp_solver.generate(acados_ocp=ocp) in the example:
It generates code but no .m-files.


you need to add the simulink_opts if you want to generate a Simulink wrapper.
I added an example and some functionality here:


1 Like

Hi Jonathan,

It was exactly what I asked about.

Thanks for all of your work with Acados!