# Gurobi R positive semidefinite matrix

Hi, I am solving a quadratic integer programming problem with Gurobi

min x'Qx

where Q = A'A, which mathematically should be positive semidefinite. In practice, however, sometimes gurobi R interface shows an error message saying that "Objective Q not PSD (diagonal adjustment of 2.3e+02 would be required)".

I understand that this is just a numerical problem. If I have Q = Q/230, then everything works fine.

Although I'm able to solve the issue for this very Q by manually multiplying an adjustment coefficient, I have many other different Qs to work with. An adjustment coefficient of 230 works for this Q, but not others.

Any idea how I can figure out the adjustment coefficient for different Qs so that my adjusted Q could be always (numerically) positive semi-definite? Maybe it has something to do with the numerical tolerance of gurobi?

Please sign in to leave a comment.

## Comments

0 comments