Disciplined convex programming error: Cannot perform the operation: {concave} .* {log-affine}


#1

Hello,everyone!!!
I am a new uesr of cvx. This is my problem as follow:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [F,S,q] = ADMM_cvx(B1,B2,p1,p2,L11,L12,L21,L22,SINR,C1,C2)

c=log(1+SINR)/log(2);
cvx_begin gp
variables f11 f12 f21 f22 s111 s112 s121 s122 s211 s212 s221 s222 borrow

b1=B1-borrow;
b2=B2+borrow;
net1_sum1=b1*f11*s111*c;
net1_sum2=b1*f11*s112*c;
net1_sum3=b1*f12*s121*c;
net1_sum4=b1*f12*s122*c;
net2_sum1=b2*f21*s211*c;
net2_sum2=b2*f21*s212*c;
net2_sum3=b2*f22*s221*c;
net2_sum4=b2*f22*s222*c;
net1=net1_sum1+net1_sum2+net1_sum3+net1_sum4;
net2=net2_sum1+net2_sum2+net2_sum3+net2_sum4;

 minimize (-log(net1)/log(2)-log(net2)/log(2))

subject to


1b1*f11*s111*c>=L11;
b1*f11*s112*c>=L11;
b1*f12*s121*c>=L12;
b1*f12*s122*c>=L12;

borrow<B1

f11+f12<=1;
s111+s112<=1;
s121+s122<=1;

b2*f21*s211*c>=L21;
b2*f21*s212*c>=L21;
b2*f22*s221*c>=L22;
b2*f22*s222*c>=L22;

borrow*p1<=C2;

f21+f22<=1;
s211+s212<=1;
s221+s222<=1;

f11>=0;
f12>=0;
f21>=0;
f22>=0;
s111>=0;
s112>=0;
s121>=0;
s122>=0;
s211>=0;
s212>=0;
s221>=0;
s222>=0;

cvx_end

F=[f11 f12;
    f21 f22];
S=[s111 s112 s121 s122;
    s211 s212 s221 s222];
q=borrow;

end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Please point out my mistake!!!


(Mark L. Stone) #2

You have violated CVX’s GP rules.http://cvxr.com/cvx/doc/gp.html .You are multiplying b1, which is a difference of two variables, by other variables to produce net1_sum1; hence the error message. Of course there wold be many more error message if CVX ever got that far.

Have you proven your problem is convex (representable by GP mode)?

I will mark this problem as non-convex unless and until you show otherwise.