Thanks for your interest in acados Nonlinear least-squares should be implemented ASAP (they are already implemented in the core and in the MATLAB interface). Regarding constraints including algebraic variables, they are not implemented in the core either, but we can try to allocate some time to do it in the next days.
It works, thank you.
I am only experiencing problems when an hard constraint on the algebraic variable becomes active together with a hard constraint on a state variable at terminal time.
In this case I get an error:
Traceback (most recent call last):
File “/home/walter/acados/examples/acados_python/getting_started/HYPEMLIFE_NMPC_test/minimal_Li_SPM_closed_loop_5.py”, line 124, in
raise Exception(‘acados acados_ocp_solver returned status {}. Exiting.’.format(status))
Exception: acados acados_ocp_solver returned status 4. Exiting.
QP solver returned error status 3
Process finished with exit code 1
Do you think I should implement a soft constraint on the state variable at terminal time?
Thank you
I implemented soft constraints on state variable at terminal time. Using the SQP solver sometimes it finds a solution, sometimes it is not able to converge within max iteration numbers. I increased max_iter to 1000 but it didn’t converge.
With SQP_RTI instead it always finds a solution in every condition.
Did you print the iterates, with print_statistics().
You should see up to which tolerance it is able to solve the problem.
I would probably try using a higher tolerance.