NLP solver returning over-constrained warning and wrong results
karthyyy opened this issue · comments
Hi,
Python = 3.9
Casadi = 3.6.4
I was trying out the python code shared by Mr. Mehrez during his workshop on Casadi (https://github.com/MMehrez/MPC-and-MHE-implementation-in-MATLAB-using-Casadi) and it's working fine.
While slightly modifying the problem to include acceleration as input in-lieu of velocity for similar system, I am facing an issue. The solver is returning "over constrained" warning and output is not correct (the control outputs are near zero).
"WARNING("NLP is overconstrained: There are 99 equality constraints but only 86 variables.") [.../casadi/core/nlpsol.cpp:630]"
I have rechecked the number of equality constraints given by "g" and is same as specified during the problem which is 66 (the warning specifies 99 equality constraints).
The system dynamics is based on following set of equations.
The modified code is attached herewith. Can you please see what can be wrong. Any help will be much appreciated.
Thanks and Regards
Karthik