OCP status = 1 in Simulink S-function, no NaN in parameters or inputs

Hi everyone :wave:

I’m using an S-function in Simulink to run my OCP with acados. However, the solver returns ocp.status = 1. I’ve already checked all parameters and inputs, and I made sure that there are no NaN values.

What else could cause the solver to fail like this? Any suggestions on what I should look into would be greatly appreciated.

Thanks in advance :pray:

Hi Cigi,

First I recommend to debug in Matlab and not in Simulink. Do you observe the same behaviour in a Matlab simulation? What is the output of ocp_solver.print('stat')

You can use dump_last_qp_to_json to check where the NaNs occur and then check the corresponding functions.

Best, Katrin

1 Like