Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NLP solver returning over-constrained warning and wrong results #10

Open
karthyyy opened this issue Feb 5, 2024 · 0 comments
Open

NLP solver returning over-constrained warning and wrong results #10

karthyyy opened this issue Feb 5, 2024 · 0 comments

Comments

@karthyyy
Copy link

karthyyy commented Feb 5, 2024

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.

image

The modified code is attached herewith. Can you please see what can be wrong. Any help will be much appreciated.

FFR_casadi_v3.txt

Thanks and Regards
Karthik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant