Understanding why ocp_nlp_sqp maximum iterations reached

Hello!

I’m fairly new to acados so apologies if this question has been answered before, I did some of my own googling and wasn’t able to find a satisfying answer. I’m running into a maximum iterations reached error when using acados to solve a non linear MPC problem. Increasing the iterations doesn’t help either. Is the solver failing because res_stat and res_eq is high? Here is the complete error.

 ocp_nlp_sqp: maximum iterations reached

iter	res_stat	res_eq		res_ineq	res_comp	qp_stat	qp_iter	alpha
0	0.000000e+00	7.788073e+01	3.000000e+02	0.000000e+00	0	0	0.000000e+00	
1	1.548480e+03	3.365143e-01	5.684342e-14	1.083229e-07	0	6	1.000000e+00	
2	2.758227e+02	5.281221e-01	5.684342e-14	1.044176e-13	0	6	1.000000e+00	
3	1.400006e+01	5.247059e-01	5.684342e-14	3.368880e-14	0	3	1.000000e+00	
4	1.870858e+00	5.215322e-01	5.684342e-14	4.833471e-08	0	2	1.000000e+00	
5	4.167990e+02	5.908782e-01	5.684342e-14	4.132986e-10	0	5	1.000000e+00	
6	2.129191e+01	1.860341e-01	5.684342e-14	3.433437e-14	0	3	1.000000e+00	
7	2.955405e+00	5.391566e-01	5.684342e-14	1.265885e-09	0	2	1.000000e+00	
8	2.992665e+00	8.335625e-01	5.684342e-14	1.905326e-08	0	2	1.000000e+00	
9	2.228391e+02	9.758249e-01	1.093129e-11	3.133572e-09	0	5	1.000000e+00	
10	2.025071e+01	1.878825e-01	5.684342e-14	3.474697e-14	0	3	1.000000e+00	
11	5.131356e+00	5.458181e-01	5.684342e-14	3.593991e-08	0	2	1.000000e+00	
12	3.936921e+00	5.493414e-01	5.684342e-14	2.122980e-08	0	2	1.000000e+00	
13	1.671269e+01	5.842249e-01	5.684342e-14	5.857477e-10	0	5	1.000000e+00	
14	2.695810e+00	9.036539e-01	5.684342e-14	3.017808e-08	0	2	1.000000e+00	
15	5.322427e+01	1.011345e+00	5.684342e-14	2.897485e-09	0	6	1.000000e+00	
16	6.817016e+00	1.865127e-01	5.684342e-14	3.429445e-14	0	3	1.000000e+00	
17	2.266691e+00	5.409040e-01	5.684342e-14	1.787956e-08	0	2	1.000000e+00	
18	1.329002e+00	5.546146e-01	5.684342e-14	1.200503e-08	0	2	1.000000e+00	
19	3.305903e+00	5.919410e-01	5.684342e-14	4.225661e-10	0	4	1.000000e+00	
20	2.018248e+00	5.573069e-01	5.684342e-14	8.131902e-09	0	2	1.000000e+00	
21	2.949703e+00	5.910472e-01	5.684342e-14	6.579816e-14	0	5	1.000000e+00	
22	2.017430e+00	5.577237e-01	5.684342e-14	1.989042e-08	0	2	1.000000e+00	
23	2.017430e+00	5.917009e-01	5.684342e-14	6.587697e-14	0	5	1.000000e+00	
24	2.017733e+00	5.583378e-01	5.684342e-14	1.898735e-08	0	2	1.000000e+00	
25	2.951407e+00	5.921468e-01	5.684342e-14	6.574953e-14	0	5	1.000000e+00	
26	2.017951e+00	5.588060e-01	5.684342e-14	2.147687e-08	0	2	1.000000e+00	
27	3.448983e+00	5.924580e-01	5.684342e-14	6.564106e-14	0	5	1.000000e+00	
28	2.018051e+00	5.591323e-01	5.684342e-14	2.224119e-08	0	2	1.000000e+00	
29	4.504332e+00	5.927108e-01	5.684342e-14	6.557170e-14	0	5	1.000000e+00	
30	2.018123e+00	5.593660e-01	5.684342e-14	2.230580e-08	0	2	1.000000e+00	
31	5.870383e+00	5.928931e-01	5.684342e-14	6.550014e-14	0	5	1.000000e+00	
32	2.320835e+00	5.594919e-01	5.684342e-14	2.246365e-08	0	2	1.000000e+00	
33	7.315824e+00	5.930268e-01	5.684342e-14	6.544288e-14	0	5	1.000000e+00	
34	2.938240e+00	5.595318e-01	5.684342e-14	2.478570e-08	0	2	1.000000e+00	
35	9.663576e+00	5.931363e-01	5.684342e-14	6.537358e-14	0	5	1.000000e+00	
36	5.594472e+00	5.594415e-01	5.684342e-14	4.879607e-08	0	2	1.000000e+00	
37	1.505811e+01	5.788469e-01	5.684342e-14	1.806125e-13	0	5	1.000000e+00	
38	7.977368e+00	5.587114e-01	5.684342e-14	1.668425e-07	0	2	1.000000e+00	
39	2.153476e+01	5.783031e-01	5.684342e-14	6.184036e-14	0	5	1.000000e+00	
40	1.033966e+01	5.583928e-01	5.684342e-14	3.843733e-07	0	2	1.000000e+00	
41	2.673167e+01	5.775846e-01	5.684342e-14	6.146428e-14	0	5	1.000000e+00	
42	1.334661e+01	5.575513e-01	5.684342e-14	7.960506e-07	0	2	1.000000e+00	
43	3.418048e+01	5.761443e-01	5.684342e-14	1.679993e-13	0	5	1.000000e+00	
44	1.732976e+01	5.565679e-01	5.684342e-14	3.247780e-14	0	3	1.000000e+00	
45	4.178034e+01	5.735335e-01	5.684342e-14	1.289726e-12	0	5	1.000000e+00	
46	2.201299e+01	5.551765e-01	5.684342e-14	3.241362e-14	0	3	1.000000e+00	
47	4.987896e+01	5.706088e-01	5.684342e-14	1.532898e-07	0	6	1.000000e+00	
48	2.746877e+01	5.528288e-01	5.684342e-14	3.241992e-14	0	3	1.000000e+00	
49	5.550762e+01	5.667231e-01	5.684342e-14	3.902812e-13	0	6	1.000000e+00	

Exception: acados acados_ocp_solver returned status 2

Can I check which constraints were not able to be resolved? If there are any other solver statistics I should inspect, please let me know.

Thank you!