Why there are some negative solutions?

I have constrained variables are non-negative. But the solution contains the negative solutions. Why?
My code is

   variable x(N); 
   expression SINR(N);
   expression R(N);   
for n=1:N
 minimize sum(theta.*x);
 subject to

Just how negative are they? Very small negative values are to be expected sometimes due to roundoff error.

There are not small. I do not know why. Is that because I use the sentence
for i=1:N_user
for j=1:ch
for k=1:WAP
for n=1:ch_u
Since the objective function include the form of x*log(1+y/x)

Is it working using the
rel_entr(x,x+y) to represent xlog(1+y/x)?
Why the solution is negative, even though I have constraints on x,y, x,y>0?
Is this a bug of cvx?

I’m going to guess a scaling error; the 10^6 value leads me to believe this is the case. CVX simply can’t handle large dynamic ranges of values (this is a limitation of the underlying solvers, really).

But also, as CVX warned you, rel_entr relies on the successive approximation method. If it’s not working for you, there’s not a lot that we can do about it. We’re waiting on solvers to be developed that can handle such functions natively.

Thank you for your reply. Do you have any idea which package or software I can use to solve this kind of problem?
Best regards


How about SCS http://web.stanford.edu/~boyd/papers/pdf/scs.pdf , for which your advisor is one of the co-authors? Is there hope of getting that into CVX, not only for such things as exponential cone support, but for large-scale problem capabilities which might give an easier to use alternative to TFOCS for certain problems beyond the capacity of CVX’s 2nd order solvers?

Oh, the solvers, and CVX support for such, are definitely coming. In fact I have preliminary support for the new SCS in 3.0 beta, but I’ve recently received enough bug reports there that I’m not ready to start recommending that. ECOS has also recently added support for exponential cones, so I’m looking forward to integrating both at some point. Frankly I’d love nothing better than to jettison the successive approximation support completely.

May I ask if you have solved this problem? I have encountered a similar problem and don’t know how to solve it.

You can follow the advice at CVXQUAD: How to use CVXQUAD's Pade Approximant instead of CVX's unreliable Successive Approximation for GP mode, log, exp, entr, rel_entr, kl_div, log_det, det_rootn, exponential cone. CVXQUAD's Quantum (Matrix) Entropy & Matrix Log related functions