-
Notifications
You must be signed in to change notification settings - Fork 125
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
Possible Bug in Setting Contraints #94
Comments
First of all, thanks for appreciating HPIPM :) |
The issue you report should be fixed here db2fe4d However, this should not affect the function |
Excellent! Thanks for the quick fix. It does not solve the problem with Here is a minimal example showing the problem. From looking at the python interface, I doubt it's a python issue:
On my Windows install, the solver crashes with an error message quoting some address it's not supposed to read from. On my Mac, the whole Jupyter Kernel dies without error message. The curious thing is that As a first check, it would be good to see if other people can reproduce the problem. |
Hi, thanks for the example, it was very useful to find the bug! The issue was that the integer arrays were converted into double arrays in the python interface, this should fix it 672150d |
Great. I've tried that and that all seems to work. Thanks for fixing this so quickly! |
First off, I'd like to say thanks to Gianluca and all contributors for supplying this really amazing piece of software. Great effort!
In playing with the python interface, I noticed that
hpipm.d_ocp_qp_set("idxbx", np.arange(number_of_states), 0)
gives me an error whilehpipm.d_ocp_qp_set("Jbx", np.eye(number_of_states), 0)
does not and my trials work.Digging deeper, I found the following lines that all feature an odd:
if (nbx[ii>0])
hpipm/ocp_qp/x_ocp_qp.c
Line 556 in f257970
hpipm/ocp_qp/x_ocp_qp.c
Line 563 in f257970
hpipm/ocp_qp/x_ocp_qp.c
Line 653 in f257970
hpipm/ocp_qp/x_ocp_qp.c
Line 660 in f257970
I admit that I am not fully clear on the logic of the code and the memory layout, but I suspect it should read
if (nbx[ii] > 0)
Thanks for considering this issue.
Best
Jörg
The text was updated successfully, but these errors were encountered: