My formulated problem is a convex optimization, but I failed in solving it with CVX. I will show my MATLAB CVX program, result and the problem below.
%% CVX-begin zvq = zeros(q_num,1); cvx_begin variable x(3, node_num, q_num) nonnegative; variable y(q_num, node_num, node_num, 2) nonnegative; %2 means fi=[1,2,3], 3 will be instead by 2+1 variable p(uav_num, node_num) nonnegative; variable b(uav_num, node_num) nonnegative; variable z(q_num) nonnegative; expression c0(node_num); expression xx(3); maximize (rqi*z- ALPHA_P*sum(sum(p))) subject to x<=1; y<=2; z<=1; for qi = 1:q_num x(1, sd(qi,1), qi)==z(qi); % constrain-1 x(3, sd(qi,2), qi)==z(qi); % constrain-2 for n = 1:node_num for fi = 1:2 sum(y(qi,n,:,fi))-sum(y(qi,:,n,fi)) == x(fi, n, qi)-x(fi+1, n, qi); end if qi==1 % c0 is sums of each node for constarin-7 c0(n) = cqi(qi,:)*x(:,n,qi); else c0(n) = cqi(qi,:)*x(:,n,qi) +c0(n); end end sum(x(:,:,qi),1)<=1; % constrain-5 sum(x(:,:,qi),2)>=z(qi); % sum(sum(x(:,:,qi)))*delta_tq(qi,:)'<=tqi(qi); % constrain-6 end c0<=cn'; % constrain 7 sum(p,2) <= pmax';% constrain-9 (None 8) %% maybe bug1 ? for n = 1:bs_num for m = 1:node_num if m<=bs_num sum(y(:,n,m,:),4)'*lq<=lg1; % constrain-11-a else sum(y(:,n,m,:),4)'*lq<=lg2/3;% constrain-11-b end end end %% maybe bug2 ? for n = 1:uav_num for m = 1:node_num for fi = 1:2 y(:,n+4,m,fi)'*lq<=-rel_entr(b(n,m), b(n,m) + p(n,m)*H(n,m)/cigma)/log(2); % constrain-12 x*f(y/x) = -rel_entr(x,x+y) end end end sum(sum(b))<=B; % constrain-13 cvx_end
end
CVX Warning:
Models involving “rel_entr” or other functions in the log, exp, and entropy
family are solved using an experimental successive approximation method.
This method is slower and less reliable than the method CVX employs for
other models. Please see the section of the user’s guide entitled
The successive approximation method
for more details about the approach, and for instructions on how to
suppress this warning message in the future.
Successive approximation method to be employed.
** For improved efficiency, SDPT3 is solving the dual problem.**
** SDPT3 will be called several times to refine the solution.**
** Original size: 6849 variables, 3034 equality constraints**
** 42 exponentials add 336 variables, 210 equality constraints**
-----------------------------------------------------------------
** Cones | Errors |**
Mov/Act | Centering Exp cone Poly cone | Status
--------±--------------------------------±--------
** 0/ 36 | 8.000e+00 2.963e+04 2.963e+04 | Failed**
** 0/ 36 | 8.000e+00 2.726e+04 2.726e+04 | Failed**
** 0/ 36 | 8.000e+00 2.650e+04 2.649e+04 | Failed**
-----------------------------------------------------------------
Status: Failed
Optimal value (cvx_optval): NaN