Skip to main content
Solved

Warning: CPLEX: Q matrix is not positive semi-definite.

  • April 20, 2021
  • 2 replies
  • 510 views

Forum|alt.badge.img

HI everyone, so I have to model a problem but when I run the procedure, it tells me: 

Warning: CPLEX: Q matrix is not positive semi-definite.
Warning: Model status 13: Error no solution, Solver status 9: Error: Setup failure (see message window).

I have no idea where my mistakes are, that's why I come to ask for your help.

so here is my problem :
I have 4 variables, X(j,i) and Q(i,l) are non negative and Y(i) and E(i) are binary variables

My function to minimize is : sum( (j,i), csb(j,i)*X(j,i) ) + sum( (i,l), cbd(i,l)*Q(i,l) ) + sum( i, ce(i)*E(i) ) + sum( i, co(i)*Y(i) )

My constraints are: 

sum(i, X(j,i)*Y(i)) <= capmp(j)

sum(l, Q(i,l)) <= capb(i) + 50*E(i)

sum(i, Q(i,l)) >= ed(l)

8.333*(sum(j, X(j|j="Afyon",i))+sum(j, X(j|j="Konya",i))) + 9.091*sum(j, X(j| j="Import",i)) = sum(l, Q(i,l))

sum(i, Y(i|i="Istanbul")) =1

sum(i, Y(i|i="Ankara")) =1

sum(i, Y(i|i="Izmir")) + sum(i, Y(i|i="Sakarya")) + sum(i, Y(i|i="Adana")) =1

sum(i, E(i|i="Izmir")) + sum(i, E(i|i="Sakarya")) + sum(i, E(i|i="Adana")) + sum(i, E(i|i="Sakarya")) + sum(i, E(i|i="Adana"))  =1

 

From my point of view, I think the problem should be either in the first 4 constraints or in the objective function but I’m not sure..

Thanks you in advance! 😁

Best answer by Anonymous

Dear Mmoureau,

Good to see that you have already found the problem. However, I write an answer in case somebody else faces a similar problem.

The first constraint, i.e., sum(i, X(j,i)*Y(i)) <= capmp(j), makes the problem nonlinear. The optimization problem is formulated as an MIQCP problem and because the first constraint is not convex, CPLEX is unable to solve it. Check THIS LINK for more information.
 
The solution would be to define auxiliary variable Z = XY and formulate the problem as an MILP. You can refer to Chapter 7.7 of the AIMMS Optimization Modeling book for more information about the procedure of making your problem linear.

2 replies

Forum|alt.badge.img
  • Author
  • Explorer
  • 1 reply
  • April 20, 2021

Don’t worry, I found my mistakes :D 


  • 0 replies
  • Answer
  • April 20, 2021

Dear Mmoureau,

Good to see that you have already found the problem. However, I write an answer in case somebody else faces a similar problem.

The first constraint, i.e., sum(i, X(j,i)*Y(i)) <= capmp(j), makes the problem nonlinear. The optimization problem is formulated as an MIQCP problem and because the first constraint is not convex, CPLEX is unable to solve it. Check THIS LINK for more information.
 
The solution would be to define auxiliary variable Z = XY and formulate the problem as an MILP. You can refer to Chapter 7.7 of the AIMMS Optimization Modeling book for more information about the procedure of making your problem linear.


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator