Debugging Solver Status == 1

Hi all,

I have formulated an MPC with ACADOS. When using the generated s-function in Simulink I receive the solver status = 1. This means that there is some kind of ACADOS_Failure. I looked at this post which describes a similar error (Error status 1, what can I do to investigate this problem?), but it was not helpful to me.

I think it has something to do with my problem formulation, but I have used the same formulation in a different toolbox and it worked. Yesterday I tried many things to solve the issue, but I was not successful.

Can someone maybe give me some advice how to debug this issue.

If it is helpful, i can send my problem formulation, the main script for generating the s-function and the simulink model.

Thanks for the help

Jannis

Hi Jannis,

the forum post you are referring to is a bit outdated. Solver status 1 means that there have been NaNs detected.

Typically, NaNs results from a division by zero/a logarithm of a negative number/etc. Please check your problem functions, i.e. all CasADi functions defining your cost/dynamics/constraints.

Best, Katrin

1 Like

And does this problem arise also in MATLAB or only in Simulink? If it is only Simulink, you might want to check the initialization.

Hi Katrin,

thanks for your response. I checked the casadi functions and I was able to solve the problem. It had something to do with too tight constraints and a missing integrator in the process mdel.

Thanks, Jannis

1 Like