solver not applicable (cplex&gurobi)

37 views
Skip to first unread message

LIESEA LEUNG

unread,
Apr 24, 2019, 9:41:50 PM4/24/19
to YALMIP
Dear Löfberg
      I am building up the SOCP model like the picture, but after I use the cplex and gurobi as the solver, it has a warning that "Solver not applicable".
And I found that the problem maybe the equation(11), because I set the constraints only including the equation(11), and it gets "Solver not applicable".

捕获.JPG

the equation(11) code follows

for i=1:nbr
    t=Line(i,2);f=Line(i,1);
    constraints=[constraints,I(f,t)*V(f)>=(P(f,t)^2+Q(f,t)^2)];         
end


Thank you.




 

LIESEA LEUNG

unread,
Apr 24, 2019, 9:44:50 PM4/24/19
to YALMIP
And my version is the MATLAB2016b, cplex12.9, yalmip is the latest version.

Johan Löfberg

unread,
Apr 25, 2019, 1:58:00 AM4/25/19
to YALMIP
This model is not convex, and not SOCP represetable

optimize([x^2 + y^2 <= z*w])

This is though
optimize([x^2 + y^2 <= z*w,z>=0,w>=0])


YALMIP will detect that you are modelling a rotated SOCP cone, but for efficiency in  larger models, you should model that manually, norm([z-w;2*x;2*y]) <= z + w or even more efficiently cone([z+w;z-w;2*x;2*y])

With cplex 12.9, you must use the develop branch of YALMIP

LIESEA LEUNG

unread,
Apr 26, 2019, 3:38:32 AM4/26/19
to YALMIP
Thanks,after adding [z>=0], it works. But if I use the efficiency model like norm([z-w;2*x;2*y]) <= z + w or  cone([z+w;z-w;2*x;2*y])  , could gurobi solve it?

Johan Löfberg

unread,
Apr 26, 2019, 6:12:44 AM4/26/19
to YALMIP
yes, gurobi is an socp solver
Reply all
Reply to author
Forward
0 new messages