Using command 'rcone' to define a rotated Lorentz cone constraint

28 views
Skip to first unread message

wei chen

unread,
Jan 26, 2018, 9:45:56 AM1/26/18
to YALMIP

hi there, I want to define this rotated Lorentz cone constraint in Matlab






And here is my code, is that right? 

constraint = [ constraint, rcone( [Pij(iofbranch,1) ; Qij(iofbranch,1)], V(Initialbus,1), 1/2*I(iofbranch,1) ) ];

thanks!

Johan Löfberg

unread,
Jan 26, 2018, 10:09:44 AM1/26/18
to YALMIP
If 1/2*I(iofbranch,1) is a complicated why of saying 1, yes then it looks correct

wei chen

unread,
Jan 26, 2018, 10:20:03 AM1/26/18
to YALMIP
Sorry I don't get you,but here is my full code you can check it out. 
Pij = sdpvar (6, 1);
Qij = sdpvar (6, 1);
I = sdpvar (6, 1);
V = sdpvar(6,1);
for iofbranch = 1:6
    Initialbus =Branch(iofbranch,2);
    Finalbus =Branch(iofbranch,3);
  
    constraint = [ constraint, rcone( [Pij(iofbranch,1) ; Qij(iofbranch,1)], V(Initialbus,1), 1/2*I(iofbranch,1) ) ]; 
 end


Johan Löfberg

unread,
Jan 26, 2018, 10:25:40 AM1/26/18
to YALMIP
misunderstood your picture. thought ite variable was called VI, not that it said V*I. looks fine. 

wei chen

unread,
Jan 26, 2018, 10:36:31 AM1/26/18
to YALMIP
thanks a lot!
Reply all
Reply to author
Forward
0 new messages