# What should I do when the status is ‘Infeasible’ in cvx?

The code as following;
cvx_begin
variable traj(para.T+1, 2)
variable u(1, para.T)
variable v(1, para.T)
variable s(1, para.T)
variable omega(1, para.T)
expression avg_rate(1, para.T)

for ii=1:para.T
avg_rate(ii) =log(1+gamma0* C* 100*(1/norm([0,0,40]…
-para.place_user))*(para.kappa/(para.kappa+1)*omega(ii)…
+1/(para.kappa+1) * omega(ii))+D * (para.kappa/(para.kappa+1)*v(ii)…
+1/(para.kappa+1)*v(ii)))/log(2);
end

maximize 1/(para.T)*sum(avg_rate);

subject to
40960000 <= u;
1600<= v;
for ii=1:para.T
s(ii)<=s0(ii)+(3* traj0(ii,1)^2)* (traj(ii,1)-traj0(ii,1));
end

for ii=1:para.T
pow_pos(norm(traj(ii, :)-para.place_user(1:2)),2)+…
6400-v0(ii)^(-4/para.kappa)+…
4/para.kappa*(v0(ii)^(-4/(para.kappa)-1))*(v(ii)-v0(ii))<=0;
end

for ii=1:para.T
pow_pos(norm(traj(ii,:)-para.place_IOS(1:2)),2)+1600<=u(ii)^(1/2);
end

for ii=1:para.T
log(omega0(ii))+1/omega0(ii)* (omega(ii)-omega0(ii))…
+log(u0(ii))-1/u0(ii)* (u(ii)-u0(ii))…
<=log(s(ii));
end

for ii=1:para.T
pow_pos(norm(traj(ii+1,:)-traj(ii, :)),2)<=para.Vmax^2;
end

traj(para.T+1, :)==para.UAV_end(1:2);

cvx_end

Except for section 1, this also applies to CVX. https://yalmip.github.io/debugginginfeasible/