Coneprog: Exitflag -3, 1, -7
Afficher commentaires plus anciens
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 commentaires
Matt J
le 12 Oct 2022
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
le 12 Oct 2022
Réponses (0)
Catégories
En savoir plus sur Quadratic Programming and Cone Programming dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!