Hey,
I am trying to work with the code given below to find optimal values of X. W,Y,k_1,k_2,k_3,h are all positive constants. But the optimal value that I get is not the same as cvx_optval. I would be thankful if you could please tell why this is happening and also suggest ways to remove this error.

cvx_begin quiet

cvx_precision best
cvx_solver SDPT3
variable X(1,N)
y = inv_pos(min(W*(log(Y+X)/log(2))-W*(log(Y)/log(2))))*(k_2 + k_3) + k_4;
x = k_1 + (1/N)*sum(inv_pos(W*(log(Y+X)/log(2))-W*(log(Y)/log(2)))) + y ;
minimize x
X >= 0
sum(X) <= 0.01
sum(X.*h) <= 10^-8

There is no way we can diagnose this for you without the actual data. But I’m thinking it is a combination of a) a scaling issue and b) the use of the experimental successive approximation.

The data that I am using and corresponding results are:
Data: k_1 = k_2 =0; W = 6*10^6; Y = 1.0e-007 * [0.1296 0.0798 0.0711 0.0515 0.0432]; k_3 = 0.1427 ; k_4 = 2.6393e-008; RESULT : X = [0.0044 0.0007 0.0007 0.0014 0.0027]; cvx_optval =2.9918e-005 ;opt_val=1.4169e-005

The results are only correct for a few set of values even when I have scaled the values to a suitable magnitude.I require it to work for all possible values. Do you think Mosek will work better? Can you plz suggest any other solver ,as SeDuMi and SDPT3 are not giving desired results.