Homogeneous problem detected; solution determined analytically

Here’s my optimization problem and cvx’ output as following:
whatever I add constrains or not ,Fi and W always can’t be solved with AO algorithm.
I don’n know what am i wrong?

Homogeneous problem detected; solution determined analytically.
Status: Solved
Optimal value (cvx_optval): +0

Please show a complete reproducible program. We have no idea what your code is.

Did you look at the variable values after CVX execution? Do they result in objective value of zero? Do they satisfy all the constraints? Is that solution optimal? If yes to all of these questions, and you don;t “like” that solution, then your formulation presumably is deficient.

Did you remember to include the constraint sum(tau) == 1 If not, perhaps CVX was able to determine that tau = vector of zeros is optimal, and did so without calling a solver.

Dear Mark,
The reason why I did’t include the constrain sum(tau)=1 was I thought it should be iterated by one dimension search method. so I consider it as a new AO variable.

I try to add this constrain to the optimization problem,but the optimal value still is zero.
here’s my program.

 function [W,flag] = Generate_TS_W(N, M, K, H, G,...  
          W_ini,Fi_ini_TS,t_ini,noise_maxpower, trans_maxpower)

%%

%cvx_solver mosek
%cvx_save_prefs

cvx_begin %quiet
variable W(N,K) complex
variable tau(K)

expressions  POLY_TS(K)  ;
%obj_function=polynomial 1-polynomial 2 +polynomial 3 are scalar
Phi=Fi_ini_TS;
%Fi_k=zeros(1,M);

k=1:1:K;%该两个条件必须并列执行
u=K:-1:1;%k,u的维度必须相同!
for i=1:length(k)
    if k(i)==1 && u(i)==1
    a(k(i))=0.5;
    H_eqvi(k(i),:)=H(:,k(i))'+Fi_ini_TS(k(i),:)*G(:,:,k(i));
    H_eqvi(u(i),:)=H(:,u(i))'+Fi_ini_TS(u(i),:)*G(:,:,u(i));%两种fi反射系数两种用户。
    H_eqv(k(i),:)=H(:,k(i))'+Phi(k(i),:)*G(:,:,k(i));
    H_eqv(u(i),:)=H(:,u(i))'+Phi(u(i),:)*G(:,:,u(i));
    B_g1(k(i))=H_eqvi(k(i),:)*W_ini(:,k(i));%四种beamforming组合 for given point.
    B_g2(k(i))=H_eqvi(k(i),:)*W_ini(:,u(i));
    B_g3(k(i))=H_eqvi(u(i),:)*W_ini(:,k(i));
    B_g4(k(i))=H_eqvi(u(i),:)*W_ini(:,u(i));
    B_1(k(i))=H_eqv(k(i),:)*W(:,k(i));%四种beamforming组合 
    B_2(k(i))=H_eqv(k(i),:)*W(:,u(i));
    B_3(k(i))=H_eqv(u(i),:)*W(:,k(i));
    B_4(k(i))=H_eqv(u(i),:)*W(:,u(i));
    %%%%%  Generate  Polynomial 1  %%%%%
    POLY_1(k(i))=2/noise_maxpower*real(B_1(k(i))'*B_g1(k(i)));
    
     %%%%%  Generate  Polynomial 2 %%%%%
     c(k(i))=(abs(B_g1(k(i)))^2)/(noise_maxpower*(noise_maxpower+abs(B_g1(k(i)))^2));
     POLY_2(k(i))=c(k(i))*(abs(B_1(k(i)))^2+noise_maxpower);
     %%%%%  Generate  Polynomial 3 %%%%%
     f(k(i))=1/(noise_maxpower+abs(B_g3(k(i)))^2);
     POLY_3(k(i))=f(k(i))*abs(B_3(k(i)))^2;
     %%%%%  final polynomial %%%%%
     POLY_TS(k(i))=a.*tau(k(i))*(POLY_1(k(i))- POLY_2(k(i))-POLY_3(k(i)));
    end
end 

maximize sum(POLY_TS)

subject to
   for i=1:length(k)
      if k(i)==1 && u(i)==1
         norm(W,'fro')^2<=trans_maxpower;
         sum(tau)==1;
         %z(k)>=noise_maxpower;
     end
   end
cvx_end





if cvx_status(1)=='S' || cvx_status(3)=='a' 
flag=1; 
else
flag=0;
end
end

input data:

N=3;M=6;K=2;noise_maxpower  = 1;trans_maxpower=100 ;
b=2*pi;a=0;
Fi_temp=(b-a).*rand(2,M) + sqrt(-1)*(b-a).*rand(2,M);
Fi_amp=rand(2,M);
Fi_ini_TS=Fi_amp.*exp(1j*angle(Fi_temp));
W_ini=randn(N,K)*sqrt(trans_maxpower/(N*K));
H=rand(N,K);
G=rand(M,N,K);

You haven’t provided a reproducible problem because you haven’t included the input data. You haven’t shown us the CVC variable values after CVX exits.

Further, I don’t understand constraint(s) C2. I have no idea what that notation means in terms of what sums over tau are constrained. is is saying sum(tau) == 1 and 0 <= tau <= 1 , or does that mean something else? It doesn’t make sense that you have the same constraint sum(tau) == 1 inside an if insides a for loop. I have no idea what k(i) is, etc.

I haven’t checked your program to see whether it matches, in part because I don’t think the image clearly states what the optimization problem is.