Problem when using quadprog solver with the 'active-set' algorithm
Show older comments
I don't know what's the best way to explain it, but basically I am unable to solve an optimization problem with function quadprog and active-set algorithm while interior-point did it with no problems. The exit flag that I get is 0 (The maximum number of iterations was reached. Solution x might be suboptimal or infeasible). I don't understand, since the only thing that changes from the interior-point case is the fact that I now have to give an initial value as input. I don't see why it would be the number of iterations either, I've already tried to increase it. I have also tried to debug it but when I try to step into the asqpdense function it takes me to the optimget function, so I don´t really know what is going on.
My code is a little extense and it calls many custom functions, so I don´t know what´s the best way upload it here. It is a MPC problem based on the code provided in GitHub - ARMSLab/slmpc: Successive Linearization Model Predictive Control and explained in Successive linearization based model predictive control of variable stiffness actuated robots | IEEE Conference Publication | IEEE Xplore. It seems that I need to have the solver options set to use the active-set algorithm in order to generate code (which I need), so that's why I am trying to make active-set work.
Edit: Added the .mat file with the inputs to quadprog:
[u, ~, exitflag, output] = quadprog(H, f, Acon, Bcon, [], [], [], [], initpoint, opts);
Edit 2: I've found the problem, it was in the construction of the lifted system matrices. Now it is working with active-set, however, I still don't understand why it worked with interior-point before.
4 Comments
I don't know what's the best way to explain it, but basically I am unable to solve an optimization problem with function quadprog and active-set algorithm while interior-point did it with no problems.
So at the moment you test whether "quadprog" works with "active-set" for a problem that could also be solved using "interior-point-convex" because your "harder" problem can only be solved using "active-set" ?
Interior Point and active-set are different algorithms to solve your problem. So you shouldn't be surprised that one of them fails while the other succeeds.
Matt J
on 4 Jun 2024
My code is a little extense and it calls many custom functions, so I don´t know what´s the best way upload it here
We don't need your code. We just need a .mat file with the inputs to quadprog.
Pedro Carvalho
on 4 Jun 2024
Pedro Carvalho
on 4 Jun 2024
Accepted Answer
More Answers (0)
Categories
Find more on Refinement in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!