rcone

rcone is used to simplify or speed up definition of rotated Lorentz cone constraints \(z^Tz \leq 2xy, x\geq 0, y\geq 0\)

Syntax

c = rcone(z,x,y)

Examples

Constraining the squared Euclidean norm of a vector \(x\) to be less than \(t\) can be done by using standard MATLAB code. YALMIP will automatically convert this to a corresponding SOCP if required, or treat it as a general quadratic constraint if a nonlinear solver is used.

x = sdpvar(n,1);
F = [x'*x <= t];

An alternative is to do this using a rotated Lorentz cone, if we know an SOCP solver will be used. The advantage is that the compilation of the optimization problem is faster (for large arguments)

x = sdpvar(n,1);
F = [rcone(x,t,1/2)];

This is equivalent to

x = sdpvar(n,1);
F = [cone([2*x;1-t], 1+t)];

Comments

YALMP now detects rotated Lorentz cones automatically from models of the type \(z^Tz \leq 2xy, x\geq 0, y\geq 0\). Note that non-negativity conditions have to be explicitly included in the model, otherwise the constraint is nonconvex and no cone constraint can be defined.