Quadratic Programming with Non-Convex Objective Function
AnsweredDear professor,
I am trying to solve the following quadratic programming problem with linear constraints:
min/max x' Q x + c' x
s.t. A x ≤ b
where x is the K x 1 vector of variables, Q is K x K matrix, c is K x 1 vector, A is J x K matrix, b is J x 1 vector. Note that Q is NOT positive semidefinite matrix, i.e., the objective function is not convex. Would you mind sharing your ideas about how to solve it in Gurobi?
Thanks!
-
Hi Peizan,
Since version 9, the Gurobi Optimizer supports solving models with noncovex quadratic objective function (see “What types of models can Gurobi solve?”). You need to build your model using one of Gurobi APIs and then call model.optimize() to solve the model (see Gurobi Examples for examples of using different APIs to cast your model formulation into a form Gurobi Optimizer understands). In case of using Gurobi versions < 11, you would need to explicitly set the NonConvex parameter to 2 in case of solving a nonconvex problem. However, from version 11, the default value of this parameter is set to 2 and there is no need for explicitly setting it.
Best regards,Maliheh
0
Please sign in to leave a comment.
Comments
1 comment