# Gurobi.GurobiError(10020, “Q matrix is not positive semi-definite (PSD)

I have read some solutions for this problem I have using Gurobi. Most answered that Gurobi did not support non convex problems. However, the new version does and that doest work. I wonder if anyone can figure out where my problem is:

``````        sum(sum(mu_j[j,w]*(eta_j[j,w]+Pi_j[j,w]-xi_j[j]) for j=1:J) for w=1:W) +
sum(sum(eta_i[i,w]*theta_i[i,w] for i=1:I) for w=1:W) +
sum(sum(eta_j[j,w]*theta_j[j,w] for j=1:J) for w=1:W) +
sum((qF_i[i]-qmin_F_i[i])*numin_i[i] for i=1:I))

#constraints
@constraint(m, profit_i_def[i=1:I,w=1:W], Pi_i[i,w]==PF*qF_i[i]+PS[w]*qS_i[i,w]-a[i,w]-b[i,w]*(qF_i[i]+qS_i[i,w])-1/2*c[i,w]*(qF_i[i]+qS_i[i,w])^2)
@constraint(m, expect_prof_i[i=1:I], EPi_i[i] == sum(sigma_i[i,w]*Pi_i[i,w] for w=1:W))
@constraint(m, cvar_i_def[i=1:I],cvar_i[i] == xi_i[i]-(1/(1-alpha))*sum(sigma_i[i,w]*eta_i[i,w] for w=1:W))
@constraint(m, qS_i_def[i=1:I,w=1:W], qS_i[i,w] == tau_i[i]*(PS[w]-b[i,w]-c[i,w]*qF_i[i]))
@constraint(m, var_pi_def_i[i=1:I,w=1:W], var_pi_i[i,w] ==  var_PF_i[i]*qF_i[i]+PF+var_PS_i[i,w]*qS_i[i,w]+PS[w]*var_qS_i[i,w]-b[i,w]*(1+var_qS_i[i,w])-c[i,w]*(qF_i[i]+qS_i[i,w])*(1+var_qS_i[i,w]))
@constraint(m, cons_L1_i[i=1:I], sum((-(1-phi)*sigma_i[i,w]-mu_i[i,w])*var_pi_i[i,w] for w=1:W)-numin_i[i]+numax_i[i] == 0)
@constraint(m, cons_L2_i[i=1:I,w=1:W], (phi/(1-alpha))*sigma_i[i,w]-mu_i[i,w]-theta_i[i,w] == 0)
@constraint(m, cons_L3_i[i=1:I], -phi+sum(mu_i[i,w] for w=1:W) == 0)
@constraint(m, comp1_i[i=1:I,w=1:W],0<= eta_i[i,w]+Pi_i[i,w]-xi_i[i])``````