A surprised and puzzled error in CVX

Recently, I have met a puzzled error in using CVX. There is a sentence in my codes as follows.

objective_terem = adjust_constant * sum(log(1+P.*g));

where adjust_constant and g are the given constants, P is the variable. Both P and g are Nx1 vectors. adjust_constant is a adjustable scalar parameter, but it is aways larger than or equal to 0.

My codes usually runs correctly, however, once a while, a surprised error occurs at the above sentence. The error information is as follows.

Error using cvx/times (line 173)

Disciplined convex programming error: 

cannot perform the operation: {positive constant}.{concave} 

Error in cvx/mtimes (line 36) z = feval(oper,x,y); 

How surprised and puzzled! The sentence above completely conforms to the DCP ruleset, it seems there is no possibility to have an error. What’s worse, it usually runs correctly, error occurs only once a while. Why does this kind of error happen? I need your help, many thanks!

That would be a bug! You should definitely submit this at http://support.cvxr.com, please! Please include code to reproduce the problem—if I can’t reproduce it, it is unlikely I can fix it.

Respected Michael C. Grant,

Merry Chrismas! Thanks for your timely reply!

I’ll submit my document and code as soon as possible. In addition, the cvx version I use is 1.22.

Thank you again, with my best wishes!

Yuzhou Li

In that case you really should upgrade to 2.0. I actually will not be able to test out 1.22. My suspicion is that the bug is still there, though.

Respected Michael C. Grant, sincere thanks are given to your helpful guide. The error may be a bug of CVX version 1.22. I have test the same code on CVX version 2.0 (beta), it runs successfully without any error! With my best wishes!

That’s great news!