Help Formulating a CVXR Problem with Mixed Constraints (Linear + Norm)!

Hi everyone,

I am relatively new to CVXR and I am trying to model an optimization problem that involves both linear constraints and a norm-based objective. Specifically…, I want to minimize the L2 norm of a vector x, subject to a few linear inequality constraints like Ax ≤ b and an equality constraint like Cx = d.

I have read through some examples in the documentation…, but I am still unsure about the best way to properly set this up so that the DCP rules are satisfied. I am using CVXR in R and here’s a basic idea of my current approach:

x <- Variable(n)  
objective <- Minimize(norm(x, 2))  
constraints <- list(A %*% x <= b, C %*% x == d)  
problem <- Problem(objective, constraints)

Does this look valid, or am I missing something subtle in how CVXR handles these norms and constraints together: ?? Any insights or corrections would be really appreciated !! I have also read this thread https://ask.cvxr.com/t/problem-in-formulating-my-problem-in-cvx-advanced-excel-course-in-kolkata but still need some more help.

Thanks in advance !!

Marcelo

It definitely looks reasonable, but since this is a forum about CVX in Matlab and not CVXR in R, it is unlikely we can say much more.