Troubleshooting#
As a first step, check the solver status which is returned by solve() in Python and can be obtained with solver.get_status() and solver.get('status') in Python and MATLAB/Octave, respectively.
Next, check the NLP residuals by calling solver.print_statistics() in Python and solver.print('stat') in MATLAB/Octave.
In order to asses the QP solver status, you need to check the corresponding QP solver status definitions. For HPIPM, they are given here.
Solver initialization#
Use the set method of AcadosOcpSolver to provide different initializations.
Are all problem functions defined at the initial guess?
NaN errors can often be mitigated by solver initializations.
QP diagnostics#
Store iterates#
One can always get the last iterate using solver.get(), see
In addition, one can set the solver option store_iterates to store all intermediate NLP solver iterates and get them after a solver call.