Debugging capabilities using the C interface


I have an MPC tube formulation with quite complex dynamics, non linear constraints, as well as a nonlinear terminal constraint. The dynamics depend on several parameters which are updated online using the C interface. The solver is configured as follows:

To read out the solution, we use ocp_nlp_out_get, ocp_nlp_get (see below).When looking at these function definitions, it’s rather limited in terms of the variables which are exposed by the solver.

Screenshot from 2023-08-25 09-10-17

For debugging purposes, it would be very convenient to have the option to read out intermediate quantities which are computed, e.g. inside the dynamics function, but do not necessarily fall into any of the fields specified in ocp_nlp_out_get. I was wondering whether there is an option to expose custom fields without compromising the complexity of the solver.

Furthermore, while I’m able to read out the status, I’m not entirely sure what each of the return values imply exactly. Following this post, where can I find more insights about what each of the failure cases mean exactly? Is it possible to conclude from the failure status specific issues such as feasiblity, or ill conditioning?

Lastly, I was wondering whether there are any logs generated inside acados which could provide more info as to what the solver is doing, and why does it fail.

Thanks in advance,


Hi Maria,

The request sounds rather generic.
Can you more explicitly say what you want to access.
Did you look into the dump_last_qp_to_json function in Python, which allows you to get all the linearization quantities?
It internally calls get_from_qp_in().

Unfortunately, it is rather hard to conclude definitely from the QP solver status what is the issue. It would be good to add some more functionality in this case.
But this means looking into every QP solver specifically.