-
Notifications
You must be signed in to change notification settings - Fork 367
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
undocumented behavior of osqp_warm_start_x and osqp_warm_start_y #62
Comments
You are right, it is not clear from the docs. We chose to do so because if the If we remove the lines you mentioned, we could have some issues. For example, if someone warm starts One alternative would be to cold start the variables |
My main point is that from reading the documentation (and inferring from the function names), it's reasonable to expect that osqp_warm_start_x(work, x);
osqp_warm_start_y(work, y); is equivalent to osqp_warm_start(work, x, y); which is not the case. This easily introduces subtle bugs because you have to pay close attention to check if a warm start is properly used. |
I have fixed the problem in this commit 47043fe. The behavior should be more clear now. |
I was a bit surprised to discover that
osqp_warm_start_x
clears the dual warm start andosqp_warm_start_y
clears the primal warm start:https://github.com/oxfordcontrol/osqp/blob/370dd33622aa1fec1baae3881d7a5a56bf0ebb19/src/osqp.c#L899-L900
https://github.com/oxfordcontrol/osqp/blob/370dd33622aa1fec1baae3881d7a5a56bf0ebb19/src/osqp.c#L918-L920
This isn't documented, and it's natural to assume that these functions would just act like setters for the primal and dual warm starts.
The text was updated successfully, but these errors were encountered: