Add CPU time output to Integrator s-Function

Hello there :wave:

You have already added the timing information of the integrator in the OCP solver. I am interested in also getting timing information about the standalone integrator (acados_sim_solver_sfunction_…), too.

Is there any way to see the CPU time for integrating the system function?

Best regards
Björn

Hi,

I see this could be useful.

I think to implement this properly, one should first add the possibility to generate a template based integrator from a MEX acados integrator object.
Then the integrator options would be properly added to the Simulink interface.
These options are here in the template:

If you use an acados integrator in your Simulink loop and think it is slow.
Adding those options and not propagating any sensitivities should accelerate that significantly.

In a second step, acados Simulink integrator options, could be added, similar to the ones of the OCP solver:

I am not sure, if / when I will have time to implement that.
But I would encourage you to try it yourself and make a pull request.

Best,
Jonathan

Hi Jonathan,

thank you for your response :slight_smile:

I’ll have a look and see if I can do that. So far I have seen a lot of the acados code, but not the templates yet :smiley:

Best regards
Björn