Global Optimization

Find global optima in nonconvex problems

This path brings together MIP and NLP to tackle the hardest class of optimization problems: finding global optima when the problem is nonconvex. You'll learn why local methods can get stuck, how spatial branch-and-bound guarantees global optimality, and how solvers like Bonmin and Couenne make this practical.

Prerequisites

You should have completed:

Or be comfortable with:

  • Branch-and-bound trees and bounding
  • Nonlinear optimization and KKT conditions
  • Why convexity matters for optimization

1. Convex vs. Nonconvex Optimization

The distinction between convex and nonconvex problems is the fundamental divide in optimization.

What is Convexity?

A function $f: \mathbb{R}^n \to \mathbb{R}$ is convex if: $$f(\lambda x + (1-\lambda) y) \leq \lambda f(x) + (1-\lambda) f(y) \quad \forall x, y, ; \lambda \in [0,1]$$

Visually: the line segment between any two points on the graph lies above the graph.

The Golden Property of Convexity

For convex problems, every local minimum is a global minimum.

This means any descent algorithm that finds a local optimum has solved the problem completely. Newton's method, gradient descent, interior point โ€” they all work reliably on convex problems.

Examples

ConvexNonconvex
$x^2$$\sin(x)$
$e^x$$x^2 - x^4$
$|x|$$x_1 x_2$ (bilinear)
LP, QP (with PSD $Q$)General polynomials

The Nonconvex Challenge

For nonconvex problems:

  • Multiple local minima exist
  • Local methods find a local minimum, not the global minimum
  • No polynomial-time algorithm is known (NP-hard in general)

In COIN-OR:

  • Ipopt finds local optima (assumes convexity or accepts local solutions)
  • Bonmin handles convex MINLP (integer + convex nonlinear)
  • Couenne handles nonconvex MINLP (global optimization)

2. Introduction to MINLP

Mixed-Integer Nonlinear Programming (MINLP) combines the challenges of MIP and NLP:

$$\min_{x,y} \quad f(x, y)$$ $$\text{s.t.} \quad g(x, y) \leq 0$$ $$\quad\quad h(x, y) = 0$$ $$\quad\quad x \in \mathbb{R}^n, ; y \in \mathbb{Z}^p$$

Where $f$, $g$, and $h$ may be nonlinear.

Why MINLP?

Real problems often have both:

  • Discrete decisions: Build a reactor or not, choose among designs
  • Nonlinear physics: Chemical equilibria, pressure-flow relations, economies of scale

The MINLP Landscape

Problem ClassDifficultySolvers
LPPolynomialClp, simplex
Convex NLPPolynomialIpopt, interior point
MIP (linear)NP-hardCbc, branch-and-cut
Convex MINLPNP-hardBonmin
Nonconvex MINLPVery hardCouenne, SCIP, BARON

Nonconvex MINLP is the hardest class โ€” it combines combinatorial explosion (integers) with nonconvexity (local optima).

Applications

  • Process design: Chemical plant configuration with physics constraints
  • Network design: Routing with nonlinear costs
  • Pooling problems: Blending with quality constraints
  • Unit commitment: Power generation scheduling

3. Spatial Branch-and-Bound

Standard branch-and-bound branches on integer variables. Spatial branch-and-bound extends this to branch on continuous variables too โ€” enabling global optimization of nonconvex problems.

The Key Idea

For nonconvex problems, LP relaxation isn't enough. Even with integer variables fixed, the nonlinear relaxation may have multiple local optima.

Solution: Branch on continuous variables to partition the domain until the problem becomes "easy enough" to solve globally.

The Algorithm

Initialize:
  - Root node = original problem
  - Global upper bound = +โˆž (best solution found)
  - Global lower bound = -โˆž (best possible)

