Benders Decomposition
Benders Decomposition
1. Introduction Benders decomposition is a popular optimization technique. J. F. Benders initially introduced the Benders decomposition algorithm for solving large-scale Mixed Integer Programming (MIP) problems. The basic idea is to separate integer variables and real variables and treat larger optimization problem via decomposition in order to speed up the calculation speed. The Benders decomposition algorithm has been successfully used in a different way to take advantage of underlying problem structures for various optimization problems, such as network design, optimal transportation problem, plant location and stochastic optimization. What is more, in a restructured power system, Benders decomposition also has some applications for a series of independent entities (e.g., GENCOs and ISO), which include security-constrained unit commitment, generation and transmission maintenance scheduling, generation resource planning, and so on. In applying the Benders decomposition algorithm, the original problem will be decomposed into a master problem and several subproblems, based on the linear programming duality theory. Generally, the master-program is an integer problem and subproblems are the linear programs. The process of solution of the master problem begins with only a few or no constraints. The subproblems are used to see if optimal solutions the remaining constraints based on this solution of the master problem. If subproblems are feasible, we will obtain an upper bound solution of the original problem, while forming a new objective function for the next optimal calculation of the master problem. If any of the subproblems is infeasible, a corresponding infeasibility cut representing the least satisfies constraint will be introduced to the master problem. Then, a lower bound solution of the original problem is obtained by re-calculating the master problem with more constraints. The final solution based on the Benders algorithm may require iterations between the master problem and subproblems. When the upper bound and the lower bound are sufficiently close, the optimal solution of the original problem is achieved. 2. Definitions and Theorems The following definitions and theorems are reviewed for analyzing the Benders decomposition algorithm. Polyhedron: A nonempty polyhedron is represented as P = x R n Ax b shown in Figure 2.1. Where A is an m n matrix, x is a n -vector, b is an m -vector. Assume rank ( A) = n and P . Extreme Points: A point x P is an extreme point of P if there do not exist points x 1 and x 2 in P and a scalar (with x 1 x 2 and 0 < < 1 ) such that x = x 1 + (1 )x 2 . For example, extreme points x a and x b are shown in Figure 2.1.
xa
Polyhedron
xb
Figure 2.1 Polyhedral Cone: A polyhedron of the form P 0 = x R n Ax 0 is called a polyhedral cone. Note that the origin is a member of every polyhedral cone and P 0 does not contain a line. Recession Cone: Consider a nonempty polyhedron P = x R n Ax b and fix a point y P . The recession cone at y is the set of all directions along which we can move indefinitely from y and still be in P , i.e., r R n A( y + r ) b 0 . This set turns out to be r R Ar 0 and is hence a polyhedral cone P 0 independent of y shown in Figure 2.2. r in recession cone are called rays of polyhedron P . Extreme Rays: A point r R n is an extreme ray of P 0 if there do not exist rays r 1 and r 2 in P 0 and a scalar (with r 1 r 2 and 0 < < 1 ) such that r = r 1 + (1 )r 2 . For example, extreme rays r a and r b are shown in Figure 2.2. Note that two extreme rays are equivalent if one is a multiple of the other and that a polyhedral cone has a finite number of non-equivalent extreme rays. In addition, every ray of a polyhedral cone P 0 is expressed as a nonnegative linear combination of extreme rays. Polyhedron
ra
Recession Cone
rb
Figure 2.2 2
Theorem 2.1: If linear programming (LP) has a feasible region Ax b with at least one extreme point and the objective function Max c T x is bounded, then there is an optimal solution that is an extreme point in P . Theorem 2.2: Max c T x Ax b is an unbounded LP if and only if some extreme rays
r
satisfy c T r 0 .
Theorem 2.3: If LP cannot meet Ax b (no feasible region), then there is no optimal solution. Theorem 2.4: A nonempty polyhedron P = x R n Ax b can be represented as
P = x R n x = k x k + j r j ik jJ
x1 , L , x k
with
k = 1, k 0, k K , j 0, j J ik
where
are the extreme points and r 1 , L , r j are the extreme rays. Note that a nonempty polyhedral P is bounded if and only if it has no extreme rays. This theorem is the basis for decomposition algorithms of LP. 3. Primal Problem and Dual Problem In this section, the relationship between primal and dual problems and the related duality theorems are discussed. Every LP called the primal problem can be equivalently expressed in another LP form called the dual problem. The primal problem can be expressed in matrix notation as follows:
Minimize z = c T x Ax b s. t. x0
Primal
(3.1)
where c and x are n-vector, b is an m-vector and A is an m x n matrix. The linear function c T x is called objective function. The linear inequalities are called constraints and they form a feasible region for minimize the objective function. The elements in the feasible region are called the feasible point written as x R n Ax b, x 0 . The vector x is the solution of the primal problem. Its corresponding dual problem is defined as:
Maximize z = b T y s. t.
ATy c y0
Dual
(3.2)
The number of inequalities in the primal problem becomes the number of variables in the dual problem. Correspondingly, the number of variables in the primal problem becomes the number of inequalities in the dual problem. Hence the dual problem differs in dimensions from the primal problem.
LP Solution Method: Generally, we use the simplex method to solve LP. Note that it is typically easier to solve numerically an LP with fewer constraints. Since the primal problem has m constraints while the dual problem has n constraints, this generates the following rule of thumb: Solve the problem that has the fewer number of constraints. For instance, solve the primal problem if m<n, but solve the dual problem if m>n. Switching Rules: The relationship between primal and dual problems is listed in Table 3.1. Table 3.1 Primal (or Dual) Objective Variable (n) Constraints (m)
Max z
0 0
Min w
Unlimited
=
= 0 0
Variable (m)
Right-side vector of constraints Coefficient vector of variables in objective function Example 3.1: Primal problem
S .t. x1 + 2 x 2 x1 Max z = 5 x1 + 4 x 2 + 6 x 3 2 + x3 3
Dual problem
Min w = 2 y1 + 3 y 2 5 y 3 + y 4 S .t. y1 + y 2 3 y 3 + y 4 5 2 y1 + 2 y3 y 4 4 y 2 + y3 + y 4 = 6 y1 0, y 2 , y 3 0, y 4 un lim ited
Weak duality property: If x is a feasible solution of the primal problem and y is a feasible solution of the dual problem, then c T x b T y . Strong duality property: If x * is an optimal solution of the primal problem and y * is an optimal solution of the dual problem, then c T x * = b T y * . Thus, solving one of the two problems is equivalent to solving the other. Symmetry property: The dual of the dual is the primal.
Duality Theorems: Theorem 3.1: If the feasible solution exists and objective function is bounded for one, then the same is true for other problem. Theorem 3.2: If the feasible solution exists and objective function is unbounded for one, then the other problem is infeasible. Theorem 3.3: If no feasible solutions exist for one, then the other problem is either infeasible or has an unbounded objective function. 4. Basic Model of Benders Decomposition A mixed-integer program has the following form:
Minimize z = c T x + d T y s. t.
Ay b Ex + Fy h x 0, y S
P1
(4.1)
where, A: m n matrix, E: q p matrix, F: q n matrix, x, c : p vectors, y, d : n integer vector, b : m vector, h : q vector, S : an arbitrary subset of E p with integral-valued components Since x is continuous and y is integer, (P1) is a mixed-integer problem. If y values are fixed, (P1) is linear in x. Hence, (4.1) is written as:
Minimize d T y Ay b + Min c T x | Ex h Fy, x 0
yR
}}
(4.2)
where,
(4.3)
So, the original problem can be decoupled into a master problem and a subproblem. Initial master problem (MP1) We begin with solving the following MP1 (4.4).
MP1
(4.4) Here, we use z , instead of d T y , as the objective function. Meanwhile, the inner part of minimization (4.2) is a subproblem rewritten as follows: Primal subproblem (SP1)
Minimize c T x s.t. Ex h Fy x0
SP1
(4.5)
SP2
(4.6)
Based on the duality theory, three possible cases will arise when solving SP2. 1. SP2 has a feasible solution and its objective function is bounded. So, we obtain an optimal solution that is an extreme point ( u1 , u2 ,, or up ) in the dual feasible region shown in Figure 4.1. Note that the dual feasible region doesnt depend on vector y . So, the minimum value of the objective function in SP1 is
)T up equal to the maximum value of the objective function in SP2, (h Fy i , 1, K , n p ,
where n p
P = u E T u c, u 0
}.
up 2
u3
p u1
up i
Figure 4.1
up 5
2. SP2 has a feasible solution but unbounded solution. When SP2 is unbounded then SP1 is infeasible (according to Theorem 3.2). Based on Theorem 2.2, the extreme rays of SP2 given as u ir (i = 1, K , n r ) , where n r is number of extreme rays
)T ur of the polyhedral cone P 0 = u E T u 0, u 0 , satisfy (h Fy i 0 . In order to )T ur obtain a feasible and bounded solution in SP2, (h Fy i 0 must be satisfied. T r So, we will add (h Fy ) u i 0 as additional constraints (Benders cuts) into MP2 for the next iterative calculation. However, we would first need to calculate an extreme ray u r for the above constraint by introducing slack variables into SP1. Thus, SP1 is rewritten as follows:
Minimize c T x + m T s St. Ex + Is h Fy x 0, s 0 ur
(4.7)
where,
I m s
Identity matrix q penalty cost vector of violation on constraints in SP1 q slack vector on constraints in SP1
Since the elements of m are infinitely large (e.g., 106), we obtain an approximately equivalent extreme ray u r . We can also use a new SP1 (4.8), feasibility check subproblem, to get an exact extreme ray u r in SP2. Note that two extreme rays are equivalent if one is a multiple of the other.
Minimize 1 T s St. Ex + Is h Fy x 0, s 0 ur
(4.8)
where 1 is the unit vector. 3. SP2 is infeasible. Then the original problem (P1) is either infeasible or has an unbounded objective function. Stop the process.
The resulting algorithm involves iterations between MP2 and SP2. The first is the modified master problem MP2 to which additional constraints from the subproblem are successively added. The second is the LP subproblem (SP1 or SP2), which tests the optimality of a solution for the modified problem and, if necessary, provides a new constraint for the next iteration. 5. Solution Steps for the Benders Cut Algorithm. The flowchart for the Benders decomposition is as shown in Figure 5.1.
. and y Step 1. Solve MP1 in (4.4) and obtain an initial lower bound solution given as z = in If MP1 is infeasible so will be the original problem P1. If MP1 is unbounded, set z (an arbitrary element of S), and go to step 2. (4.4) for y
Step 2. Solve SP2 in (4.6) or SP1 in (4.5). An upper bound solution of the original )T u p or the + (h Fy )T u p for the optimal objective of (h Fy upper = d T y problem P1 is z
for y and x . upper bound solution of the original problem P1 is c T x
upper z lower for P1, then stop the process. Otherwise, generate a new If z p (optimality cut) for MP2 (4.9) and go to step 3. constraint z lower d T y + (h Fy) T u
If SP2 is unbounded, which means that SP1 is infeasible, then introduce a new cut r 0 (feasibility cut) into MP2 (4.9). In this case, we will first calculate u r (h Fy )T u from (4.8) to form the feasibility cut and then go to step 3. If SP2 is infeasible, the original problem P1 will either have no feasible solution or have an unbounded solution.
for the lower with respect to y Step 3. Solve MP2 to obtain a new lower bound solution z original problem P1.
In the following formulation, we use either optimality cut (first constraint) or the feasibility cut (third constraint).
Minimize z lower s. t. z lower d T y + (h Fy) T u p i , i = 1, K , n p Ay b
MP2
(4.9)
(h Fy )T u ir 0, i = 1, K , n r
y S
If the solution of MP2 (4.9) is infeasible, so will be the original problem P1. Stop the process.
Yes
Converged ?
Optimal Solution
No
r (h Fy )T u
p zlower d Ty + (h Fy) T u
Stop
c T = [1]
= 5 . lower = 5 when y The lower bound optimal solution of the original problem is z
Form SP1.
Min x S .t. 2 x 3 y x0
Form SP2.
)u Max (3 y S .t. 2u 1 u0 = 5 y Max 8u S .t. 2u 1 u0 1 2 + 4 = 5 + 4 = 1 . =y
Solve SP2. We get its optimal solution equal to 4 at u = . Thus, the upper bound optimal
upper solution of the original problem is z
1 2
= 5 . lower = 1 for y The new lower bound optimal solution of the original problem is z
10
+ 4 = 5 + 4 = 1 . upper = y So, the upper bound optimal solution of the original problem is z
upper = z lower = 1 , the process has converged. Because z
c T = [1]
y { 5,4, K ,3,4}
= 5 . lower = 5 when y The lower bound optimal solution of the original problem is z
Form SP1.
Min x S .t. 2 x 3 + y x0 = 5 y Min x S .t. 2 x 2 x0
Here SP2 is unbounded. According to Theorem 2.2, we form a Benders cut (3 + y ) * u r 0 . However, we obtain u r by introducing a slack variable s into SP1 as follows.
Min s S .t. 2 x s 2 x 0, s 0 ur
11
The dual variable u r is equal to 1. Thus, the Benders cut is (3 + y ) * (1) 0 . Iteration 2: Form MP2 with a new constraint (3 + y ) * (1) 0 .
Min z S .t. zy y { 5, 4,K ,3,4} (3 + y ) * (1) 0 Min z S.t. zy y 3 y { 5, 4 ,K ,3,4}
lower = 3 with respect The new lower bound optimal solution of the original problem is z = 3 . Solve SP2 based on the above solution: to y )u Max (3 + y S .t. 2u 1 u0
= 3 y
Max 0 * u S .t. 2u 1 u0
+ 0 = 3 + 0 = 3 . upper = y So, the upper bound optimal solution of the original problem is z
Example 5.3 In this example, we show how to switch an optimal problem into a standard optimization problem in which we use the Benders decomposition method. Assume an optimal problem (5.1).
Minimize z = c T x Ex h s. t. x0
(5.1)
By using the slack vector y , (5.1) is written as (5.2) in a standard Benders decomposition:
Minimize z = c T x + 0 T y s. t. Ex + Iy h 1T y 0 x0
(5.2)
where,
I 1 0 y
Identity matrix Unit vector Zero vector Slack vector on constraints in the optimal problem (5.1)
12
In order to use the Benders decomposition method, the original problem is expressed by using slack variables y1 and y 2 .
Min 5 x1 + 8 x 2 + 0 y1 + 0 y 2 S .t. 3x1 + 4 x 2 + y1 8 x1 + 7 x 2 2 + y2 6 y1 + y 2 0
x1 , x 2 {0 or 1}, y1 , y 2 0
c T = [5 8]
0 0= 0
3 4 1 0 1 2 E= I= 1= h= 8 7 0 1 1 6
1 = 0, x 2 = 0 . lower = 0 when x The lower bound optimal solution of the original problem is z
Form SP1.
Min 0 y1 + 0 y 2 S .t. 1 4 x 2 y1 2 3 x 1 7 x 2 y 2 6 8x y1 + y 2 0 y1 , y 2 0
Solve SP2.
1 4 x 2 )u1 + (6 8 x 1 7 x 2 )u 2 + 0 * u 3 Max (2 3x S .t. u1 u3 0 u 2 u3 0 u1 , u 2 , u 3 0
13
Max 2u1 + 6u 2 1 = 0, x 2 = 0 x S .t. u1 u3 0 u 2 u3 0 u1 , u 2 , u 3 0 1 = 0, x 2 = 0 given We find that SP2 is unbound. This means that SP1 is infeasible with x in the initial master problem. Therefore, we introduce a slack variable s into the
1 = 0, x 2 = 0 is as follows. constraint y1 + y 2 0 in SP1. The new SP1 for x Min 0 y1 + 0 y 2 + 1000 s S .t. y1 2 y2 6 y1 + y 2 s 0 y1 , y 2 0, s 0 1 = 2, y 2 = 6, s = 8 and u 1 = 1*10 3 , u 2 = 1*10 3 , u 3 = 1*10 3 . Two extreme The solutions are y 1 = 1, u 2 = 1, u 3 = 1 and we form a rays are equivalent if one is a multiple of the other. So, u Benders cut as (2 3x1 4 x 2 ) *1 + (6 8 x1 7 x 2 ) *1 0 for MP2. u1 u2 u3
Min z S .t. z 5 x1 + 8 x 2 x1 , x 2 {0 or 1} lower = 5 with The new lower bound optimal solution of the original problem is z 1 = 1, x 2 = 0 . Solve SP2 based on the given solution above: x 11x1 + 11x 2 8
14
Max u1 2u 2 1 = 1, x 2 = 0 x S .t. u1 u3 0 u 2 u3 0 u1 , u 2 , u 3 0
optimal solution is 0. Thus, the upper bound optimal solution of the 1 + 8 x 2 + 0 = 5 + 0 = 5 . The iterative process will stop as upper = 5 x is z
6. Two Different Forms of Benders Cuts Form 1: As discussed in section 4, Benders cuts are typically expressed as
z d T y + (h Fy) T u p i , i = 1, K , n p
(h Fy )T u ir
0, i = 1, K , n r
Form 2: Let us consider the optimal problem with the standard Benders decomposition form as follows.
Minimize z = c T x + d T y s. t. Ay b Ex + Fy h x 0, y S
(6.1)
(6.2)
(6.3)
Where and are dual multiplier vectors associated with the constraints in (6.3).
15
Then SP2 is
T Minimize h T + y St. ET c FT + I = 0 0, un lim ited
T +y T T ) of the dual If (6.4) has a bounded solution h T p p p at the extreme point ( p
(6.4)
feasible region, according to the discussion in section 4, we form a new constraint T T T T + T p)+ p ) . Here z dTy + hT (y y p p y which is equivalent to z d y + (h p + y
T +y ) . So, the hT p p in the added constraint is the optimal solution of SP1, w(y
T ) + p )T . (y y constraint is z lower d T y + w(y
However, if (6.4) has an unbounded solution, the feasibility check subproblem (6.5) will T T T be used in SP1 (6.3) to get an extreme ray ( r r ) of its dual subproblem.
Minimize 1 T s St. Ex + Fy + Is h Iy =y x 0, s 0
(6.5)
where, Identity matrix Unit vector Slack vector on constraints in the optimal problem (5.1) T + r Thus, we have a new constraint h T y 0 for the master problem. Similarly, it is r T T T T +y r )+ r (y y ) 0 . Because of the term h T equal to (h r + y r r in the constraint is the optimal solution of (6.5), v(y ) , the constraint is also rewritten as
T ) + r )T 0 . v(y (y y
I 1 s
Accordingly the cuts are as follows: the first one is the feasibility cut and the second one is the infeasibility cut.
T ) i + pi ), i = 1, K , n 'p z d T y + w(y (y y T ' ) i + ri ) 0, i = 1, K , n r v(y (y y
where,
) w(y ) v(y y
Optimal solution of SP1 Optimal solution of feasibility check subproblem Solution for the master problem in SP1 Dual multiplier vector for y = y
16
Based on the above analysis, Form 2 of Benders cut is equivalent to the standard Benders T ) + p ) T indicates that we can decrease the (y y cuts Form 1. The Benders cut z d T y + w(y
to a new value. The dual objective value of the original problem by changing y from y multiplier vector p represents the incremental change in the optimal objective.
T to a new ) + r ) T 0 indicates that we can switch y (y y Similarly, the Benders cut v(y in the value to eliminate the total violation on constraints in SP1 based on a given y previous master problem. The dual multiplier vector r represents the incremental change in the total violation.
Example 6.1 In this example, we will use Benders cuts form 2 to resolve the Example 5.2.
Min x1 + 3 x2 + y1 + 4 y2 S.t. -2 x1 x2 + y1 2 y2 1 2 x1 + 2 x2 y1 + 3 y2 1 x1, x2 0 , y1, y2 0
Since we had,
Minimize z = c T x + d T y s. t. Ay b Ex + Fy h x 0, y S
c T = [1 3]
d T = [1 4]
2 1 E= 2 2
1 2 F= 1 3
1 h= 1
1 = 0, y 2 = 0, to get y
lower = 0 . z
1 = 0, y 2 = 0 , we use the following feasibility check Because SP2 is unbounded for y subproblem to get an extreme ray in the recession cone of SP2.
17
Max s1 + s 2 St. 2 x1 x 2 + y1 2 y 2 + s1 2 x1 + 2 x 2 y1 + 3 y 2 1 1 2 1 2 + s2 1 1 y1 = y 2 y2 = y
x1 , x 2 0 , y1 , y 2 0 , s1 , s 2 0 = 1.0, = 0.5, 1 = 0.5, 2 = 0.5 . The optimal solution is 1.5 and its dual multipliers are 1 2 1 ( y1 y 1 ) + 2 ( y2 y 2 ) 0 y1 y 2 3 for y 1 = 0, The Benders cut is 1.5 + 2 =0. y
The new lower bound optimal solution of the original problem is 1 = 3, y 2 = 0 . for y The primal subproblem SP1,
Min x1 + 3x 2 St. 2 x1 x 2 + y1 2 y 2 1 2 x1 + 2 x 2 y1 + 3 y 2 1 1 y1 = y 2 y2 = y x1 , x 2 0, y1 , y 2 0 1 2 1 2
lower = 3 z
Note that SP1 is feasible. Its optimal solution is 6 and its dual multipliers are = 2.0, = 2.5, 1 = 0.5, 2 = 3.5 . 1 2
1 ( y1 y 1 ) + 2 ( y2 y 2 ) 0 . So z 4.5 + 1.5 y1 + 0.5 y 2 . The Benders cut is z y1 + 4 y 2 + 6 + 1 + 4 y 2 + 6 = 3+ 6 = 9 . upper = y The upper bound optimal solution of the original problem is z
upper = 9 > z lower = 3 , we will continue. Because z
18
lower = 9 when The new lower bound optimal solution of the original problem is z 1 = 3, y 2 = 0 . y
Solve SP1,
Min x1 + 3x 2 St. 2 x1 x 2 + y1 2 y 2 1 2 x1 + 2 x 2 y1 + 3 y 2 1 1 y1 = y 2 y2 = y x1 , x 2 0, y1 , y 2 0 1 + 4 y 2 + 6 = 3 + 6 = 9 . Because z upper = y upper = z lower = 9 , we The solution is 6. Then z terminate the program. 1 2 1 2
7. Expanded Model of Benders Decomposition In the section 4, the basic model of Benders decomposition involving a master problem and one subproblem was introduced. However, in practice, a master problem and several subproblems could be considered. If the original optimization problem is decomposed into a master problem and n subproblems satisfying the following form.
T T T Minimize z = c 1 x1 + c T 2 x 2 + L + cn xn + d y
s. t.
E1 x1 E2x2
M O
Ay b + F1 y h 1
+ F2 y h 2
(7.1)
E n x n + Fn y h n
x 1 , x 2 , K , x n 0, y S
(7.2)
Primal subproblem i
Minimize c T i xi s.t. E i x i h i Fy xi 0
(7.3)
19
Master problem with Benders cuts In the following we have listed the optimality and feasibility cuts which will be used according to the SP1 solution.
Minimize z s. t.
p p T T z d T y + (h 1 F1 y) T u 1 p i + (h 2 F2 y) u 2 i + L + (h n Fn y) u n i , i = 1, K , n p
Ay b
(h 1 F1 y )T u 1 r i 0 , i = 1,K ,n r (h 2 F2 y )T u 2 r i 0 , i = 1,K ,n r (h n Fn y )T u n r i
y S M 0, i = 1,K ,n r
(7.4)
The solution procedure is the same as that of section 5. 8. Conclusions Benders decomposition is a very useful tool for solving the large-scale optimization problem. The interactions between master problem and subproblems are represented by the corresponding Benders cuts. Meanwhile, Benders decomposition makes it possible to speed up the solution to the large-scale optimization problem by using the parallel calculation.
20