The L-Shaped Method for Two-Stage Stochastic Programs

The L-shaped method specializes Benders decomposition to two-stage stochastic linear programs with finitely many scenarios. The master problem decides the first-stage variable xx along with a scalar surrogate θ\theta for the expected recourse; subproblems decouple across scenarios and generate optimality cuts (from optimal duals) and feasibility cuts (from extreme rays of unbounded duals). Lower and upper bounds tighten until they meet.

Step 1 of 157%

Tutorial

The Two-Stage SLP and the L-Shaped Master

A two-stage stochastic linear program with recourse chooses a first-stage decision x\mathbf{x} before random data ξ\xi are observed, then a scenario-specific recourse y\mathbf{y} afterward:

minxcTx+Eξ[Q(x,ξ)]s.t.Ax=b,x0,\min_{\mathbf{x}}\: \mathbf{c}^T\mathbf{x} + \mathbb{E}_\xi[Q(\mathbf{x},\xi)] \quad \text{s.t.}\: A\mathbf{x}=\mathbf{b},\: \mathbf{x}\geq 0,

where the recourse function is

Q(x,ξ)=miny0q(ξ)Tys.t.Wyh(ξ)T(ξ)x.Q(\mathbf{x},\xi) = \min_{\mathbf{y}\geq 0}\: \mathbf{q}(\xi)^T\mathbf{y} \quad \text{s.t.}\: W\mathbf{y}\geq \mathbf{h}(\xi)-T(\xi)\mathbf{x}.

With finitely many scenarios ξ1,,ξS\xi_1,\ldots,\xi_S occurring with probabilities p1,,pS,p_1,\ldots,p_S, the expected recourse is

Q(x)=s=1SpsQ(x,ξs).\mathcal{Q}(\mathbf{x}) = \sum_{s=1}^S p_s\, Q(\mathbf{x},\xi_s).

The L-shaped method is Benders decomposition specialized to this two-stage structure. It replaces Q(x)\mathcal{Q}(\mathbf{x}) in the objective by a scalar variable θ\theta and refines θ\theta via cuts. The master problem is

minx,θcTx+θs.t.Ax=b,x0,\min_{\mathbf{x},\theta}\: \mathbf{c}^T\mathbf{x}+\theta \quad \text{s.t.}\: A\mathbf{x}=\mathbf{b},\: \mathbf{x}\geq 0,

augmented with optimality and feasibility cuts.

Two consequences of the structure are essential:

  1. Decoupled subproblems. For a fixed candidate x^,\hat{\mathbf{x}}, each Q(x^,ξs)Q(\hat{\mathbf{x}},\xi_s) is its own LP — the only coupling across scenarios is through x^.\hat{\mathbf{x}}.

  2. Bounds. The optimal master objective cTx^+θ\mathbf{c}^T\hat{\mathbf{x}}+\theta is a lower bound on the true optimum. After solving every subproblem at x^,\hat{\mathbf{x}}, the quantity cTx^+Q(x^)\mathbf{c}^T\hat{\mathbf{x}}+\mathcal{Q}(\hat{\mathbf{x}}) is an upper bound. The algorithm terminates when these bounds meet.

navigate · Enter open · Esc close · ⌘K/Ctrl K toggle