While nodes remain:
  1. SELECT a node
  2. SOLVE a convex relaxation (underestimator of the original)
  3. If relaxation infeasible: PRUNE
  4. If relaxation bound โ‰ฅ upper bound: PRUNE
  5. If solution is feasible for original problem:
       UPDATE upper bound
       PRUNE
  6. Else:
       Choose variable to BRANCH (integer or continuous)
       Create children with tighter bounds

Continuous Branching

For a continuous variable $x_j$ with bounds $[l_j, u_j]$, branch at some point $\hat{x}_j$:

  • Left child: $x_j \in [l_j, \hat{x}_j]$
  • Right child: $x_j \in [\hat{x}_j, u_j]$

Why this helps: Tighter bounds โ†’ tighter convex relaxations โ†’ better lower bounds โ†’ more pruning.

Spatial B&B converges to global optimum because:

  1. Each branch tightens variable bounds
  2. Convex relaxations become tighter as bounds shrink
  3. In the limit (infinitely small boxes), relaxation equals original problem

Branching Strategies

StrategyDescription
Widest rangeBranch on variable with largest $u_j - l_j$
Most violatedBranch on variable with largest relaxation gap
ReliabilityUse history of bound improvement
Violation transferBranch to reduce maximum constraint violation

In Couenne (CouenneProblem.cpp):

// Spatial branching considers both integer and continuous variables
// The branching object encodes bounds for the new subproblems

4. Convexification and Relaxations

The quality of spatial B&B depends entirely on the quality of the convex relaxations. Convexification creates convex underestimators of nonconvex functions.

McCormick Envelopes

For a bilinear term $w = x_1 x_2$ with $x_1 \in [l_1, u_1]$ and $x_2 \in [l_2, u_2]$:

The McCormick envelope provides the tightest convex relaxation using four linear inequalities:

$$w \geq l_1 x_2 + l_2 x_1 - l_1 l_2$$ $$w \geq u_1 x_2 + u_2 x_1 - u_1 u_2$$ $$w \leq u_1 x_2 + l_2 x_1 - u_1 l_2$$ $$w \leq l_1 x_2 + u_2 x_1 - l_1 u_2$$

Why McCormick Works

At the corner points $(l_1, l_2)$, $(l_1, u_2)$, $(u_1, l_2)$, $(u_1, u_2)$, the envelope is exact ($w = x_1 x_2$).

Between corners, the envelope provides a convex underestimator. As bounds tighten, the envelope becomes tighter โ€” eventually exact when the box shrinks to a point.

Other Convexifications

Function TypeRelaxation
$x^2$Already convex (no relaxation needed)
$x^k$ (odd $k$)Secant relaxation
$\sin(x)$, $\cos(x)$Linear underestimators over bounded domain
$e^x$Secant (concave over-approximation)
$\log(x)$Secant (convex under-approximation)
$x_1 / x_2$Reformulate as $x_1 = w \cdot x_2$, then McCormick

Factorable Functions

A key insight: Most nonlinear functions can be factored into elementary operations: $$f(x) = x_1^2 + \sin(x_2) + x_1 x_3$$

Introduce auxiliary variables:

  • $w_1 = x_1^2$ (convex, no relaxation)
  • $w_2 = \sin(x_2)$ (bounded relaxation)
  • $w_3 = x_1 x_3$ (McCormick)
  • $f = w_1 + w_2 + w_3$ (linear)

This systematic approach enables automatic convexification.

Couenne builds an expression tree for each constraint, then generates relaxations for each node:

// CouenneExprMul.cpp handles multiplication
// exprMul::generateCuts() creates McCormick cuts

5. Outer Approximation

For convex MINLP, there's a more efficient approach than spatial B&B: Outer Approximation (OA) alternates between an MILP master problem and NLP subproblems.

The Idea

Instead of branching on continuous variables, use linear cuts to approximate the nonlinear feasible region from outside.

The Algorithm

Initialize: Set of linearizations L = {}

