6.5 Stochastic Prog. and Benders’ decomposition Two stage stochastic linear program: Two sets of decisions (𝑥,𝑦) that are made in consecutive stages. Some exogenous parameters that influence the second stage decision making is uncertain and only can be known after the first set of decisions has been made. Best two stage decisions that minimize the total expected cost? Large linear program if the number of possible second stage scenarios is large. Use Benders’ decomposition. Benders’ decomposition was developed to solve mixed integer programs, but it can be applied here too. Use strong duality of LP cleverly. Linear Programming 2014
Problem formulation First stage decision vector is 𝑥. Second stage decision vector is 𝑦. There are 𝐾 possible scenarios for the second stage and the true scenario is only revealed after 𝑥 is chosen. Let 𝜔 be the index to represent different scenarios and 𝛼 𝜔 >0 be the probability of the occurrence of scenario 𝜔. Second stage decision 𝑦 depends on the realized scenario, hence use variable 𝑦 𝜔 to make the dependence explicit. Cost vectors 𝑐 and 𝑓 for decisions 𝑥 and 𝑦 𝜔 , respectively. First stage decisions must satisfy the constraints 𝐴𝑥=𝑏 𝑥≥0 In addition, the first and second stage decisions need to satisfy constraints of the form 𝐵 𝜔 𝑥+𝐷 𝑦 𝜔 = 𝑑 𝜔 𝑦 𝜔 ≥0, for all 𝜔. Linear Programming 2014
minimize 𝑐 ′ 𝑥+ 𝛼 1 𝑓 ′ 𝑦 1 + 𝛼 2 𝑓 ′ 𝑦 2 +…+ 𝛼 𝐾 𝑓′ 𝑦 𝐾 Every scenario may involve a different set of constraints. The objective is to choose 𝑥 and 𝑦 1 ,…, 𝑦 𝐾 so that the expected cost 𝑐 ′ 𝑥+ 𝛼 1 𝑓 ′ 𝑦 1 +…+ 𝛼 𝐾 𝑓′ 𝑦 𝐾 is minimized. Master problem: minimize 𝑐 ′ 𝑥+ 𝛼 1 𝑓 ′ 𝑦 1 + 𝛼 2 𝑓 ′ 𝑦 2 +…+ 𝛼 𝐾 𝑓′ 𝑦 𝐾 subject to 𝐴𝑥 =𝑏 𝐵 1 𝑥+ 𝐷 𝑦 1 = 𝑑 1 𝐵 2 𝑥 + 𝐷 𝑦 2 = 𝑑 2 ⋮ ⋱ ⋮ 𝐵 𝐾 𝑥 + 𝐷 𝑦 𝐾 = 𝑑 𝐾 Linear Programming 2014
Ex 6.5 (Electric power capacity expansion): Want to install two generators 𝑗=1,2 with different fixed and operating costs. Each day is divided into 3 parts 𝑖=1,2,3 𝑐 𝑗 : fixed cost per day and per unit capacity of generator 𝑗. Amortized over its lifetime. 𝑓 𝑖𝑗 : the operating cost of generator 𝑗 per unit power during the 𝑖−𝑡ℎ part of the day. 𝑔 𝑖 : unit cost of excess capacity that can be purchased when demand exceeds capacity. 𝑏 𝑗 : minimum capacity of generator 𝑗. Two sources of uncertainty: (1) exact value of the demand 𝑑 𝑖 during each part of the day. (2) the availability 𝑎 𝑗 (between 0 and 1) of generator 𝑗. Linear Programming 2014
There is a total of 4 3 ×4×5=1280 scenarios 𝜔. (1) Demand 𝑑 𝑖 can take one of four values 𝑑 𝑖,1 ,…, 𝑑 𝑖,4 , with probability 𝑝 𝑖,1 ,…, 𝑝 𝑖4 , respectively. (2) Availability of generator 1 is 𝑎 1,1 ,…, 𝑎 1,4 , with probability 𝑞 1,1 ,…, 𝑞 1,4 , respectively. Similarly, the availability of generator 2 is 𝑎 2,1 ,…, 𝑎 2,5 , with probability 𝑞 2,1 ,…, 𝑞 2,5 , respectively There is a total of 4 3 ×4×5=1280 scenarios 𝜔. Let us use 𝑑 𝑖 𝜔 and 𝑎 𝑗 𝜔 to denote the demands and availabilities, respectively under scenario 𝜔. Linear Programming 2014
min 𝑗=1 2 𝑐 𝑗 𝑥 𝑗 +𝐸 𝑖=1 3 𝑗=1 2 𝑓 𝑖𝑗 𝑦 𝑖𝑗 𝜔 + 𝑔 𝑖 𝑦 𝑖 𝜔 Introduce the first stage variables 𝑥 𝑗 , 𝑗=1,2, which represent the installed capacity of generator 𝑗. Second stage variable 𝑦 𝑖𝑗 𝜔 denoting the operating levels (power output levels) of generator 𝑗 during the 𝑖−𝑡ℎ part of the day and under scenario 𝜔. 𝑦 𝑖 𝜔 : capacity to be purchased under scenario 𝜔 for unmet demand during the 𝑖−𝑡ℎ part of the day. Formulation min 𝑗=1 2 𝑐 𝑗 𝑥 𝑗 +𝐸 𝑖=1 3 𝑗=1 2 𝑓 𝑖𝑗 𝑦 𝑖𝑗 𝜔 + 𝑔 𝑖 𝑦 𝑖 𝜔 s.t. 𝑥 𝑗 ≥ 𝑏 𝑗 , ∀ 𝑗, 𝑦 𝑖𝑗 𝜔 ≤ 𝑎 𝑗 𝜔 𝑥 𝑗 , ∀ 𝑖,𝑗,𝜔, 𝑗=1 2 𝑦 𝑖𝑗 𝜔 + 𝑦 𝑖 𝜔 ≥ 𝑑 𝑖 𝜔 , ∀ 𝑖,𝜔, 𝑥 𝑗 , 𝑦 𝑖𝑗 𝜔 , 𝑦 𝑖 𝜔 ≥0, ∀ 𝑖,𝑗,𝜔 (11522 variables, 11522 constraint) Linear Programming 2014
Reformulation of the problem Consider 𝑥 satisfying 𝐴𝑥=𝑏, 𝑥≥0. Once 𝑥 is fixed, the optimal second stage decisions 𝑦 𝜔 can be determined separately from each other, by solving for each 𝜔 the problem min 𝑓′ 𝑦 𝜔 s.t. 𝐵 𝜔 𝑥+𝐷 𝑦 𝜔 = 𝑑 𝜔 (6.16) 𝑦 𝜔 ≥0 Let 𝑧 𝜔 (𝑥) be the optimal cost of (6.16). ( 𝑧 𝜔 𝑥 =∞ if infeasible) min 𝑐 ′ 𝑥+ 𝜔=1 𝐾 𝛼 𝜔 𝑧 𝜔 (𝑥) s.t. 𝐴𝑥=𝑏 (6.17) 𝑥≥0 Need to consider only those 𝑥 for which none of the 𝑧 𝜔 𝑥 =∞. Use duality. Linear Programming 2014
Dual of (6.16) when 𝑥 is fixed: max 𝑝 𝜔 ′ 𝑑 𝜔 − 𝐵 𝜔 𝑥 s.t. 𝑝 𝜔 ′𝐷≤𝑓′ (6.18) Let 𝑃= 𝑝: 𝑝 ′ 𝐷≤𝑓′ . We assume 𝑃 is nonempty and has at least one extreme point. Let 𝑝 𝑖 , 𝑖=1,…,𝐼, be the extreme points, and let 𝑤 𝑗 , 𝑗=1,…,𝐽 be a complete set of extreme rays of 𝑃. Since 𝑃 nonempty, either (6.18) has an optimal solution (so 𝑧 𝜔 (𝑥) is finite) or unbounded (primal (6.16) is infeasible, and 𝑧 𝜔 𝑥 =∞, which should be avoided). In particular, 𝑧 𝜔 𝑥 <∞ if and only if 𝑤 𝑗 ′ 𝑑 𝜔 − 𝐵 𝜔 𝑥 ≤0, ∀ 𝑗. (6.19) Whenever 𝑧 𝜔 𝑥 is finite, 𝑧 𝜔 𝑥 = max 𝑖=1,…,𝐼 𝑝 𝑖 ′ 𝑑 𝜔 − 𝐵 𝜔 𝑥 . Alternatively, 𝑧 𝜔 𝑥 is the smallest number 𝑧 𝜔 such that 𝑝 𝑖 ′ 𝑑 𝜔 − 𝐵 𝜔 𝑥 ≤ 𝑧 𝜔 , ∀ 𝑖. Linear Programming 2014
Use this characterization of 𝑧 𝜔 (𝑥) in the original problem (6 Use this characterization of 𝑧 𝜔 (𝑥) in the original problem (6.17) with the condition (6.19) which is required for 𝑧 𝜔 (𝑥) to be finite. Then the master problem (6.17) can be put in the form min 𝑐 ′ 𝑥+ 𝜔=1 𝐾 𝛼 𝜔 𝑧 𝜔 s.t. 𝐴𝑥=𝑏 (6.20) 𝑝 𝑖 ′ 𝑑 𝜔 − 𝐵 𝜔 𝑥 ≤ 𝑧 𝜔 , ∀ 𝑖,𝜔, 𝑤 𝑗 ′ 𝑑 𝜔 − 𝐵 𝜔 𝑥 ≤0, ∀ 𝑗,𝜔, 𝑥≥0 The number of variables has been reduced, but the number of constraints can be extremely large. Use cutting plane method. Linear Programming 2014
Delayed constraint generation In a typical iteration, we consider the relaxed master problem, which has the same objective as the problem (6.20), but involves only a subset of constraints. Assume that we have an optimal solution to the relaxed problem, consisting of a vector 𝑥 ∗ and a vector 𝑧 ∗ = 𝑧 1 ∗ ,…, 𝑧 𝐾 ∗ . For 𝜔=1,…,𝐾, we consider the subproblem min 𝑓′ 𝑦 𝜔 s.t. 𝐷 𝑦 𝜔 = 𝑑 𝜔 − 𝐵 𝜔 𝑥 ∗ 𝑦 𝜔 ≥0 For different iterations or values of 𝜔, only have different right-hand side, and the dual problems always have the same feasible set, namely, 𝑃. Hence use dual simplex to solve the subproblems. Linear Programming 2014
Different possibilities to consider: (a) If dual simplex method indicates that a (primal) subproblem is infeasible, can identify an extreme ray 𝑤 𝑗(𝜔) of the dual feasible set 𝑃, such that 𝑤 𝑗(𝜔) ′ 𝑑 𝜔 − 𝐵 𝜔 𝑥 ∗ >0 Identified a violated constraint, which can be added to the relaxed master. (b) If a primal subproblem is feasible, dual simplex provides a dual optimal basic feasible solution 𝑝 𝑖(𝜔) . If we have 𝑝 𝑖(𝜔) ′ 𝑑 𝜔 − 𝐵 𝜔 𝑥 ∗ > 𝑧 𝜔 ∗ , Linear Programming 2014
(c) Finally, if the primal subproblems are all feasible and we have 𝑝 𝑖(𝜔) ′ 𝑑 𝜔 − 𝐵 𝜔 𝑥 ∗ ≤ 𝑧 𝜔 ∗ , for all 𝜔, then by the optimality of 𝑝 𝑖(𝜔) , we obtain 𝑝 𝑖 ′ 𝑑 𝜔 − 𝐵 𝜔 𝑥 ∗ ≤ 𝑧 𝜔 ∗ , for all extreme points 𝑝 𝑖 . In addition, 𝑤 𝑗 ′ 𝑑 𝜔 − 𝐵 𝜔 𝑥 ∗ ≤0, for all extreme rays 𝑤 𝑗 , and no constraints violated. We then have an optimal solution to the master problem (6.20), and the algorithm terminates. See text p.259 for description of Benders’ decomposition. Also called L-shaped method for two stage stochastic programming problems. Linear Programming 2014