Cannot perform the operation {concave}*{affine}

(Abdelalim Kaoutar) #1

Hello everyone,

I’m trying to optimize a Logarithme function, which is convex. ( log (1+ matrix(10,5) * vector(5,1) , the matrix and and the vector are both nonnegative)
It’s been a while that i can’t handle with this error:
Disciplined convex programming error: Cannot perform the operation {concave}*{affine}
Which are major problems related to this error ?

thanks alot,


(Mark L. Stone) #2

Please state mathematically the complete problem you wish to solve. You need to make very clear what is input data to the optimization problem, and what are optimization (decision) variables.

The CVX functions entr and rel_entr can be used to model in CVX a number of convex problems involving log.

(Abdelalim Kaoutar) #3

Thank you for your fast reply.

Actually, the entr function is an entropy which is a product of log and element per element of the function inside.
For my side, i do not need to have this kind of product.
Just a simple log ! as :

variable p(L,K) nonnegative

for k=1:K
*_ FC=log(1+ Gamma(:,:,k)p(:,k)); % Gamma is generated nonnegative_
_ FC= FC + norm(FC,1);_

subject to
norm(p,0) <= P_M

Thank you

(Mark L. Stone) #4

If Gamma is input data (not a CVX variable or expression), then log(1+ Gamma(:,:,k)p(:,k)) is concave (however, maybe you’re not showing us everything, otherwise you would not have received the error “Cannot perform the operation {concave}*{affine}”). But 1-norm, or any other norm of that, is non-convex. It appears, though, that you always have something of the form log(1 + nonnengative_number), so is always >= 0. Therefore, you don’t need 1-norm, and can instead use sum, which is allowed.

In the constraint norm(p,0) <= P_M, the 2nd argument, 0, can not be < 1. However, things are rather confusing because you declared p to be a matrix variable, and I am guessing your intended constraint is not in terms of matrix norm, but perhaps in terms of vector norms (or sums) on rows or columns.