-
Notifications
You must be signed in to change notification settings - Fork 136
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
Unexpected 'Infeasible' Results with SCS 3.2.4 on QP Problems for MPC #275
Comments
Thanks for posting this. For some reason when I run your python code I actually get 'solved' correctly form SCS (I tuned on verbose outputs from SCS to see what was happening):
|
Can you post the output of what you get when you run with |
Sure. These are the results.
|
Thanks for posting this! I still have not been able to reproduce this but I think I have identified the problem, a very nasty bug in how I'm calling the Blas dlange method, for calculating the infinity norm. I'm amazed this didn't trigger a bug before! If you are able to test please can you patch in this change: 8891c9c And then retry? I can talk you through how to do this if you're having trouble. |
build source from main branch (the change is not applied), seems no problem: scs.version = '3.2.4' |
After applied the patch, got the same result: scs.version = '3.2.4' |
I asked my colleague @ymwang78, who is much more knowledgeable in C and C++ than I am, to help me with this issue. We discovered that if we install SCS through pip, we both encounter the same infeasibility error. However, when we build SCS from the original source code, we get the correct results. This observation holds true for both the main branch and the new modified branch 8891c9c. We use python 3.12 on windows 11 system. |
Thanks for all the information. I can only think of the difference when installing via pip is from linking against a different blas library, but I'm surprised that the change didn't fix it. I am planning to merge that fix and cut a new pip release with it, so it should be easy to just use |
Ok i just cut a new pip release, can you pip install or pip upgrade and retry? Make sure it's version 3.2.5. Fingers crossed this fixes it. |
I tried version 3.2.5 by installing it via pip. To my surprise, the infeasibility issue still persists.
|
Oh no! Can you dump the data down to csv again for one of them? |
Ok I have been able to reproduce this, as far as I can tell it is just numerical problems when the values are very small producing inconsistent results between different hardware. I will try and improve the robustness of the infeasibility checks by ensuring the things being compared are at some minimum value. |
Oh, Thanks! Looking forward to the new version! I can provide more unexcepct infeasible examples. Let me know if it is necessary. |
I believe I have fixed the issue in this PR: #280 I added the data files you included as tests, is this ok? If not I can remove them. |
It's OK. I'll try the new version later. |
Could you update a pip release? |
Yes, will do as soon as I can figure out what's wrong with bodono/scs-python#103 |
Ok, it's on pip now. |
Thanks. I tried. It works great. |
Glad to hear it! |
Hi,
I am using SCS 3.2.4 with Python 3.12 on a Windows 11 machine to solve Quadratic Programming (QP) problems for Model Predictive Control (MPC). Most of the optimization results are correct, and the speed is very impressive. However, I encountered three instances where the solver returned 'infeasible' results unexpectedly.
Details:
SCS Version: 3.2.4
Python Version: 3.12
Operating System: Windows 11
To verify the results, I also solved the same problems using CLARABEL and CVXOPT, both of which returned 'optimal' results. I have attached the three problems that resulted in 'infeasible' status with SCS for your reference.
QPerr.zip
I turned on the export file options and get the files:
data_and_logs.zip
Thanks
Regards,
KK Zhang
The text was updated successfully, but these errors were encountered: