Benders Decomposition Methods for Structured Optimization, including Stochastic Optimization Robert M. Freund May 2, 2001
Block Ladder Structure Basic Model minimize x;y c T x + f T y s:t: Ax = b Bx + Dy = d x 0 y 0 : cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 1
c T x + ff1f T 1 y 1 + ff2f T 2 y 2 + + ff K f T K y K y1;:::;y K x; Ax = b s:t: B K x + D K y K = d K Block Ladder Structure More Complex Structure minimize B1x + D1y1 = d1 + D2y2 = d2 B2x..... y1;y2;:::;y K 0 : x; cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 2
Block Ladder Structure More Complex Structure Stage-1 Variables Stage-2 Variables Objectives RHS State 1 State 2 State 3 State k cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 3
Basic Model Reformulation VAL = minimum x;y c T x + f T y s:t: Ax = b Bx + Dy = d x 0 y 0 ; cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 4
Basic Model Reformulation = minimum x c T x + z(x) VAL s:t: Ax = b where: x 0 ; P2 : z(x) = minimum y f T y s:t: Dy = d Bx y 0 : cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 5
Basic Model Reformulation P2 : z(x) = minimum y f T y s:t: Dy = d Bx The dual is: y 0 : D2 : z(x) = maximum p p T (d Bx) s:t: D T p» f : cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 6
Basic Model Reformulation = maximum p p T (d Bx) D2 : z(x) s:t: D T p» f : The feasible region of D2 is the set: D2 := Φ p j D T p» f Ψ : cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 7
p 1 ; : : : ; p I r 1 ; : : : ; p J Basic Model Reformulation The feasible region of D2 is the set: Extreme points are: D 2 := Φ p j D T p» f Ψ ; Extreme rays are: cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 8
Basic Model Reformulation = maximum p p T (d Bx) D2 : z(x) s:t: D T p» f : If we solve D2, two case arise: D2 is unbounded from above, or D2 has an optimal solution. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 9
Basic Model Reformulation = maximum p p T (d Bx) D2 : z(x) s:t: D T p» f : If D2 is unbounded from above, the algorithm will return one of the extreme rays μr = r j for some j. (r j ) T (d Bx) > 0 z(x) = +1 : cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 10
Basic Model Reformulation D2 : z(x) = maximum p p T (d Bx) s:t: D T p» f : If D2 has an optimal solution, the algorithm will return one of the extreme points μp = p i for some i. = (p i ) T (d Bx) = max z(x) (pk ) T (d Bx) : k=1;:::;i cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 11
Basic Model Reformulation = maximum p p T (d Bx) D2 : z(x) s:t: D T p» f : D2 : z(x) = minimum z z s:t: (p i ) T (d Bx)» z i = 1; : : : ; I (r j ) T (d Bx)» 0 j = 1; : : : ; J : cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 12
Basic Model Reformulation Full Master Problem... = minimum x c T x + z(x) VAL s:t: Ax = b x 0 ; FMP : VAL = minimum x;z c T x + z s:t: Ax = b x 0 (p i ) T (d Bx)» z i = 1;:::;I j ) T (d Bx)» 0 j = 1;:::;J : (r cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 13
Basic Model Reformulation...Full Master Problem FMP : VAL = minimum x;z c T x + z s:t: Ax = b x 0 (p i ) T (d Bx)» z i = 1;:::;I j ) T (d Bx)» 0 j = 1;:::;J : (r We have eliminated the y variables from the problem. We have added a single scalar variable z. We have added a generically extremely large number of constraints. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 14
Delayed Constraint Generation Restricted Master Problem Consider problem RMP k composed of only k of the extreme point/extreme ray constraints from FMP: RMP k : VAL k = minimum x;z c T x + z s:t: Ax = b x 0 (p i ) T (d Bx)» z i = 1;:::;k l (r j ) T (d Bx)» 0 j = 1;:::;l : cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 15
Delayed Constraint Generation Restricted Master Problem Lower Bound on VAL RMP k : VAL k = minimum x;z c T x + z s:t: Ax = b x 0 (p i ) T (d Bx)» z i = 1;:::;k l (r j ) T (d Bx)» 0 j = 1;:::;l : We solve this problem, obtaining VAL k, μx; μz k» VAL : VAL cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 16
Delayed Constraint Generation Restricted Master Problem RMP k : VAL k = minimum x;z c T x + z s:t: Ax = b x 0 (p i ) T (d Bx)» z i = 1;:::;k l (r j ) T (d Bx)» 0 j = 1;:::;l : Check whether the μx; μz solution is optimal for the full master problem. Check μx; μz whether violates any of the non-included constraints. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 17
Delayed Constraint Generation Solve the Subproblem Finding a Violated Constraint Solve: Q(μx) : q Λ = maximum p p T (d Bμx) = minimum y f T y s:t: D T p» f s:t: Dy = d Bμx y 0 : If Q(μx) is unbounded, return an extreme ray μr = r j for some j, where μx will satisfy: j ) T (d Bμx) > 0 : (r μx Therefore has violated the constraint: (r j ) T (d Bx)» 0 ; Add this constraint to RMP and re-solve RMP. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 18
c T μx + f T μy» UB; then BESTSOL ψ (μx; μy) : If ψ minfub;c T μx + f T μyg : UB Delayed Constraint Generation Solve the Subproblem Upper Bound on VAL Q(μx) : q Λ = maximum p p T (d Bμx) = minimum y f T y s:t: D T p» f s:t: Dy = d Bμx y 0 : If Q(μx) has an optimal solution, return an optimal extreme point μp = p i for some i, and the optimal solution μy to the minimization problem of Q(μx). (μx; μy) is feasible for the original problem. Suppose that UB is an upper bound on VAL. Update UB: cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 19
Delayed Constraint Generation Solve the Subproblem Finding a Violated Constraint Q(μx) : q Λ = maximum p p T (d Bμx) = minimum y f T y s:t: D T p» f s:t: Dy = d Bμx If q Λ > μz, then y 0 : (p i ) T (d Bμx) = q Λ > μz : We therefore have found that μx; μz has violated the constraint: (p i ) T (d Bx)» z ; and so we add this constraint to RMP and re-solve RMP. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 20
Delayed Constraint Generation Solve the Subproblem Checking for Full Optimality Q(μx) : q Λ = maximum p p T (d Bμx) = minimum y f T y s:t: D T p» f s:t: Dy = d Bμx If q Λ» μz, then: y 0 : max (pk ) T (d B μx) = (p i ) T (d B μx) = q Λ» μz ; k=1;:::;i μx; μz is feasible and hence optimal for FMP (μx; μy) is optimal for the original problem. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 21
Delayed Constraint Generation Solve the Subproblem Termination Criterion Otherwise terminate if: UB VAL k» " for a pre-specified tolerance ". cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 22
Delayed Constraint Generation Algorithm 0. LB= 1 Set UB= and +1. 1. A typical iteration starts with the relaxed master problem RMP, in which only k constraints of the full master problem FMP are included. An optimal k μx; μz solution to the relaxed master problem is computed. We update the lower bound on VAL: LB ψ VAL k : 2. Solve the subproblem Q(μx): Q(μx) : q Λ = maximum p p T (d Bμx) = minimum y f T y s:t: D T p» f s:t: Dy = d Bμx 0 : y cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 23
Delayed Constraint Generation Algorithm 3. If Q(μx) has an optimal solution, let μp and μy be the primal and dual solutions of Q(μx). Ifq Λ» μz, then μx; μz satisfies all constraints of FMP, and so μx; μz is optimal for FMP. Furthermore, this implies that (μx; μy) is optimal for the original problem. If q Λ > μz, then we add the constraint: μp T (d Bx)» z to the restricted master problem RMP. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 24
Delayed Constraint Generation Algorithm Update the upper bound and the best solution: If c T μx + f T μy» UB; then BESTSOL ψ (μx; μy) UB ψ minfub; c T μx + f T μyg If UB LB» ", then terminate. Otherwise, return to step 1. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 25
Delayed Constraint Generation Algorithm 4. If Q(μx) is unbounded from above, let μr be the extreme ray generated by the algorithm that solves Q(μx). Add the constraint: μr T (d Bx)» 0 to the restricted master problem RMP, and return to step 1. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 26
Delayed Constraint Generation Algorithm Comments This algorithm is known formally as Benders decomposition. Benders decomposition method was developed in 1962. Benders decomposition method is the same as Dantzig-Wolfe decomposition applied to the dual problem. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 27
B K x + D K y K = d K Benders Decomposition Block-Ladder Structure = minimize c T x + ff1f T 1 y 1 + ff2f T 2 y 2 + + ff K f T K y K VAL y1;:::;y K x; s:t: Ax = b B1x + D1y1 = d1 + D2y2 = d2 B2x..... y1;y2;:::;y K 0 : x; cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 28
minimum c K P x + = ff!z T (x)! x!=1 P2! : z! (x) = minimum y! f T! y! Benders Decomposition Block-Ladder Structure Reformulation... VAL s:t: Ax = b x 0 ; where: s:t: D! y! = d! B! x y! 0 : cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 29
P2! : z! (x) = minimum y! f T! y! Benders Decomposition Block-Ladder Structure...Reformulation... s:t: D! y! = d! B! x y! 0 : The dual is: D2! : z! (x) = maximum p! p T!(d! B! x) s:t: D T! p!» f! : cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 30
1 I!! ;:::;p! p 1 J!! ;:::;p! r Benders Decomposition Block-Ladder Structure...Reformulation... D2! : z! (x) = maximum p! p T!(d! B! x) The feasible region of D2! is the set: s:t: D T! p!» f! : Extreme points of D! 2 : D! 2 := Φ p! j D T! p!» f! Ψ ; Extreme rays of D! 2 : cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 31
Benders Decomposition Block-Ladder Structure...Reformulation... D2! : z! (x) = maximum p! p T! (d! B! x) s:t: D T! p!» f! : If we solve D2!, two case arise: D2! is unbounded from above, or D2! has an optimal solution. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 32
Benders Decomposition Block-Ladder Structure...Reformulation... D2! : z! (x) = maximum p! p T! (d! B! x) s:t: D T! p!» f! : If D2! is unbounded from above, return one of the extreme rays μr! = r j! for some j, with the property that in which case (r j! )T (d! B! x) > 0 z! (x) = +1 : cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 33
Benders Decomposition Block-Ladder Structure...Reformulation... D2! : z! (x) = maximum p! p T! (d! B! x) s:t: D T! p!» f! : If D2! has an optimal solution, return one of the extreme points μp! = p i! for some i as well as the optimal objective function value z! (x) z! (x) = (p i! )T (d! B! x) = max (p k! )T (d! B! x) :! k=1;:::;i cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 34
D2! : z! (x) = minimum z! z! s:t: (p i!) T (d! B! x)» z! i = 1;:::;I! Benders Decomposition Block-Ladder Structure...Reformulation... D2! : z! (x) = maximum p! p T!(d! B! x) s:t: D T! p!» f! : (r j!) T (d! B! x)» 0 j = 1;:::;J! : cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 35
= x c T K x + P VAL ff! z! (x) minimum!=1 x; z 1 ;:::;z K Benders Decomposition Block-Ladder Structure...Reformulation s:t: Ax = b x 0 ; FMP : VAL = minimum T K + P c ff! z! x!=1 s:t: Ax = b x 0 (p i!) T (d! B! x)» z! i = 1;:::;I! ;! = 1;:::;K (r j!) T (d! B! x)» 0 j = 1;:::;J! ;! = 1;:::;K : cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 36
T K P c ff!z! + x!=1 z1;:::;z K x; Ax = b s:t: Block-Ladder Structure Restricted Master Problem Consider problem RMP k composed of only k of the extreme point/extreme ray constraints from FMP: RMP k : VAL k = minimum x 0 (p i!) T (d! B! x)» z! for some i and! j!) T (d! B! x)» 0 for some i and! ; (r where there are a total k of of the inequality constraints. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 37
T K P c ff!z! + x!=1 z1;:::;z K x; Ax = b s:t: Block-Ladder Structure Restricted Master Problem Lower Bound on VAL RMP k : VAL k = minimum x 0 (p i!) T (d! B! x)» z! for some i and! (r j!) T (d! B! x)» 0 for some i and! ; Solve for VAL k and μx; μz 1 ; : : : ; μz K cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 38
T K P c ff!z! + x!=1 z1;:::;z K x; Ax = b s:t: Block-Ladder Structure Restricted Master Problem RMP k : VAL k = minimum x 0 (p i!) T (d! B! x)» z! for some i and! (r j!) T (d! B! x)» 0 for some i and! ; Solve for VAL and μx; μz1;:::;μz k K Check whether the μx; μz1;:::;μz solution K is optimal for FMP Check μx; μz1;:::;μz whether K violates any of the non-included constraints. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 39
Q! (μx) : q Λ! = maximum p! pt!(d! B! μx) = minimum y! f T! y! s:t: D T! p!» f! Block-Ladder Structure Restricted Master Problem Solve the Subproblems s:t: D! y! = d! B! μx y! 0 : If Q! (μx) is unbounded, return an extreme ray μr! = r j! for some j, where μx will satisfy: j!) T (d! B! μx) > 0 : (r μx Therefore has violated the constraint: j!) T (d! B! x)» 0 ; (r and so we add this constraint to RMP. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 40
Q! (μx) : q Λ! = maximum p! pt!(d! B! μx) = minimum y! f T! y! s:t: D T! p!» f! Block-Ladder Structure Restricted Master Problem Finding a Violated Constraint s:t: D! y! = d! B! μx! 0 y : (μx) If Q! has an optimal solution, return an μp optimal = p extreme! point i! for some i, as well as μy the optimal solution! of the minimization problem of Q! (μx). If!, then > μz Λ q! i!) T (d! B! μx) = q Λ! > μz! : (p μx; μz Therefore! has violated the constraint: i!) T (d! B! x)» z! ; (p and so we add this constraint to RMP. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 41
Q! (μx) : q Λ! = maximum p! pt!(d! B! μx) = minimum y! f T! y! s:t: D T! p!» f! KX! f T! μy!» UB; then BESTSOL ψ (μx; μy 1 ;:::;μy K ) : ff!=1 KX! f T! μy! g : ff!=1 Block-Ladder Structure Restricted Master Problem Upper Bound on VAL s:t: D! y! = d! B! μx y! 0 : If q Λ! is finite for all! = 1;:::;K, then μx; μy1;:::;μy K satisfies all of the constraints of the original problem. Suppose that UB is an upper bound on VAL, we update UB as follows: If c T μx + UB ψ minfub;c T μx + cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 42
Q! (μx) : q Λ! = maximum p! pt!(d! B! μx) = minimum y! f T! y! s:t: D T! p!» f! max (p l!) T (d! B! μx) = (p i!) T (d! B! μx) = q Λ!» μz!! l=1;:::;i Block-Ladder Structure Restricted Master Problem Checking for Optimality s:t: D! y! = d! B! μx If q Λ!» μz! for all! = 1;:::;K, then we have: y! 0 : for all! = 1;:::;K; μz1;:::;μz K satisfies all of the constraints in FMP. μx; μz1;:::;μz K is feasible and hence optimal for FMP μx; μy1;:::;μy K ) is optimal for the original problem, and we can terminate the (μx; algorithm. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 43
Block-Ladder Structure Restricted Master Problem Termination Criterion Else, we can also terminate the algorithm whenever: UB VAL k» " for a pre-specified tolerance ". cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 44
Q! (μx) : q Λ! = maximum p! pt!(d! B! μx) = minimum y! f T! y! s:t: D T! p!» f! Benders Decomposition Block-Ladder Structure Algorithm... 0. LB= 1 Set UB= and +1. 1. A typical iteration starts with the relaxed master problem RMP, in which only k constraints of the full master problem FMP are included. An optimal k μx; μz1;:::;μz solution K to the relaxed master problem is computed. We update the lower bound on VAL: LB ψ VAL k : 2. For! = 1;:::;K, solve the subproblem Q! (μx): s:t: D! y! = d! B! μx! 0 : y cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 45
Benders Decomposition Block-Ladder Structure...Algorithm... If Q! (μx) is unbounded from above, let μr! be the ffl extreme ray generated by the algorithm that solves Q(μx). Add the constraint: μr T! (d! B! x)» 0 to the restricted master problem RMP. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 46
μp T! (d! B! x)» z! Benders Decomposition Block-Ladder Structure...Algorithm... If Q (μx)! has an optimal solution, μp let! μy and! ffl be the primal and dual solutions of Q Ifq!! (μx).!, μz then we add the constraint: > Λ to the restricted master problem RMP. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 47
KX KX Benders Decomposition Block-Ladder Structure...Algorithm 3. If q Λ!» μz! for all! = 1;:::;K, then (μx; μy1;:::;μy K ) is optimal for the original problem, and the algorithm terminates. 4. If Q! (μx) has an optimal solution for all! = 1;:::;K, then update the upper bound on VAL as follows: If c T μx + ff! f! T μy!» UB; then BESTSOL ψ (μx; μy1;:::;μy K ) :!=1 ff f T! μy! g :!!=1 If» UB LB ", then terminate. Otherwise, add all of the new constraints to RMP and return to step 1. UB ψ minfub;c T μx + cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 48
Benders Decomposition Block-Ladder Structure Comment In this version of Benders decomposition, we might add as many as K new constraints per major iteration. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 49
min x;y 125 x i + i P c ff! c i x i» 10; 000 i=1 4P 0:01f i (!)h j y ijk! y ijk! D jk! for all j; k;! (Demand constraints) i=1 5P The Power Plant Investment Model 15 P i=1 4P!=1 i=1 5P j=1 5P k=1 (Budget constraint) s.t. x 4» 5:0 (Hydroelectric constraint) y ijk!» x i for i = 1;:::;4; all j; k;! (Capacity constraints) x 0; y 0! is the probability of scenario! ff jk! is the power demand in block j and year k under scenario!. D cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 50
The Power Plant Investment Model Size of Model 4 stage-1 variables 46; 875 stage-2 variables 2 stage-1 constraints constraints for each of the 125 scenarios in 375 stage-2. Total of 46; 877 constraints. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 51
P 5 i=1 y ijk! D jk! for all j; k (Demand constraints) The Power Plant Investment Model Subproblem Consider a fixed x which is feasible (i.e., x 0 and satisfies the budget constraint and hydroelectric constraint). z! (x) := min y 5 j=1 i=1p 5P 15P 0:01f i (!)h j y ijk! k=1 s.t. y ijk!» x i for i = 1;:::;4; all j; k; (Capacity constraints) y 0: Each subproblem has only 375 variables and 375 constraints. (Furthermore, the structure of this problem lends itself to a simple greedy optimal solution.) cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 52
z! (x) := max p;q 15P 5 i p ijk + P x j=1 k=1 D jk! q jk The Power Plant Investment Model Dual of Subproblem The dual of the above problem is: 15 P k=1 i=1 4P j=1 5P s.t. p ijk + q jk» 0:01f i (!)h j i = 1;:::;4; for all j; k p ijk» 0 q jk 0: cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 53
Computational Results Original Model Iterations All models were solved using CPLEX, called from the AMPL programming environment on a 450 MHz Pentium II processor. Original Model Iterations Simplex 41,339 Interior-point 51 cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 54
Computational Results Benders Decomposition Iterations and Constraints Benders duality gap tolerance is " = 10 2. Benders Decomposition Basic (1 Block) Block-Ladder (125 Blocks) Master Iterations 39 15 Generated Constraints 42 1,726 cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 55
Computational Results CPU Time Benders Decomposition Original Model Basic (1 Block) Block-Ladder (125 Blocks) Simplex 7:50 4:55 2:35 Interior-point 1:00 6:20 3:00 cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 56
Computational Results Upper and Lower Bounds 50 Block Ladder 125 Blocks Basic 1 Block 40 Bounds (in billion $) 30 20 10 0 0 5 10 15 Iteration cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 57
Computational Results Duality Gap 10 5 Block Ladder 125 Blocks Basic 1 Block 10 4 Upper bound lower bound 10 3 10 2 10 1 10 0 10 1 10 2 0 5 10 15 20 25 30 35 40 Iteration cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 58
References D. Anderson. Models for determining least-cost investments in electricity supply. The Bell Journal of Economics, 3:267 299, 1972. J. Benders. Partitioning procedures for solving mixed-variables programming problems. Numerische Mathematik, 4:238 252, 1962. D. Bertsimas and J. Tsitisklis. Introduction to Linear Optimization. Athena Scientific, 1997. J. Birge and F. Louveaux. Introduction to Stochastic Programming. Springer-Verlag, 1997. cfl2002 Massachusetts Institute of Technology. All rights reserved. 15.094 59