Efficient way to add a large number of hyperbolic constraints

I want the three rows of a positive matrix v (3xN) to be such that:

v(1,:slight_smile: < sqrt(v(2,:slight_smile: .* v(3,:))

As far as I know this is a conic constraint and I managed to set it in cvx by using:

P = [2 0 0; 0 1 -1]; q = [0; 1; 1];
for i = 1:N
    norm(P * v(:,i), 2) <= q' * v(:,i);

Because N is large (100โ€ฆ1000), this loop takes a few tens of seconds: longer than the optimization itself. The problem is correctly recognized as SOCP (no SDP blocks).

I have tried an alternative coding:

v(1,:)' <= geo_mean(v(2:3,:), 1)';

which takes virtually no time to set up but unfortunately cvx now reports the presence of a large number of SDP blocks. As far I as understand solving an SOCP problem using as an SDP may be inefficient and is discouraged.

I would like to know if there is a better way to set the constraint than the two that I have tried; possibly an efficient way that is faster to set up but keeps the problem within an SOCP framework.



Donโ€™t worry about the SDP blocks. If theyโ€™re 2x2, (which they will be in this case), CVX will convert them to equivalent SOCP blocks if necessary.

Thanks for you answer, mcg!!