Get full QP residual from Python

Is there any good way to debug QP Failures?

While running MPC, I’m getting the following error message when using HPIPM

QP solver returned error status 3 in SQP iteration 1, QP iteration 11.

and the following error when using QPOASES

QP solver returned error status 37 in SQP iteration 1, QP iteration 15.

which indicates that my QP is infeasible.

Is there any good way to debug this infeasibility? i.e., maybe find which constraints are not compatible with each other?

Hi,

Did you read this post?

Yup. However, we can only get the inf norm of the residuals as opposed to the actual residual vector, so I don’t know exactly which constraint is causing the infeasibility (in either the SQP or QP solver).

Is there a way to determine which of the many constraints are potentially problematic?

I was able to get more information by putting print statements in the acados library as opposed to on the python interface side, but it would be nice to do this on the python side as well in the future, if that is possible.

Yes, I agree this would be useful!
I will mark this as a “feature request”.

This is implemented by now.
One can get the corresponding columns from the solver statistics.
To get the QP residuals the option nlp_solver_ext_qp_res needs to be set.