Problem when using quadprog solver with the 'active-set' algorithm
이전 댓글 표시
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
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
2024년 6월 4일
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
2024년 6월 4일
Pedro Carvalho
2024년 6월 4일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Refinement에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!