MIQP, short for mixed-integer quadratic programming, is an optimization modeling approach that combines discrete decisions (yes-or-no choices, select-one options, counts) with a quadratic objective function while maintaining linear constraints.Â
Practitioners use MIQP when linear models cannot capture important trade-offs in the objective, such as risk, deviation from targets, smoothness, or interaction effects, but the decision still requires integers. MIQP is common in planning, allocation, and design problems where you need both combinatorial realism and a richer objective function than a purely linear model can provide.Â
An MIQP includes at least one integer or binary decision variable and at least one quadratic term in the objective function, while all constraints remain linear. The quadratic term in the objective typically represents squared deviations, variance-like risk measures, or pairwise interactions between decision variables.Â
Technical distinction: If all variables are continuous (no integers), the problem is a quadratic program (QP). If the model has integer variables but a linear objective and linear constraints, it is a mixed-integer linear program (MILP). If the model has integer variables and quadratic terms appear in the constraints, it becomes a mixed-integer quadratically constrained program (MIQCP), which is a more complex problem class. MIQP sits between MILP and MIQCP: it has integer variables and a quadratic objective, but all constraints remain linear.Â
This distinction is important for both modeling and computational complexity:Â
MIQCP problems are generally more challenging to solve than MIQP problems because quadratic constraints create additional nonlinear feasible regions. Common MIQCP applications include the pooling problem in petrochemicals, problems with ratio constraints, and certain pricing models. In contrast, MIQP typically models optimization problems where the nonlinearity appears naturally in the objective (such as minimizing variance or deviation), while operational constraints remain linear.Â
When modeling your problem, if the quadratic relationships describe what you’re trying to optimize (cost, risk, deviation), they belong in the objective, making it MIQP. If quadratic relationships describe physical or logical restrictions (blending ratios, physics equations, nonlinear capacity limits), they belong in constraints, making it MIQCP.Â
MILP is often preferred when a linear approximation is accurate enough and keeps the model tractable. MIQP becomes useful when linearization would:Â
A practical guideline: if the quadratic term represents a performance metric stakeholders already track (portfolio variance, deviation from target, smoothness), MIQP can encode that metric more directly and accurately than linear proxies. However, if a piecewise-linear approximation is sufficient and simpler to explain, MILP may be preferable.Â
MIQP appears across many industries:Â
These examples share a common structure: combinatorial yes/no or integer decisions in the constraints, coupled with a curved trade-off captured in the objective function.Â
Quadratic terms in the objective typically encode:Â
When communicating to stakeholders, describe the quadratic component as encoding a preference for balanced, stable, or diversified plans, rather than as a mathematical abstraction. The quadratic structure mathematically formalizes the intuition that “large deviations or imbalances are disproportionately undesirable.”Â
Not necessarily, though it can be. Integer variables create combinatorial complexity, and the quadratic objective adds nonlinearity. However, computational difficulty depends heavily on:Â
Modern solvers like Gurobi have specialized algorithms for MIQP that can handle many practical instances efficiently, particularly when the quadratic objectiveis convex. In some cases, a well-formulated MIQP may solve faster than a heavily linearized MILP approximation with many additional variables.Â
The distinction between convex and nonconvex quadratic objectives is critical:Â
Practical implications:Â
Gurobi can solve both convex and nonconvex MIQP problems to global optimality. If you are uncertain whether your model is convex, check the mathematical structure of your quadratic terms or use solver diagnostics.Â
For MIQP formulations, modern solvers like Gurobi can provide:Â
The optimality gap is computed from the best-known solution (upper bound for minimization) and the best-known relaxation bound (lower bound for minimization). For example, a 2% gap means the current solution’s objective value is guaranteed to be within 2% of optimal. This information is essential for production decision-making, as it quantifies solution quality confidence.Â
Model validation should focus on decision quality, business relevance, and robustness:Â
Additionally, for models with quadratic risk or deviation terms, validate that the penalized behaviors (concentration, large deviations) genuinely align with business priorities, and that the trade-off between the linear and quadratic components reflects true organizational preferences.Â
Quadratic objectives often include weight parameters that balance competing objectives (for example, minimizing cost versus minimizing risk or deviation). Common approaches for selecting these weights include:Â
The goal is not to find a single “perfect” weight, but rather to identify a defensible range of weights that yields stable and acceptable decisions. Documenting this analysis builds stakeholder confidence and ensures transparency.Â
MIQP is a powerful modeling tool when you need both discrete decisions and a quadratic objective that reflects real performance metrics such as risk, variance, deviation, or smoothness. The key distinction from MIQCP is that quadratic terms in MIQP appear in the objective function, while all constraints remain linear, making it computationally more accessible than MIQCP for many applications.Â
Successful MIQP projects maintain interpretable quadratic terms that stakeholders understand, validate decisions through backtesting and sensitivity analysis, and leverage optimality gap information when solving under time constraints. Understanding the convexity of your quadratic objective and the technical distinction between MIQP and MIQCP helps guide both modeling choices and computational expectations.Â
When formulated and validated carefully, MIQP provides a structured, mathematically rigorous way to balance cost, risk, and performance in complex planning and allocation problems across finance, energy, manufacturing, and logistics.Â
Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.
Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.