How I can tackle the error related to the Invalid constraint: {convex} >= {convex}?

Please assist me in resolving the following error:

Error using cvxprob/newcnstr
Disciplined convex programming error:
Invalid constraint: {convex} >= {convex}

Error in >= (line 21)
b = newcnstr( evalin( ‘caller’, ‘cvx_problem’, ‘’ ), x, y, ‘>=’ );

I have encountered the above error, and I believe the constraint depicted in the following picture is convex and should function properly. However, I am unable to resolve this using CVX. I would greatly appreciate any assistance from someone who can help me with this issue.

It is necessary to mention that W is optimization variable.

Where is your proof that the constraint is negative? How do we know your belie is correct?

I will assume this is not a convex constraint, unless you show otherwise.

Thank you so much for your reply, Mark!

I recall from Boyd’s Convex Optimization book that the norm operation preserves convexity. Therefore, when we have a summation of norms, the resulting expression remains convex. Additionally, the summation itself also preserves the convexity of the previous formula.

Hence, I can confidently state that both sides of the inequality are convex. Do you agree with me?

Both sides of the constraint being convex does not imply that the constraint is convex. if you can put it in the form
{convex expression} <= {constant}
or {convex expression} <= {affine expression},
that will show the constraint is convex.

BTW, norm of an affine expression is convex. Norm of a nonlinear expression is not necessarily convex (although in some cases it is).

Okay. I recently came across a paper that suggests these types of constraints are convex and can be solved using convex optimization tools like CVX. I’ve provided the link of the mentioned paper below:

[Link to the paper: Energy Efficient Resource Allocation for IRS Assisted CoMP Systems | IEEE Journals & Magazine | IEEE Xplore]

In the paper, on page 6 and in equation (11), they mention that the converted constraint is convex. I would appreciate it if you could take a look and share your opinion.

Could you also advise me on how to convert it to a convex form?

Please reread the link in my previous post. it is your responsibility to prove that the optimization problem you are trying to solve is a convex optimization problem. Do not make a vague claim about some vaguely-specified problem, based on your cursory reading of some paper without understanding in detail what specific claims are made, and why they are true (if they are true, which not all claims in papers published even in prestigious refereed journals are).

A Difference of Convex Programming problem (DC) is not a convex optimization problem. To solve such a problem with CVX requires solving a series of convex optimization problems, for which the best you can generally hope is to get a locally optimal solution, and you might not even succeed at accomplishing that.

Thank you so much for your prompt response. I have reviewed most of the sections in the provided link.

I will now go through it and address the error.

Thanks again!

Dear Mark,

I have another question. I have tried several times using different university domain emails and devices to request a university license for MOSEK. Unfortunately, I have been unsuccessful, and the request page displays the following message to me:

“Invalid host ID: should be 12 hex digits (colons/dashes optional)”

Could you please advise me on how to proceed with the request?

Thank you again.

To clarify, the above post addresses the lack of need for an academic license for CVX. it sounds like your difficulty is with attempting to get a CVX license, which you do not need.

If you have difficulty getting a Mosek license, which it sounds like is not the problem, that is a matter to take up with Mosek.

Thank you so much for your response. Please accept my apologies for the delay. I have been quite busy lately.

In my model, I have some integer variables that I believe need to be solved using MOSEK. Therefore, I have been attempting to obtain an MOSEK license for my CVX. Unfortunately, I have not been able to resolve this issue yet, and I am planning to reach out to MOSEK for assistance.

I attempted to convert this constraint to a convex format using DC approximation. However, when I ran the code, I encountered the following error:

Error using cvx/log
Disciplined convex programming error:
    Illegal operation: log( {convex} ).

I recall using DC approximation several years ago to address the non-convexity of a problem. In this code, I also used the logarithm, as shown below. Unfortunately, I cannot remember the specific method I used to resolve this error. I would appreciate any assistance you could provide.

cvx_begin quiet
% cvx_solver MOSEK
variable p2(numuser,numcodebook,numBS) nonnegative
expression Rate(numuser,numcodebook,numBS)
% expression Rate_m(numuser,numcodebook,numBS)
expression max_p(numBS,1)
for num_bs=1:numBS
m=[m m1'];
n=[n n1'];
z=[z num_bs*ones(1,length(m1))];

for i=1:size_vec
    for j=1:size_vec
        for f=1:size_vec
%             Rate_m(m(i),n(j),z(f))=s(m(i),n(j),z(f)).*(log(I+p2(m(i),n(j),z(f)).*g1(m(i),n(j),z(f))+var_noise)/log(2)-log(I_pre+var_noise)/log(2)-(I-I_pre)/(I_pre+var_noise));
% for j=1:numcodebook
%     for f=1:numBS
%         f1=1:numBS;
%         f1(f)=[];
%         I=sum(sum(p2(:,j,f1).*g1(:,j,f1),3));
%         I_pre=sum(sum(p(:,j,f1).*g1(:,j,f1),3));
%         Rate(:,j,f)=s(:,j,f).*(log(sum(sum(p2(:,j,:).*g1(:,j,:),3)))/log(2)-log(I_pre+var_noise)/log(2)-1/(I_pre+var_noise)*(I-I_pre));
%     end
% end
obj=sum(sum(sum(Rate)));% objective function equation 5
maximize (obj)
subject to
%% fronthaul limitation
% sum(sum(Rate_m,1),2)>=-Rmax;
%% maximum power constraint
for ff=1:numBS

It is your responsibility to understand the paper you are trying to implement, including how to use DC to solve a non-convex optimization problem presented therein.