Gurobi 10.0.1: Error: Objective Q not PSD (negative diagonal entry)

59 Views Asked by At

I wrote an optimizaton model and I tested it on ampl using gurobi solver. The solver gives me the following error: “Gurobi 10.0.1: Error: Objective Q not PSD (negative diagonal entry)”. I don’t know what it means and how can I solve it. (I only used binary or positive variables). Ps. The model should be an assignment problem, in this configuration: products to machines, modules to machines and task to modules.

I’ve already tried to set nonconvex=2, but it doesn’t work. I don’t understand if the problem is that the model is not linear. The model is the following:

``  set J:= 1..n; 

    param m;
    set K:= 1..m; 

    param p;
    set I:= 1..p; 

    param f;
    set L:= 1..f;  

    var x {K, J} binary; 
    var w {K, L} binary; 
    var q {I, J} integer >=0; 

    param V {I} >=0;  
    param D {J} >=0;  
    param M {J} >=0;  
    param a {I, L} binary;  
    param b {J, L} binary;   
    param g {K, L} binary;  
    param t_lav_ord {L, I, J} >=0; 
    param t_op {I, J} >=0;  
    param t_lav_mo {L, I, K, J} >=0; 
    param t_setup {K, J} >=0; 
    param Cu {I, J, L} >=0; 
    param C {K} >=0; 
    param Cu_mod {I, J, K, L} >=0; 

    #funzioni obiettivo
    minimize time: (sum{j in J, l in L, k in K, i in I} q[i, j] * (t_op[i, j] + a[i, l] * x[k, j] * w[k, l]     * t_lav_mo[l, i, k, j] + (1- x[k, j]) * a[i, l] * t_lav_ord[l, i, j])) + (sum{k in K, j in J} x[k, j] * t_setup[k, j]) ;
    minimize cost: (sum {j in J, k in K} x[k, j] * C[k]) + (sum { j in J, k in K, i in I, l in L} q[i, j] *   a[i,l] * (x[k, j] * w[k, l] * Cu_mod[i, j, k, l] + (1 - x[k, j]) * Cu[i, j, l])) ;

    #vincoli
    subject to volume {i in I, l in L}: sum{j in J} q[i, j] = V[i] ;
    subject to Nmax_mod {j in J}: sum{k in K} x[k, j]<= M[j] ;
    subject to lav_modulo {k in K, l in L}: w[k, l]<= g[k, l] ;
    subject to ass_lav_macchina_modulo {i in I, l in L}: sum{j in J} (b[j, l] + sum{k in K} w[k, l] * x[k, j]) >= a[i,l] ;
    subject to ass_disp {j in J}: sum {l in L, k in K, i in I} (q[i, j] * (t_op[i, j] + a[i, l] * x[k, j] *  w[k, l] * t_lav_mo[l, i, k, j] + (1- x[k, j]) * a[i, l] * t_lav_ord[l, i, j])) + (sum{k in K} x[k, j] *  t_setup[k, j]) <= D[j] ;`

Please help me, it’s the first time that I use this solver and that I create a model.
0

There are 0 best solutions below