How to maximize a quadratic Objective Function?
AnsweredHello:
I'm trying to solve the example quadratic problem in MATLAB (qp.m), but maximizing instead of minimizing. For this, one obviously must set the upper boundaries of the problem (model.lb = [100 100 100], for instace). Nevertheless, gurobi is not capable of doing this becauseof the 10020 error: Objective Q not PSD (negative diagonal entry). Set NonConvex parameter to 2 to solve model.
Is there a way to solve maximization
-
This error means that your quadratic objective function is not convex. To solve a model with a non-convex quadratic objective or constraints, please set the
NonConvex
parameter to 2. For more details, please refer to the article: ERROR 10020: Objective Q not PSD0 -
This actually solves my question. And, indeed, I tried to solve the problem with the specified parameter set to 2, and it worked. I'll work on my objective function being non convex.
Thank you very much!
0
Please sign in to leave a comment.
Comments
2 comments