Skip to main content

Module diff_lp

Module diff_lp 

Source
Expand description

Differentiable Linear Programming.

Solves the LP:

min c’x s.t. Ax = b (p equalities) Gx ≤ h (m inequalities)

and computes gradients of x* w.r.t. (c, A, b, G, h) via implicit differentiation through the KKT conditions at the active constraints.

At an LP optimum, the active inequality constraints define a polyhedron face. We differentiate as if solving the equality-constrained system formed by the active set, which is a degenerate QP with Q = 0 (plus regularization for numerical stability).

Structs§

DifferentiableLP
A differentiable LP layer.