# When iteration turns 5,program fails

Dear all,

My problem is that when iteration turns 5,program fails and the following is the program and the result:

``````cvx_begin
variables u(N) xq(N) yq(N)
expression y(N)
for i=1:N
y(i) = -B/log(2)/((B+(u0(i)))*u0(i))*u(i);
end
maximize (sum(y)/N)
subject to
xq(1) == xqs;
yq(1) == yqs;
(xq(N)-xqf)^2+(yq(N)-yqf)^2 <= D^2;
for i =1:N-1
(xq(i)-xq(i+1))^2+(yq(i)-yq(i+1))^2 <= D^2;
end
for i =1:N
dSR2(i) = (xq(i)-xs)^2+(yq(i)-ys)^2+zq^2;
dRD2(i) = (xq(i)-xd)^2+(yq(i)-yd)^2+zq^2;
pow_p(u(i),(2/K)) >= 1/2*(pow_pos(dSR2(i)+dRD2(i),2)-(pow_p(dSR02(i),2)+pow_p(dRD02(i),2)))+(-2*dSR02(i)*((xqt(i)-xs)*(xq(i)-xqt(i))+(yqt(i)-ys)*(yq(i)-yqt(i)))-2*dRD02(i)*((xqt(i)-xd)*(xq(i)-xqt(i))+(yqt(i)-yd)*(yq(i)-yqt(i))));
end
cvx_end
``````

## Calling SDPT3 4.0: 7400 variables, 3198 equality constraints For improved efficiency, SDPT3 is solving the dual problem.

num. of constraints = 3198
dim. of sdp var = 4400, num. of sdp blk = 2200
dim. of linear var = 800

SDPT3: Infeasible path-following algorithms

## number of iterations = 5 residual of dual infeasibility certificate X = 3.86e+00 reldist to infeas. <= 9.27e+00 Total CPU time (secs) = 0.63 CPU time per iteration = 0.13 termination code = 2 DIMACS: 5.4e+10 0.0e+00 1.0e+01 0.0e+00 -1.0e+00 2.1e+00

Status: Infeasible
Optimal value (cvx_optval): +Inf

Crude Successive Convex Approximation is unreliable. Read my posts in this forum.