Hi all,
I’m formulating a convex optimization problem using CVX that involves numerous matrix 2-norm constraints (let’s say thousands or more), which consumes significant time during problem initialization.
To illustrate, here’s a simplified code example:
cvx_begin
variable X(100,100)
minimize norm(X,1)
subject to
for i = 1:50
norm(X(2*i-1:2*i, :), 2) <= 2;
end
cvx_end
As shown, the constraints require calculating 2-norms for every pair of rows in decision matrix X using a for-loop. This initialization process is time-consuming and takes much more time compared to the problem-solving phase. Given that my actual problem involves larger scales and far more constraints, accelerating this loop is crucial.
I attempted using the Parallel Toolbox with ‘parfor’, but encountered compatibility issues with CVX variables(which has been proved in some other posts). Additionally, while vector 2-norm constraints can utilize the ‘norms’ function for vectorized calculation, there appears to be no equivalent vectorized-based method for matrix 2-norms.
Has anyone encountered similar challenges or have suggestions for optimizing this constraint initialization process?
Thanks in advance!
Yizheng