- Introduced by
- George B. Dantzig
- Year
- 1955
- Type
- Stochastic optimization model
- Family
- Simulation / optimization
What does it do?
Stochastic Linear Programming (SLP) extends classical linear programming to settings where some model parameters, such as costs, demands, or resource availability, are uncertain and modeled as random variables.
It selects first-stage decisions that minimize expected total cost over a probability distribution of scenarios, so the plan is assessed across a range of possible futures rather than for a single assumed state of the world.
The intuition behind the method
Classical linear programming assumes every coefficient is known precisely. In practice, future demand, prices, and yields are uncertain. SLP embeds this uncertainty directly into the model: instead of optimizing for one fixed scenario, the planner chooses first-stage actions now, observes which scenario materializes, then takes recourse actions to correct any shortfall or surplus. The objective minimizes total expected cost across all scenarios, balancing commitment costs against expected recourse costs. This mirrors real managerial logic — you decide today what to pre-order, and tomorrow you can buy more at a premium or sell surplus at a discount.
History
The two-stage formulation of linear programs under uncertainty is attributed to George B. Dantzig. The earliest treatment cited on this page is Dantzig and Madansky (1961), which addresses two-stage linear programs under uncertainty. The field was later systematized in the textbook by Birge and Louveaux (1997). Decomposition methods such as the L-shaped method are now standard tools for larger instances.
When to use it
Use SLP when: (1) key input parameters are genuinely uncertain and can be characterized by a probability distribution or empirical scenario set; (2) decisions must be made before uncertainty resolves, but corrective actions are possible afterward at a cost; (3) the objective and constraints are linear in the decision variables. Key assumptions to verify before applying SLP: scenario probabilities are known or well approximated; the objective and all constraints are linear; first-stage decisions are fixed before uncertainty resolves, with recourse actions taken afterward; every second-stage subproblem is feasible for every scenario, either through complete recourse or through explicitly penalized shortfalls; and the decision-maker is risk-neutral, minimizing expected cost, unless CVaR or chance constraints are added. Typical applications include production planning, supply chain design, energy dispatch, and portfolio optimization. Do NOT use SLP when: uncertainty cannot be quantified probabilistically (use robust optimization instead); the relationship between decisions and outcomes is nonlinear or integer (use stochastic MIP or stochastic dynamic programming); the scenario set is too large to enumerate and decomposition is computationally infeasible; or when a simpler deterministic sensitivity analysis suffices to understand uncertainty impact.
Limitations and considerations
- Requires specifying a probability distribution or scenario set for uncertain parameters — this distributional assumption is often difficult to validate.
- Computational burden grows rapidly with the number of scenarios and first-stage variables; large problems require decomposition and significant solver resources.
- Restricted to linear objective and constraints; nonlinear or integer structures require extensions that add further complexity.
- The expected-value objective may ignore tail risks; risk-averse variants (CVaR, chance constraints) add modeling and computational overhead.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Directly incorporates probabilistic uncertainty into optimization, producing decisions robust across scenarios rather than for a single assumed future.
- The two-stage framework closely mirrors real decision processes: commit now, adapt later with recourse.
- Value of Stochastic Solution (VSS) and EVPI provide principled metrics for communicating the benefit of modeling uncertainty.
- Well-supported by mature algorithms (L-shaped / Benders decomposition) and commercial solvers (CPLEX, Gurobi).
- Scales to large practical problems via decomposition; parallelizable across scenarios.
Applications
- Electric power system planning and unit commitment under uncertain renewable generation and demand.
- Supply chain network design with uncertain customer demand, lead times, or transportation costs.
- Crop and irrigation planning under uncertain rainfall and commodity prices.
- Financial portfolio optimization with uncertain asset returns under budget and regulatory constraints.
- Airline revenue management and crew scheduling under uncertain passenger demand.
- Humanitarian logistics pre-positioning of relief supplies before uncertain disaster scenarios.
How it works
How it works
Formulate the two-stage model: first-stage variables x represent here-and-now decisions made before uncertainty is resolved; the objective minimizes first-stage cost c^T x plus the expected recourse cost E[Q(x,xi)] over random vector xi. Constraints Ax = b must hold for the first-stage decisions regardless of scenario.
Formula
\min_{x} c^T x + \mathbb{E}_\xi[Q(x, \xi)] \quad \text{s.t. } Ax = b,\; x \geq 0Represent the random vector xi by a discrete scenario set {xi_1, ..., xi_S}, each with probability p_s, where the probabilities sum to 1. Scenarios can be drawn from historical data, expert elicitation, or Monte Carlo sampling, and the quality of this set largely determines solution quality. Scenario reduction can be used to keep the number of scenarios manageable, at the cost of approximating the original distribution.
For each scenario xi_s, solve the recourse subproblem: given first-stage decision x, find the cheapest corrective action y_s satisfying W y_s = h(xi_s) - T(xi_s) x, y_s >= 0. If no feasible recourse exists, a large penalty (or infeasibility) is incurred, signaling the first-stage decision was too aggressive.
Formula
Q(x, \xi) = \min_{y} q(\xi)^T y \quad \text{s.t. } W y = h(\xi) - T(\xi) x,\; y \geq 0Solve the full extensive form (all scenarios stacked as one large LP) when the scenario set is small to moderate, or apply Benders decomposition (L-shaped method) when it is large. The L-shaped method iteratively adds optimality and feasibility cuts to a master problem until convergence, exploiting the block-diagonal structure of the scenario subproblems, which are linked only through the first-stage decision x.
Assess solution quality with the Value of Stochastic Solution (VSS), the gain of the stochastic solution over the deterministic mean-value solution, and with the Expected Value of Perfect Information (EVPI), the expected gain from knowing the realized scenario before the first-stage decision is made. Report the first-stage decision x*, expected total cost, and per-scenario recourse costs so decision-makers can see the risk profile.
Common pitfalls
- Using too few scenarios produces a biased solution that performs poorly out-of-sample; always validate with out-of-sample scenario testing.
- Confusing the mean-value deterministic solution (plug in expected values) with the stochastic solution. A plan built on expected parameter values can look reasonable yet perform poorly across scenarios, so VSS should be computed rather than assumed to be small.
- Ignoring feasibility of recourse: if the second-stage subproblem can be infeasible for some scenarios, the model needs complete recourse constraints or explicit penalties.
- Over-fitting to the historical scenario distribution without stress-testing against tail or adversarial scenarios, especially in supply chain or financial applications.
- Treating stochastic LP as a drop-in replacement for robust optimization when the decision-maker is actually uncertainty-averse rather than expected-value-neutral.
Frequently asked questions
What is the difference between stochastic linear programming and robust optimization?
SLP minimizes expected cost over a probability distribution of scenarios and allows recourse actions after uncertainty resolves. Robust optimization instead optimizes the worst case over an uncertainty set without assuming a probability distribution and typically produces a single fixed solution that is feasible for all scenarios. SLP is preferable when probabilities can be estimated; robust optimization is preferable when only the uncertainty set is known or when tail-risk protection is paramount.
How many scenarios are needed?
There is no fixed number; the requirement depends on the problem dimension and the complexity of the distribution. Check convergence by increasing the number of scenarios and comparing the resulting solutions, and test the first-stage decision out of sample on scenarios not used in the solve. Where scenarios are obtained by sampling, as in sample average approximation, compute confidence intervals on the estimated objective before accepting the solution. Scenario reduction and moment matching can shrink a large set, but they change the approximated distribution, so their effect on the solution should be checked as well.
Can SLP handle integer or binary decisions?
Not directly — integer variables require Stochastic Integer Programming (SIP) or Stochastic Mixed-Integer Programming (SMIP), which are substantially harder computationally. SLP applies only when all decision variables are continuous.
What does the Value of Stochastic Solution (VSS) measure?
VSS = EEV - RP, where EEV is the expected cost of the deterministic mean-value solution evaluated over all scenarios, and RP is the true stochastic optimum (recourse problem). A high VSS indicates that ignoring uncertainty and using average parameters leads to substantially worse outcomes.
What solvers and software support stochastic linear programming?
Commercial solvers such as CPLEX and Gurobi can solve the extensive form directly when the scenario set is small to moderate. For large instances, decomposition methods such as the L-shaped method are used, and these are often implemented in-house or in research code. Choose between the two approaches by checking whether the stacked extensive form fits within available memory and solver time.
Related methods
Sources
Dantzig, G. B., & Madansky, A. (1961). On the solution of two-stage linear programs under uncertainty. Proceedings of the Fourth Berkeley Symposium on Mathematical Statistics and Probability, 1, 165–176.
Open publication referenceBirge, J. R., & Louveaux, F. (1997). Introduction to Stochastic Programming. Springer, New York.
ISBN: 9780387982175