Repeat:
  1. MILP MASTER: Solve
       min  c^T x + d^T y
       s.t. linearizations in L
            y โˆˆ Z^p
     Get solution (x*, y*)

  2. NLP SUBPROBLEM: Fix integers y = y*, solve
       min  c^T x + d^T y*
       s.t. g(x, y*) โ‰ค 0, h(x, y*) = 0
     Get solution xฬ‚ (or infeasibility certificate)

  3. ADD LINEARIZATIONS:
     - At xฬ‚: g(xฬ‚) + โˆ‡g(xฬ‚)^T (x - xฬ‚) โ‰ค 0
     - If infeasible: feasibility cuts

Until: MILP and NLP solutions match

Why It Works (for Convex Problems)

For convex $g$, the linearization $g(xฬ‚) + \nabla g(xฬ‚)^T(x - xฬ‚) \leq 0$ is a valid inequality โ€” it never cuts off any feasible point.

After finitely many iterations, enough linearizations accumulate to identify the optimal integer assignment.

Bonmin's Modes

Bonmin implements several OA variants:

ModeDescription
B-OAPure outer approximation
B-BBNLP-based branch-and-bound
B-QGQuesada-Grossmann single-tree
B-HybHybrid (combines above)

The hybrid mode is often fastest โ€” it uses OA for quick bounds and B&B for difficult nodes.

// BonOaDecBase.cpp implements the OA decomposition
// Each NLP solve generates cuts added to the MILP

6. Bonmin and Couenne in Practice

COIN-OR provides two MINLP solvers that build on the foundation libraries:

Bonmin (Basic Open-source Nonlinear Mixed INteger programming)

For: Convex MINLP

Architecture:

  • Uses Cbc for MILP (master problem, branch-and-bound)
  • Uses Ipopt for NLP (subproblems)
  • Uses Cgl for cutting planes

Strengths:

  • Efficient for convex problems
  • Multiple algorithm modes
  • Warm-starting between solves

Limitations:

  • May find local (not global) optima for nonconvex problems
  • Assumes constraint qualification holds

Couenne (Convex Over and Under ENvelopes for Nonlinear Estimation)

For: Nonconvex MINLP (global optimization)

Architecture:

  • Uses Cbc for the branch-and-bound tree
  • Uses Ipopt for local NLP solves (upper bounds)
  • Implements spatial branching and automatic convexification

Key Features:

  • Expression decomposition: Breaks complex functions into simple operations
  • Bound tightening: FBBT and OBBT to tighten variable domains
  • Cut generation: McCormick, disjunctive cuts, and more
  • Branching strategies: On both integer and continuous variables

Global Optimality Guarantee: Couenne proves a solution is globally optimal when the gap between upper and lower bounds closes.

When to Use Which

ScenarioSolver
Convex MINLPBonmin (faster)
Nonconvex, need proof of optimalityCouenne
Nonconvex, good solution is enoughIpopt + heuristics
Very large problemsDecomposition methods

Practical Tips

  1. Provide good bounds: Tighter variable bounds = faster convergence
  2. Good starting point: Help local solvers find good upper bounds
  3. Reformulate if possible: Convex formulations are much faster
  4. Monitor gap: The optimality gap shows progress
  5. Use presolve: Can dramatically reduce problem size

Example Couenne call:

// Set up OsiSolverInterface with the MINLP
CouenneProblem problem;
problem.readNl("myProblem.nl");

// Solve globally
CouenneSolver solver(&problem);
solver.solve();

// Get gap
double gap = solver.getOptimumBound() - solver.getBestFeasible();

Summary

ConceptKey Point
ConvexityLocal = global for convex problems
MINLPCombines integer and nonlinear challenges
Spatial B&BBranch on continuous variables for global optimization
ConvexificationCreate convex relaxations (McCormick, etc.)
Outer ApproximationEfficient for convex MINLP
BonminConvex MINLP solver
CouenneGlobal (nonconvex) MINLP solver

Global optimization is computationally expensive but sometimes necessary โ€” when local optima aren't good enough and you need a guarantee of global optimality.

Next Steps