Gurobi versions 9.0 and later can solve models with linear constraints, quadratic constraints (both convex and non-convex), and second-order cone constraints. This can involve any combination of continuous and integer variables. The canonical form is:

$$\begin{alignat}{3} \min_x\ x^\top Q x + c^\top x &+ d && && \textrm{(Objective)} \\ \textrm{s.t.} \qquad\qquad\enspace Ax &= b && && \textrm{(Linear constraints)} \\x^\top Q_i x + c_i^\top x &\le d_i && \forall i \in I && \textrm{(Quadratic constraints)} \\ \ell \le x &\le u && && \textrm{(Bound constraints)} \\ x_j &\in \mathbb{Z} && \forall j \in J && \textrm{(Integrality constraints)} \\ x_k &\in \textrm{second-order cones} \quad && \forall k \in K && \textrm{(Cone constraints)} \\ x_h &\in \textrm{SOS} && \forall h \in H \qquad && \textrm{(Special ordered set constraints)} \end{alignat}$$

Not all elements are required. For instance, if \( Q = 0 \) and \( I = K = \emptyset \), then the model is a mixed-integer linear program (MILP).

Before Gurobi 9.0, the quadratic matrices \( Q \) and \( Q_i \) were required to be positive semi-definite, ensuring that the model is convex. Gurobi 9.0+ supports general non-convex quadratic constraints and objective functions, including bilinear and quadratic equality constraints.

Non-convex models are typically harder to solve than convex models. If possible, consider reformulating the model into a convex problem. In order to prevent the accidental creation of non-convex models, the NonConvex parameter must be set to 2 to enable optimization for problems with non-convex constraints or objective. For full details, see the Quadratic Constraints section of the reference manual.

Gurobi has built-in functionality for creating piecewise-linear objectives and constraints, which can represent or approximate many separable non-convex functions. For more details, see the General Constraints and Function Constraints sections of the documentation.

### Further information

## Comments

2 comments

Do you mean with “solving” that optimal solutions are guaranteed found if the model adheres to the provided canonical form?

Gurobi searches for globally optimal solutions to models of the above form, subject to tolerances like the relative optimality gap. However, Gurobi, just like any other solver, is not necessarily guaranteed to find globally optimal solution to arbitrary problems of this form. For example, some problems, like the open MIPLIB 2017 problems, have yet to be solved by any software.

You can always try out Gurobi for free to see how well it performs on your model. Academic users can access the full version of Gurobi at no cost, and commercial users can request a free evaluation license.

Please sign in to leave a comment.