for o=1:10
cvx_begin
variables arfa(M,N) z(M,N) miu(M) v(M) seta
minimize(seta)
subject to
for j=1:M
for i=1:k(j)
arfa(j,i)>=0;
arfa(j,i)<=1;
z(j,i)>=0;
z(j,i)<=1;
z(j,i)*D(j,i)*J(j,i)/(f(j,i)*C)+(z(j,i)*lamda(j,i)+arfa(j,i)-z(j,i))D(j,i)/(CR(j,i))+z(j,i)*lamda(j,i)*D(j,i)*K(j)/(F(j,i)*C)+(1-arfa(j,i))*D(j,i)/F(j,i)<=miu(j);
z(j,i)*D(j,i)*J(j,i)/(f(j,i)*C)+(1-arfa(j,i))*D(j,i)/f(j,i)<=v(j);
end
miu(j)<=seta;
v(j)<=seta;
end
cvx_end
t(j,i)=z(j,i);
cvx_begin
variables miu(M) v(M) seta FF(M,N)
minimize(seta)
subject to
for j=1:M
for i=1:k(j)
FF(j,i)>=0;
z(j,i)*D(j,i)*J(j,i)/(f(j,i)*C)+(z(j,i)*lamda(j,i)+arfa(j,i)-z(j,i))*D(j,i)/(C*R(j,i))+inv_pos(FF(j,i))*z(j,i)*lamda(j,i)*D(j,i)*K(j)/C+(1-arfa(j,i))*D(j,i)*inv_pos(FF(j,i))<=miu(j);
z(j,i)*D(j,i)*J(j,i)/(f(j,i)*C)+(1-arfa(j,i))*D(j,i)/f(j,i)<=v(j);
end
miu(j)<=seta;
v(j)<=seta;
t=sum(FF');
t(j)<=Fm(j);
end
cvx_end
F=FF;
aa=seta;
end
Above is my code
Disciplined convex programming error:
Illegal operation: {concave} + {convex}
出错 sub2_2 (第 176 行)
z(j,i)*D(j,i)*J(j,i)/(f(j,i)*C)+(z(j,i)*lamda(j,i)+arfa(j,i)-z(j,i))D(j,i)/(CR(j,i))+inv_pos(FF(j,i))*z(j,i)*lamda(j,i)*D(j,i)*K(j)/C+(1-arfa(j,i))*D(j,i)*inv_pos(FF(j,i))<=miu(j);
in the sub1,the solution value of z is negative.