A problem about command "cone"

40 views
Skip to first unread message

liuyibing

unread,
May 30, 2013, 9:56:12 AM5/30/13
to yal...@googlegroups.com
Dear Johan:
      I am handling an QCQP problem. I try to convert the problem to SOCP. So naturally I try to use the cone command. However I find a problem when using the cone command. For my model is quite complicate, I test a simple but simple model as following.
a=sdpvar(1,1);
obj=0;
con=[];
con=con+[cone(a*a,1)];
obj=a;
ops=sdpsettings('solver','cplex');
solvesdp(con,obj,ops)
when I run this code, the following error was thrown out 
Error using error
Not enough input arguments.

Error in lmi/categorizeproblem (line
252)
                                error

Error in compileinterfacedata (line
251)
[ProblemClass,integer_variables,binary_variables,parametric_variables,uncertain_variables,semicont_variables,quad_info]
=
categorizeproblem(F,logdetStruct,h,options.relax,parametric,evaluation_based,
Error in solvesdp (line 260)
[interfacedata,recoverdata,solver,diagnostic,F,Fremoved,ForiginalQuadratics]
=
compileinterfacedata(F,[],logdetStruct,h,options,0,solving_parametric);

Error in Untitled (line 7)
solvesdp(con,obj,ops)

Johan Löfberg

unread,
May 30, 2013, 10:26:00 AM5/30/13
to yal...@googlegroups.com
cone(x,y) is a low-level operator which only can model the constraint norm(x)<=y where x is a linear vector and y is a scalar

You are trying to model norm(a*a) <= 1. That is not possible using cone (and it is unnecessarily complicated since it is the same as a*a <= 1)

Perhaps you mean norm(a) <= 1. This is written as cone(a,1). Well, you never have to use the cone operator, you can just as well write norm(a) <=1. Or you write it as the quadratic expression a*a <= 1. Since a is scalar you can just as well write abs(a) <= 1, and avoid introducing any second-order cone.

liuyibing

unread,
May 30, 2013, 11:35:03 AM5/30/13
to yal...@googlegroups.com
Dear Johan:
         Thank you very much for answering my question!
To be honest I want to convert my QCQP which CPLEX can't handle to another formulation.My model is in the attachment.
This model can be handled by ipopt. However when I add some discrete variables to the model, the solver will be invalid. Hence I want to convert this model into a simpify formulation which can be handled by CPLEX. Do you have any idea?
Thank you very much!
 Yours

QCQP.png

Johan Löfberg

unread,
May 30, 2013, 12:03:06 PM5/30/13
to yal...@googlegroups.com
Which are the decision variables? Which are binary? Which are integer

As you have written the model now, it is highly nonconvex, and the solution you have obtained from IPOPT are merely local solutions, i.e., you should be lucky that ipopt even managed to return something. As formulated, it can not be cast as a model suitable for cplex.

liuyibing

unread,
May 31, 2013, 1:34:51 AM5/31/13
to yal...@googlegroups.com
    I am sorry to tell you that V P Q are all decision variables. They are all sdpvar.So far I haven't added integer or binary variables to my model.As you said this model is merely nonconvex. Is there any method to convert this nonconvex QCQP to another problem?
Thank you!

Johan Löfberg

unread,
May 31, 2013, 1:36:51 AM5/31/13
to yal...@googlegroups.com
It is not a nonconvex QCQP. It is a general nonlinear problem, and I don't see any hope for it to be SOCP representable.

liuyibing

unread,
May 31, 2013, 1:41:59 AM5/31/13
to yal...@googlegroups.com
I am sorry to tell that I have regarded the V2 as a variable. The "r" and "x" are all constant.So the problem can be converted to a QCQP, all right?
thank you!

Johan Löfberg

unread,
May 31, 2013, 1:45:13 AM5/31/13
to yal...@googlegroups.com
I don't understand what you are saying. Which are the decision variables, and which are known constants. You may give an explicit example with, say, N=4.
Reply all
Reply to author
Forward
0 new messages