The cvx solves convex problems but inequality constraints sometimes take equal sign and sometimes not


When solving the above problem with cvx, the C7~C9 constraint should take equal sign or approximate equal sign, but sometimes it is not normal. After all, the right side of the inequality is the increasing function of E.V>0,v>0.

How big is the gap you got when it turned out not equal? It is normal if the gap is small. If its not, it could be some of your input data are too small (like 10^(-12)) or too big (10^(12)) or something else. Please show all your CVX and solver output, and, maybe provide a runnable code in Markdown format for the expert to reproduce.


Yes, not only is it unequal and sometimes the gap is huge.

For E, there is no large or small input, such as the order of V is usually on the order of 10 ^ -3, and the order of X (k) is usually on 10 ^ -4.

The signal to noise ratio in Shannon’s formula is usually between 10 ^ 3 and 10 ^ 6.

So it is very strange to get a solved E, which is much larger.

The state of each solution is “solved”.

Show all your cvx output from matlab console please

Do you mean that?




From your scan, clearly your CVX are using the solver Mosek. I am not the developer of it. But the Viol. con: 2e-06 in the output seem to be the violations of the constraints caused by the solver, which looks fine? I dont know. You can search those terms on mosek manual or this forum to see what they mean. The real Mosek developers/ experts here might help.


Is there any instructions for me to find the variable “c” 21 in the mosek warning

That might be the data cvx gave mosek after cvx preprocessed the original data of your problem. I think it is hard to know precisely which is which unless you trace them back and figure out what cvx did to them. But surely, that warning is not good. Maybe reformulate your problem or try a different solver.

Since CVX dualized your problem and Mosek complains about a large value in the objective, then the best guess is that you have this large number as one of your bounds.