Solver not applicable

51 views
Skip to first unread message

覃岭

unread,
Jun 10, 2014, 11:31:45 AM6/10/14
to yal...@googlegroups.com
%nodes
%       1 2     3     4
Node = [1 1.15 0.85 28;
       
2 1.15 0.85 28;
       
3 1.15 0.85 28;
       
4 1.15 0.85 28;
       
5 1.15 0.85 28;
       
6 1.15 0.85 28];
NodeCount = size(Node,1);
z_n = sdpvar(NodeCount,NodeCount);%self-reactance of nodes

CommonConstraints = [ ,...%many other constraints
1./repmat(Node(:,4),1,NodeCount) <= z_n  
];

above is a part of my model, when I solve it by cplex 12.6 in matlab 2014a, yalmip reports -4 error with information "Warning: Solver not applicable (cplex)".
then I change it:

for i=1:NodeCount
   
CommonConstraints = [CommonConstraints,...
   z_n2
(:,i).*Node(:,4) >= 1,...
   
];
end

then the model can be solved successfully.
I don't know why. Please help me, johan. Thanks

Johan Löfberg

unread,
Jun 10, 2014, 12:02:06 PM6/10/14
to yal...@googlegroups.com
Both sides of the inequality are symmetric, hence the constraint is interpreted as a semidefinite constraints, which cplex does not handle. If you want x>=y to be interpreted elementwise for symmetric x and y, you would have to do, e.g., x(:)>=y(:) or triu(x)>=triu(y)

覃岭

unread,
Jun 12, 2014, 8:47:42 AM6/12/14
to yal...@googlegroups.com
CommonConstraints = [CommonConstraints,...
1./repmat(Node(:,4),NodeCount,1) <= z_n(:) ,...
];

It works.
Reply all
Reply to author
Forward
0 new messages