Hi,

I'm developing a mathematical model for my thesis, whose objective function doesn't seem to be quadratic, and generally, non-linear. However, I encounter the error related to the indefiniteness of matrix Q. Could you please guide me what the problem might be?? The following is part of my code:

using CPLEX;

int n=...;//Number of customers

int N=2*n;//Number of customer nodes

int T=...;

range Nodes=0..N+1;

range Periods=1..T;

range Linehauls=1..n;

range Backhauls=n+1..N;

float Hd[0..n]=...;//Unit delivery unit time holding cost

float Hp[n+1..N+1]=...;//Unit pichup unit time holding cost

int c[Nodes][Nodes]=...;//Unit cost of transportation from consumer i to j

dvar int+ Id[0..n][Periods];//Inventory level of serviceable product at the depot

dvar int+ Ip[n+1..N+1][Periods];//Inventory level of cores at the depot

dvar boolean x[Nodes][Nodes][Periods];

dvar boolean y[Nodes][Periods];

dexpr float DeliveryHoldingCost=sum(i in 0..n, t in Periods)(Hd[i]*Id[i][t]);

dexpr float PickupHoldingCost=sum(j in n+1..N+1, t in Periods)(Hp[j]*Ip[j][t]);

dexpr float TransportationCost=sum(i,j in Nodes:i!=j, t in Periods)(c[i][j]*x[i][j][t]);

minimize DeliveryHoldingCost+PickupHoldingCost+TransportationCost;

...

Error:

CPLEX Error 5002: Q in 'id1399' is not positive semi-definite. General Unknown OPL Problem Marker

Thank you so much.