Updating the QP Problem #303
-
For certain applications, like Model Predictive Control, it is usually best to update certain parameters of the problem rather than setting up a new problem. For example, in OSQP, I would usually setup a problem as such: problem = osqp.OSQP()
problem.setup(P=P, q=q, A=A, l=l, u=u) Then, when solving the MPC problem, instead of reinitializing a new problem, I would update the constraint vectors as such, problem.update(l=l_new, u=u_new) keeping the rest of the problem parameters the same. Is there any possibility that this functionality would be added in the future? Thank you very much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I fully agree there is this need for MPC. For instance we do similar updates using workspaces of the ProxQP solver in the MPC balancer for Upkie wheeled bipeds. I see no blocker in updating qpsolvers to return not only results, but also state objects that some solvers (qpOASES, OSQP, ProxQP, ...) return to warm-start future iterations. It would nicely upgrade the So, yes, there is no technical blocker to add this functionality. It is too low on my stack to be able to start working on it right now, but if a skilled and motivated contributor is interested in working on a PR for it, I would be happy to help with reviewing and merging once it is ready 👌 |
Beta Was this translation helpful? Give feedback.
I fully agree there is this need for MPC. For instance we do similar updates using workspaces of the ProxQP solver in the MPC balancer for Upkie wheeled bipeds.
I see no blocker in updating qpsolvers to return not only results, but also state objects that some solvers (qpOASES, OSQP, ProxQP, ...) return to warm-start future iterations. It would nicely upgrade the
initvals
argument that qpsolvers inherited from CVXOPT at the time the project started. But I expect this will result in an overhaul of the API (at least the addition of a new function for each solver) with an amount of code changes similar to the time we introducedsolve_problem
alongsidesolve_qp
.So, yes, there is no technical…