-
Notifications
You must be signed in to change notification settings - Fork 64
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
BoxOSQP does not work without equality constraints #546
Comments
Hi! I recall the API:
I am not sure what was your intent by not specifying |
I did get confused on the API, but I would not have expected a crash like that. Would a better error message be possible? Also, does the problem formulation with an arbitrary |
Yes, it is the most general formulation that one can think of. Maybe you are more familiar with: Now, observe that: and so you can implement it as: def matvec_A_boxosqp(params_A, x):
A, G = params_A
return A @ x, G @ x
l = (b, jnp.full(shape=h.shape, fill_value=-float('inf')))
u = (b, h)
params_ineq = (l, u)
params_eq = (A, G)
solver = BoxOSQP(matvec_A=matvec_A_boxosqp)
init_params = solver.init_params(init_x=init_x)
solver.run(init_params, params_obj=(Q, c), params_eq=params_eq, params_ineq=params_ineq) This reduction between problem formulations is performed automatically in
I agree we should improve the readability of errors messages. |
What I was trying to get at is to determine whether that means that arbitrary linear constraints are supported, not just box constraints. Does that mean this class is a full QP solver, and not just for box-constrained problems? |
Yes, it is! Just like the original's one: https://osqp.org/ |
Trying to run:
produces an error (some parts redacted):
The text was updated successfully, but these errors were encountered: