# Illegal operation: {constant} + {invalid}

Hello, I am new to the CVX optimization box. Recently, I am trying to solve a convex optimization, which can be mathematically formulated as follows,

Then, I transfer it into the CVX language in MATLAB (R2012b 64bits) as follows,

(Note: are constant positive numbers, and denoted by para_ak, para_bk, para_ck, para_dk, para_ek, q_temp and para_sigma, respectively, in the following program.)

(1) The main part,

cvx_begin
variable x_var(2,1); % the definition of optimization variables;
maximize (Fun_obj(x_var,para_a1,para_b1,para_c1,para_a2,para_b2,para_c2,para_sigma,q_temp,para_d1,para_e1,para_d2,para_e2));
subject to
exp(x_var)<=p_dmax; % the local power constraints at both D-T and D-R;
exp(x_var)*[T1_matr(label_dlk,label_chn);T2_matr(label_dlk,label_chn)]<=(p_cmax/C_vec(label_chn)-N_matr(num_dlk+label_chn));
cvx_end;

(2) The definition of the objective function to be maximized,

function val_obj=Fun_obj(x_var,para_a1,para_b1,para_c1,para_a2,para_b2,para_c2,para_sigma,q_temp,para_d1,para_e1,para_d2,para_e2)
val_obj=0;
val_obj=val_obj+log2(exp(1))para_d1(x_var(1)-log_sum_exp([log(para_a1)+x_var(1),log(para_b1)+x_var(2),log(para_c1)]))+para_e1;
val_obj=val_obj+log2(exp(1))para_d2(x_var(2)-log_sum_exp([log(para_a2)+x_var(2),log(para_b2)+x_var(1),log(para_c2)]))+para_e2;
val_obj=val_obj-q_temppara_sigmasum(exp(x_var));

(3) Finally, I got the following error message,

Error using cvx/plus (line 83)
Disciplined convex programming error:
** Illegal operation: {constant} + {invalid}**

Error in EEFD_sub32>Fun_obj (line 59)
val_obj=val_obj+log2(exp(1))para_d1(x_var(1)-log_sum_exp([log(para_a1)+x_var(1),log(para_b1)+x_var(2),log(para_c1)]))+para_e1;

Correction: The original problem is not a convex optimization, but it can be transferred into a convex optimization by some change with the optimization variables as shown in the optimization model.

Hi,
anyone can help me to solve this problem ? thank you so much