Hello,everyone!
I used CVX to solve a convex optimization problem and got an result of “Failed”. One of the constraints which is further rewritten as the SOC form(see the picture).
I want to know if the corresponding code is correct?.

%parameter
pai1_f=sla_v_ini.pai1; %(E,N)
pai2_f=sla_v_ini.pai2; %(E,N)
ga3=gamaPJ;
…
cvx_begin
cvx_quiet true
cvx_solver sdpt3;
variable s
variable pai1(E,N)
variable pai2(E,N) nonnegative
expression F_45(E,N) %(45)
…
for e=1:E %(F45)
for n=1:N
F_45(e,n)=(pai1_f(e,n)-pai2_f(e,n))(pai1(e,n)-pai2(e,n))/4+ga3/2 -((pai1_f(e,n)-pai2_f(e,n))^2)/8-1/2;
end
end
…
maximize s;
…
subject to
for e=1:E %(45)
for n=1:N
norm([(pai1(e,n)+pai2(e,n))/2 F_45(e,n)])<=F_45(e,n)+1;%(45)
end
end
…
cvx_end

Please remove cvx_quiet true, and show all solver and CVX output.

Also, try a different solver, such as sedumi, and if available to you, mosek or gurobi.

One of the most common reasons for solver failure is “bad” input data, such as from poor scaling, with some input data many orders of magnitude from one.

That output shows that CVX"s successive approximation method was used, which means there must be some exponential cone (including log) type functions in your code. Apparently, they must be in code which you omitted. That was indeed a crucial omission.

You are getting a rather suspicious infeasibility certificate. First fix the scaling (see all the warnings) to get a numerically more stable problem where the coefficients and the expected solution are in reasonable range. Sections 8.1, 8.2 here will be useful https://docs.mosek.com/latest/toolbox/debugging-tutorials.html