Dear friendly local staff,
I am using the C interface of acados with SQP. I want to solve problems for which I know that convergence is not always guaranteed, and I handle such cases by modifying the problem and attempting to solve it again.
This works in most cases. However, there are some states in which the solver appears to get “trapped,” and every subsequent recomputation—no matter how simple the modified problem is—fails already in the first SQP iteration.
To address this, I also call acados_reset() from the generated API. However, I noticed that some solver state seems to persist across subsequent solver calls. In particular, I observe a reduced alpha value already in the very first SQP iteration after the reset.
Initially, I thought this behavior only occurred when using MERIT_BACKTRACKING, but I have since observed the same issue with FIXED_STEP. My current workaround is to destroy the solver capsule and create a completely new one whenever this happens.
Am I using the API incorrectly, or is there a better way to recover from this situation?
Thank you a lot! ![]()