What is MINLP, in plain terms?
MINLP, short for mixed-integer nonlinear programming, is a class of optimization problems that combine discrete (yes-no or count) choices with nonlinear relationships. It shows up when you need discrete selections (open a facility, choose a recipe, turn equipment on or off), and nonlinear relationships appear in the objective, the constraints, or both (thermodynamics, pressure drop, yield curves, risk measures, or nonlinear cost).
This FAQ focuses on how MINLP is used in practice, what makes it hard, and how teams often structure problems so an optimization solver like Gurobi can be part of the solution stack. MINLP models decisions with two features at once:
Integers: binary or integer choices such as selecting assets, assigning crews, or choosing production modes.
Nonlinearities: relationships that are not linear, often capturing physics, saturation, or diminishing returns.
The result is a model that can represent reality more faithfully than an LP or MILP, but is typically harder to solve and more sensitive to modeling choices.
Where does MINLP show up in industry?
Common examples span a range of formulation classes:
Process industries: Production planning with nonlinear yields, blending and pooling with bilinear composition relationships, and process synthesis with discrete equipment selection and nonlinear mass or energy balances — often genuine MINLP.
Energy: Unit commitment with heat-rate curves (frequently modeled as MILP, MIQP, or MIQCP) and gas-network design with integer investment choices and nonlinear pressure-flow equations (genuine MINLP).
Engineering design: AC transmission planning with nonlinear power-flow equations and discrete expansion decisions, or component selection (integer) under nonlinear performance constraints.
Finance: Portfolio selection with integer lots and quadratic risk or transaction effects, often expressible as MIQP or MIQCP rather than general MINLP.
In each case, MINLP helps unify design or operational choices with how the system actually behaves.
Why is MINLP harder than MILP or LP?
You are combining two sources of difficulty. Discrete choices create many combinatorial possibilities, and nonconvex nonlinearities can create multiple local optima. Convex nonlinear functions do not have this problem: in a convex continuous problem, every local optimum is also global. It therefore helps to distinguish convex MINLP — integer decisions over convex continuous relaxations — from nonconvex MINLP — integer decisions plus nonconvex continuous structure that requires global relaxations and spatial branching.
Runtime and reliability depend heavily on model structure. The most common practical drivers of difficulty are weak continuous relaxations, wide or missing variable bounds, nonlinear expressions evaluated over large domains, poor scaling and large coefficient ranges, singularities or restricted function domains, and products or compositions that yield loose outer approximations. Some MINLPs can be solved routinely, while others may be impractical without tighter bounds, better scaling, reformulation, or decomposition.
How does MINLP relate to what Gurobi solves?
Gurobi is a mathematical optimization solver with comprehensive capabilities for linear, quadratic, and nonlinear optimization. Gurobi can solve:
MILP (mixed-integer linear programming) and LP (linear programming)
MIQP (mixed-integer quadratic programming with quadratic objectives)
MIQCP (mixed-integer quadratically constrained programming), including both convex and non-convex quadratic constraints
MINLP problems with general nonlinear constraints, introduced in version 12.0 and significantly enhanced in version 13.0
For nonlinear models, Gurobi builds constraints from expression trees composed of arithmetic operations and supported univariate functions — exponential, logarithmic, trigonometric, and power functions among them — rather than arbitrary black-box functions. Supported operations carry domain and structural restrictions: logarithm arguments must be positive, square-root arguments nonnegative, division must avoid a neighborhood of zero, and for general powers either the base or the exponent must resolve to a constant, with further domain restrictions depending on the exponent.
Gurobi offers two distinct approaches to nonlinear optimization:
Global nonlinear optimization handles supported continuous (NLP) and mixed-integer (MINLP) models — including nonconvex expressions — using a spatial branch-and-bound algorithm with dynamically refined linear outer approximations. It maintains globally valid objective bounds and, given sufficient time, can prove global optimality to the requested tolerances.
Local nonlinear optimization is a separate mode introduced in version 13.0: a nonlinear barrier method for continuous nonlinear models only. It seeks a first-order locally optimal solution, is enabled with OptimalityTarget=1, and cannot be used when the model contains integer variables, SOS constraints, or piecewise-linear functions. It is currently a preview feature and does not generally provide a global optimality certificate for nonconvex problems.
Reformulating a nonlinear model as MILP, MIQP, or MIQCP may still improve performance, numerical behavior, explainability, or deployment reliability — but it is not required for Gurobi to provide a global optimality guarantee. Gurobi can globally solve nonconvex quadratic models, nonconvex MIQCP, general continuous NLP, and general MINLP containing supported nonlinear expressions.
When can you reformulate MINLP into MILP or MIQCP?
First, a clarification: native quadratic structure is not something you “reformulate” at all. If a nonlinear term is quadratic, express the model directly as QP, QCP, MIQP, or MIQCP — Gurobi handles these natively. Genuine reformulation means rewriting an otherwise harder or unsupported structure, and three distinct outcomes are possible: an exact reformulation that preserves the feasible set and objective values, a controlled approximation that introduces measurable error, or native global solution using Gurobi’s spatial branch-and-bound with dynamically refined outer approximations.
With that framing, here are common structures and how each is best handled:
Introducing auxiliary variables and constraints would produce a stronger or smaller formulation. This is not automatic: such reformulations can enlarge the model, introduce additional nonconvex equalities, weaken relaxations, or amplify numerical error as readily as they can help. The decision depends on formulation strength, not merely polynomial degree.
A nonlinear cost curve can be represented with a piecewise-linear approximation over a known operating range — a controlled approximation, not an exact reformulation.
A binary-times-continuous product appears. This can be linearized exactly, but only if the continuous variable has valid finite bounds; those bounds are not an implementation detail, since they determine both correctness and relaxation quality.
Bilinear terms (products of two continuous variables) appear. McCormick-type constraints are relaxations used within a global algorithm, not an exact standalone linearization; exact linearization is available only under additional structure, such as a binary factor with appropriate bounds. Gurobi can also solve these directly with spatial branch-and-bound.
The key is to preserve the business meaning: the reformulated model should still reflect the operating ranges, capacities, and policy rules that matter.
What are practical ways to approximate nonlinearities?
The primary way to approximate nonlinearities is piecewise-linear (PWL) approximation.
Piecewise-linear (PWL) approximation replaces a smooth curve (cost, efficiency, penalty) with a set of line segments. Gurobi provides dedicated methods (such as Model.addGenConstrPWL() in Python) to add a PWL relationship, but the modeler must choose the breakpoints and values — Gurobi does not automatically decide how to approximate an arbitrary smooth function.
It helps to distinguish three cases: a manual static approximation fixed before optimization; a dynamic outer approximation that Gurobi refines during spatial branch-and-bound; and an exact PWL relationship, where the underlying business relationship is itself piecewise linear rather than an approximation.
Whether a PWL model becomes a MIP depends on structure. A convex piecewise-linear objective in an otherwise continuous model can be handled without turning the model into a MIP, whereas nonconvex piecewise-linear structure introduces discrete machinery. For native nonlinear functions, current Gurobi documentation recommends nonlinear constraints; the older function-constraint pathway is deprecated in version 13.0, though explicit PWL constraints remain valid.
Any approximation needs validation that goes beyond “proven optimality given the approximation.” A solution that is optimal for a PWL approximation can be infeasible for the original nonlinear problem when the approximation is not conservative. Ask whether the approximation is an underestimator, overestimator, or interpolant; whether it preserves feasibility for the original constraint; whether the error is absolute or relative and controlled over the entire feasible domain rather than only at sampled points; whether objective approximation error could change the decision ranking; and whether breakpoints are concentrated near likely operating regions. Then evaluate the chosen plan against the original nonlinear calculations.
How should I assess parameter uncertainty and solution robustness?
Scenario or parameter sweeps do not approximate nonlinearities; they explore sensitivity and parameter uncertainty by solving multiple deterministic models across plausible values (demand, prices, yields) and comparing decisions. This does not make the model stochastic, but it helps stress-test choices and identify which decisions are robust across the range you care about.
What modeling practices matter most for MINLP?
A few modeling practices have an outsized impact on whether an MINLP solves well:
Tight variable bounds. This may be the single most important recommendation. Bounds control the strength of bilinear and nonlinear relaxations, domain propagation, spatial-branching effectiveness, and numerical stability, and they help avoid singularities. Spatial branch-and-bound becomes much harder as nonlinear variable domains grow, so provide the tightest valid bounds you can.
Respect function domains. Guard against log(x) with nonpositive x, division by a variable that can approach zero, fractional powers of negative values, tangent near singularities, and square roots of potentially negative expressions. Gurobi may impose implicit domain restrictions for some operations, which can change feasibility relative to an inaccurately specified conceptual model.
Scaling and original-expression validation. Small violations in a disaggregated nonlinear formulation can become much larger violations when evaluated in the original aggregate function. Watch coefficient ranges and scaling, set tolerances deliberately, and recompute the original functions after solving rather than relying only on a generic notion of data quality.
Watch for accidental nonconvexity. Convexity changes algorithmic difficulty, so introducing nonconvexity unintentionally matters. An equality constraint involving a nonlinear function is often nonconvex even when the function itself is convex: an epigraph inequality f(x) ≤ t can preserve convexity while the equality f(x) = t does not.
How do you choose between native MINLP and reformulation?
Base the decision on model class and the certificate you need — not on a false choice between “native means local” and “reformulate means global.” Work through it in order:
Identify the structure. Is the model linear, quadratic or conic, or generally nonlinear? If it has a continuous nonlinear part, is that part convex?
Check for discrete elements. Integer variables, SOS constraints, or piecewise-linear functions all rule out the local nonlinear barrier.
For continuous nonlinear models, choose local versus global. If a local solution is acceptable, consider the nonlinear barrier method (OptimalityTarget=1). If a global guarantee is required, use the global nonlinear solver.
For MINLP, use the global MINLP solver by default. It maintains global bounds and can certify global optimality; the local nonlinear barrier is not a MINLP option, since it cannot process integer variables. Then investigate exact reformulations or controlled approximations when they improve performance or deployment characteristics.
Compare formulations empirically, using the same accuracy requirements and validating each against the original equations.
Beyond correctness, secondary factors can tip the choice: repeated real-time solves may favor a faster reformulation; piecewise-linear or quadratic forms can be easier to communicate and audit; and complex nonlinear models can be harder to maintain as data changes. If the alternative to native nonlinear modeling is an approximation, native modeling may offer better fidelity; if the alternative is an exact, stronger reformulation, that reformulation may deliver the same mathematical solution with better computational performance.
What should you report as solution quality?
For continuous nonlinear problems solved locally (nonlinear barrier): report the termination status (for example LOCALLY_OPTIMAL or LOCALLY_INFEASIBLE), the objective value, the maximum constraint and bound violations, and the convergence tolerances used. For nonconvex problems, also document the starting point or warm-start methodology and, where local-solution dependence matters, results from multiple starts. LOCALLY_OPTIMAL means first-order optimality conditions were satisfied subject to tolerances; LOCALLY_INFEASIBLE means the model appears locally infeasible after minimizing a constraint-violation measure — not a proof of global infeasibility. Gurobi exposes solution-quality attributes such as MaxVio, BoundVio, and ConstrVio for this purpose.
For mixed-integer problems (MILP, MIQCP, MINLP): when the solve terminates with an OPTIMAL status at the requested tolerances, you can report a proven optimal solution for the modeled formulation, or a proof of infeasibility or unboundedness. Note that an UNBOUNDED status establishes an improving unbounded ray but does not by itself confirm that a feasible solution exists. If a solve is stopped early, report the incumbent objective, the best bound, the relative gap, the absolute gap where meaningful, the termination status, the runtime or work limit, and the maximum solution violations. Treat the optimality gap as certifying objective quality for the modeled formulation — not as a business-decision-quality indicator, since it says nothing about model misspecification, data uncertainty, approximation error, or whether a given objective difference is material. Relative gaps can be infinite when the incumbent is zero and can even increase when incumbent and bound have opposite signs while the absolute gap improves, so report both where relevant.
For approximated models: be explicit that optimality is with respect to the approximation (for example, piecewise-linear), and separately report validation metrics against the original nonlinear calculations. Approximation error is a second source of error that must be measured independently of the solver’s optimality gap.
What is the business case for MINLP work?
The value usually comes from better decisions under real constraints: higher throughput within quality limits, lower energy cost while meeting service targets, or reduced waste while honoring operating rules.
A sound economic view considers total cost of ownership across software licenses, compute, engineering time, data operations, support, and change management. A good pilot measures impact with domain KPIs (service level, emissions, yield, overtime, inventory, or energy use) rather than only solver runtime.
Internal benchmark results comparing Gurobi 13.0 with 12.0 showed substantial average improvements on the tested MINLP set — on the order of 16% on difficult MIPs taking more than 100 seconds and more than 2× on nontrivial MINLPs taking more than one second, with some release figures reporting larger gains on a test set Gurobi notes is too small to meet its standards for reliable benchmark results. Performance is highly model-dependent, so teams should benchmark their own formulations and hardware rather than extrapolating fixed speed-ups to their production timeframes.
Conclusion
MINLP is a powerful modeling lens when discrete choices and nonlinear behavior both drive outcomes. In practice, successful projects generally take one of three paths:
Native global solution: solve supported NLP or MINLP formulations directly with Gurobi's spatial branch-and-bound algorithm, which maintains global bounds and can certify global optimality to specified tolerances.
Local continuous solution: for continuous nonlinear models where a local solution is acceptable, use the nonlinear barrier method to seek a first-order locally optimal solution more quickly.
Reformulation or approximation: convert the model to MILP, MIQP, or MIQCP when an exact reformulation or controlled approximation improves computational performance, operational robustness, or explainability. Any approximation error should be assessed separately from the solver's optimality gap.
The best path balances model realism, solve reliability, the certificate you need (local versus global optimality), and operational maintainability for your use case.
