hyunjoopark
← Back to Notes

ESM / Concepts

KKT Conditions

Created

KKT = the conditions a point must satisfy to be optimal. It extends Lagrange multipliers to inequality constraints.

Lagrange intuition

Optimum on a constraint: the contour of ff touches the constraint (crossing → you could still improve) → gradients parallel: ∇f=λ∇gλ=df∗db\nabla f = \lambda \nabla g \qquad \lambda = \frac{df^*}{db}

  • xx = decision variables: the optimizer chooses them
  • bb = RHS of the constraint: the limit given from outside (e.g. demand = 300)
  • f∗f^* = the best achievable value → λ\lambda = how much the best result changes when the limit changes by 1 = Shadow Price
What μj\mu_j means (min, gj(x)≤0g_j(x) \le 0, μj≥0\mu_j \ge 0)

μj\mu_j = how much the minimum cost drops when constraint jj is relaxed by 1 → always ≥ 0. Mini dispatch: demand μ\mu = 30 · A capacity μ\mu = 10 · B capacity μ\mu = 0 (non-binding)

Recipe

  1. Standard form: min; every constraint gj(x)≤0g_j(x) \le 0 (move constants left, RHS = 0); name the multiplier next to it (μj)(\mu_j); equalities hi(x)=0h_i(x) = 0 (λi)(\lambda_i)
  2. Lagrangian: L=f(x)+∑iλihi(x)+∑jμjgj(x)L = f(x) + \sum_i \lambda_i h_i(x) + \sum_j \mu_j g_j(x)
  3. Conditions:
ConditionFormHow many
Stationarity∂L/∂xk=0\partial L/\partial x_k = 0one per variable
Primal feasibilityhi(x)=0h_i(x) = 0, gj(x)≤0g_j(x) \le 0one per constraint
Complementary Slacknessμj gj(x)=0\mu_j\, g_j(x) = 0one per inequality
Dual feasibilityμj≥0\mu_j \ge 0one per inequality

Why learn it

  • Not to solve big LPs (that’s the solver; 2n2^n active-set guesses by hand)
  • Shows why dual = price (Market Clearing)
  • Several players can’t share one LP → write each player’s KKT and stack them = Mixed Complementarity Problem (W7)
Typical traps
  • Bounds are constraints too: x1≥0x_1 \ge 0 → −x1≤0-x_1 \le 0 → μn\mu_n
  • Write "=0= 0" after each ∂L/∂x\partial L/\partial x
  • Inequalities can be added, never subtracted
  • Write constraints as given, don’t simplify (÷2 → its μ\mu ×2 and loses its unit, e.g. €/MWh)

Links: Duality, Shadow Price, Complementary Slackness, Mixed Complementarity Problem