I want to convert my QP to SOCP and I followed the procedure described here.
I have
Asc = sqrtm(H);
Asc((end+1),(end+1)) = 1;
d = [zeros(size(f(:)));1];
gamma = -1;
b = zeros(size(d));
qp = secondordercone(Asc,b,d,gamma);
c=[f(:);1];
[u,fval,exitflag,output] = coneprog(c,qp)
exitflag
However, I immediately get this error
Problem is unbounded.
u =
[]
fval =
[]
exitflag =
-3
output =
struct with fields:
iterations: 10
primalfeasibility: []
dualfeasibility: []
dualitygap: []
algorithm: 'interior-point'
linearsolver: 'augmented'
message: 'Problem is unbounded.'
I decided to add my second SOC constraint and then I get this output
Optimal solution found.
u_ =
1.0e+04 *
0.0068
-0.0212
2.4724
fval =
-2.4645e+04
exitflag =
1
output =
struct with fields:
iterations: 9
primalfeasibility: 1.5796e-11
dualfeasibility: 3.0666e-10
dualitygap: 8.3902e-14
algorithm: 'interior-point'
linearsolver: 'augmented'
message: 'Optimal solution found.'
t =
0.7500
Optimal solution found.
u_ =
1.0e+04 *
0.0082
-0.0216
2.6814
fval =
-2.6732e+04
exitflag =
1
output =
struct with fields:
iterations: 9
primalfeasibility: 1.4523e-11
dualfeasibility: 2.7386e-10
dualitygap: 7.2296e-14
algorithm: 'interior-point'
linearsolver: 'augmented'
message: 'Optimal solution found.'
t =
0.7600
Problem is unbounded.
u_ =
[]
fval =
[]
exitflag =
-3
output =
struct with fields:
iterations: 9
primalfeasibility: []
dualfeasibility: []
dualitygap: []
algorithm: 'interior-point'
linearsolver: 'augmented'
message: 'Problem is unbounded.'
I also get -7 error. I would like to know why just this conversion (from link) doesn't work. What should I change to avoid having those errors?
Thank you!

댓글 수: 2

Matt J
Matt J 2022년 10월 12일
Isn't it obvious from the exit messages that the problem is unbounded? What do you get when you solve the original QP, using quadprog?
Julius Dri
Julius Dri 2022년 10월 12일
Wanted result, no error, everything is fine

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Quadratic Programming and Cone Programming에 대해 자세히 알아보기

질문:

2022년 10월 12일

댓글:

2022년 10월 12일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by