QCP under CPLEX

Problems with modeling
Post Reply
Only_God
User
User
Posts: 11
Joined: 6 years ago

QCP under CPLEX

Post by Only_God »

Dear Users/admins;
As you know cplex can solve convex QCP.
I have written the following simple example in gams:
x*x + y*y=l=z*z;
As you know the above function is second order cone and so convex.
But when solving it with cplex under qcp it says the model is not convex!!
Can someone help me? Am I losing something?
Regards.
SapperDoc
User
User
Posts: 13
Joined: 4 years ago

Re: QCP under CPLEX

Post by SapperDoc »

The reason is because the function is not convex. In standard form for an NLP, it's

x^2 + y^2 - z^2 <= 0

The function has a Hessian that is indefinite, having eigenvalues equal to 1, 1, and -1. Thus, the function is not convex.
User avatar
bussieck
Moderator
Moderator
Posts: 1042
Joined: 7 years ago

Re: QCP under CPLEX

Post by bussieck »

It is not a convex quadratic program, but it is a convex quadratic cone, see https://www.gams.com/latest/docs/UG_Lan ... rogramming and Cplex should be able so solve this. What version of GAMS are you using? If this is prior to GAMS 33 you should use the GAMS solver CplexD which does a better job in recognizing convex cones. With GAMS 33 the two GAMS links to Cplex, that is cplex and cplexD have been merged, see https://www.gams.com/latest/docs/RN_33.html#g3310_CPLEX

-Michael
Only_God
User
User
Posts: 11
Joined: 6 years ago

Re: QCP under CPLEX

Post by Only_God »

Thank you very much
I thought since sqrt(x*x+y*y)<=t is convex then x^2+y^2<=t^2 is also convex...
But I was absolutely wrong!!

SapperDoc wrote: 3 years ago The reason is because the function is not convex. In standard form for an NLP, it's

x^2 + y^2 - z^2 <= 0

The function has a Hessian that is indefinite, having eigenvalues equal to 1, 1, and -1. Thus, the function is not convex.
Post Reply