EMIS 8373: Integer Programming
description
Transcript of EMIS 8373: Integer Programming
EMIS 8373: Integer Programming
Column Generationupdated 18 April 2005
Example 1: Adapted from
“Optimal Placement of ADD/DROP Multiplexers: Heuristic and Exact
Algorithms” by
Alain Sutter, Francis Vanderbeck, Laurence Wolsey
Operations Research, Vol. 46 (5), pp. 719-728, 1998
3
Formulation• Sets
– N is the set of nodes in the demand graph– E N N is the set of edges in the demand graph– M is a set of candidate SONET rings to may be used
to construct the network
• Parameters– de is weight of edge e E – b is the ring capacity– aej = 1 if demand e can be routed on ring j– cj is cost of ring j (the number of ADMs required)
4
Formulation Continued
• Decision Variables – zj = 1 if ring j is select, and 0, otherwise.
• BIP Formulation:
• Constraint set (1) ensures that each demand is assigned to exactly one of the candidate rings.
– Views the problem as edge partitioning
)2(.1,0
)1(,,1s.t.
min
Mj
Ee
zza
zc
j
Mjjej
Mjjj
5
Example Demand Graph and Candidate Set with b = 18
3
21
4 5
3 2
3
34
2
8 2
1. {(1, 2)} c1 = 22. {(1, 3)} c2 = 23. {(1, 4)} c3 = 24. {(2, 3)} c4 = 25. {(2, 5)} c5 = 26. {(3, 4)} c6 = 27. {(3, 5)} c7= 28. {(4, 5)} c8 = 29. {(1, 2), (1, 3), (2, 3)}
c9 = 310. {(1, 2), (1, 3), (1, 4),
(2, 3), (3, 5), (4, 5)} c10 = 5
Optimal Solution:z5 = z6 = z10 = 1cost = 9 ADMs
6
Comments• The best solution for the given demand graph uses two
rings and eight ADMs:1. {(1, 2), (2, 3), (2, 5), (3, 5)} 2. {(1, 3), (1, 4), (3, 4), (4, 5)}
• The edge-partitioning formulation cannot find this solution unless these candidate rings are given as part of the input.
• Let BIP(M) be the edge-partitioning formulation for a given candidate set M.
– The exact formulation is BIP(M*) where M* is the set of all feasible candidate rings.
– For a given demand graph |M*| = O(2 |E|)
7
Matrix Representation of BIP(M)
)5,4(
)5,3(
)4,3(
)5,2(
)3,2(
)4,1(
)3,1(
)2,1(
1010000000
1001000000
0000100000
0000010000
1100001000
1000000100
1100000010
11000000015322222222
A
c
BIP(M*) could have up to 28 –1 = 255 columns depending on b.
8
LP Relaxation of BIP(M)
.
,,1s.t.
min LP(M)
0 Mj
Ee
zza
zc
j
Mjjej
Mjjj
.,s.t.
max
MjEe
jeje
Eee
ca
Dual Problem
9
Additional Notation
• For a given basic feasible solution (BFS) for LP(M) – Let B denote the basis matrix– Let Aj denote column j of the constraint matrix A– Let cB denote the vector of objective coefficients of the
basic variables– Let denote the vector of corresponding dual variables – Recall that the reduced cost for variable zj is given by the
formula cj- cB B-1 Aj = cj- Aj.- B is optimal if all variables have a non-negative reduced
cost.
10
Reduced Cost Example 1
Suppose z1,z2, …, z8 are the basic variables.
)5,4(
)5,3(
)4,3(
)5,2(
)3,2(
)4,1(
)3,1(
)2,1(
10000000
01000000
00100000
00010000
00001000
00000100
00000010
0000000122222222
B
cB
)5,4(
)5,3(
)4,3(
)5,2(
)3,2(
)4,1(
)3,1(
)2,1(
0
0
0
0
1
0
1
1
3
9
9
A
c
3639
1
9
ABcc B
The current BFS uses 16 ADMs.Bringing ring 9 into the basis reduces this to 16 – 3 = 13
11
Reduced Cost Example 1
• Suppose z1,z2, …, z8 are the basic variables• Each demand assigned to its own ring• Using ring 9 to cover three demands saves 3 ADMs.
)5,4(
)5,3(
)4,3(
)5,2(
)3,2(
)4,1(
)3,1(
)2,1(
0
0
0
0
1
0
1
1
3
9
9
A
c
The current BFS uses 16 ADMs.Bringing ring 9 into the basis reduces this to 16 – 3 = 13
3639
1
9
ABcc B
12
Reduced Cost Example 2
Suppose z1,z2, …, z8 are the basic variables.
)5,4(
)5,3(
)4,3(
)5,2(
)3,2(
)4,1(
)3,1(
)2,1(
10000000
01000000
00100000
00010000
00001000
00000100
00000010
0000000122222222
B
cB
)5,4(
)5,3(
)4,3(
)5,2(
)3,2(
)4,1(
)3,1(
)2,1(
1
1
0
0
1
1
1
1
5
10
10
A
c
510510
1
10
ABcc B
The current BFS uses 16 ADMs.Bringing ring 10 into the basis reduces this to 16 – 5 = 11
13
A Column-Generation Heuristic
1. Solve restricted LP master problem LP(M) and let B be the optimal basis matrix
• LP(M*) is referred to as the linear programming master problem.
2. Look for a ring (column) j that is not in M, but would have a negative reduced cost if it were added to M
• This is referred as as solving the pricing problem.
3. If j is found then add j to M and goto step 1.4. Solve BIP(M)
• At this point an optimal solution to LP(M) is also an optimal solution to LP(M*).
14
Ni
ik xc
yyyyyyyy
A k
45
35
34
25
23
14
13
12
Feasible Rings with Negative Reduced Costs
Ejiij
Niikk yxAc ij
),(
Reduced cost for the new ring:
Ni Eji
iji yx ij),(
0
We want to find a ring with negative reduced cost
15
Generating Feasible Rings
• Let yij = 1 if the new ring contains edge (i,j), and 0, otherwise
• Let xi = 1 if the new ring requires an ADM at node i
• For the x’s and y’s to represent a feasible ring we need
.),(
,),(
,),(
Eji
Eji
xyxy
byd
jij
iij
Ejiijij
16
Ring Generation BIP
.),(
,),(
,s.t.
min
),(
),(
Eji
Eji
b
ij
xyxy
yd
yx
jij
iij
Ejiijij
Ni Ejiiji
• This problem is NP-hard, but in practical terms is much easier to solve than BIP(M*). • If the optimal value of the objective function is zero then the optimal basis for LP(M) is optimal for L(M*).
17
Column Generation Flow Chart
Solve LP(M)
Restore Integrality Constraints and Solve BIP(M)
New column found ?
Add column to M
Yes
No
Solve the Pricing Problem
18
Restricted LP Master Problem (LP(M)) for Iteration 1
min2z1+2z2+2z3+2z4+2z5+2z6+2z7+2z8+3z9+5z10s.tz1 + z9 + z10 = 1 (demand between 1 and 2)z2 + z9 + z10 = 1 (demand between 1 and 3)z3 + z10 = 1 (demand between 1 and 4)z4 + z9 + z10 = 1 (demand between 2 and 3)z5 = 1 (demand between 2 and 5)z6 = 1 (demand between 3 and 4)z7 + z10 = 1 (demand between 3 and 5)z8 + z10 = 1 (demand between 4 and 5)0 · zi · 1
19
Optimal Solution for LP(M): Iteration 1
910001100002
2
2
2
2
2
2
5
1010000000
1001000000
0000100000
0000010000
1100001000
1000000100
1100000010
11000000015322222222
45
35
34
25
23
14
13
12
czz
A
c
20
Pricing Problem for Iteration 1
1822832433
22222225
4535342523141312
4535342523141312
5
1
s.t.
min
yyyyyyyy
yyyyyyyyxi
i
,),(
,),(
Eji
Eji
xyxy
jij
iij
,1,0yij
.1,0xi
Optimal Solution:
Add ring 11 = {(1,3), (1, 4), (2, 3), (2, 5), (3, 5), (4,5)}
1453525231413
yyyyyy1
54321 xxxxx
Objective function value = -7
21
Restricted LP Master Problem (LP(M)) for Iteration 2
min2z1+2z2+2z3+2z4+2z5+2z6+2z7+2z8+3z9+5z10+5z11s.tz1 + z9 + z10 = 1 (demand between 1 and 2)z2 + z9 + z10 + z11 = 1 (demand between 1 and 3)z3 + z10 + z11 = 1 (demand between 1 and 4)z4 + z9 + z10 + z11 = 1 (demand between 2 and 3)z5 + z11 = 1 (demand between 2 and 5)z6 = 1 (demand between 3 and 4)z7 + z10 + z11 = 1 (demand between 3 and 5)z8 + z10 + z11 = 1 (demand between 4 and 5)0 · zi · 1
22
Optimal Solution for LP(M): Iteration 2
9010001100002
2
2
2
2
2
5
2
11010000000
11001000000
00000100000
10000010000
11100001000
11000000100
11100000010
0110000000155322222222
45
35
34
25
23
14
13
12
czz
A
c
23
Pricing Problem for Iteration 2
1822832433
22222252
4535342523141312
4535342523141312
5
1
s.t.
min
yyyyyyyy
yyyyyyyyxi
i
,),(
,),(
Eji
Eji
xyxy
jij
iij
,1,0yij
.1,0xi
Optimal Solution:
Add ring 12 = {(1,2), (1, 4), (2, 3), (2, 5), (3, 5), (4,5)}
1453525231412
yyyyyy1
54321 xxxxx
Objective function value = -7
24
Restricted LP Master Problem (LP(M)) for Iteration 3
min2z1+2z2+2z3+2z4+2z5+2z6+2z7+2z8+3z9+5z10+5z11+5z12s.tz1 + z9 + z10 + x12 = 1 (demandbetween1and2)z2 + z9 + z10 + z11 = 1 (demandbetween1and3)z3 + z10 + z11 + x12 = 1 (demandbetween1and4)z4 + z9 + z10 + z11 + x12 = 1 (demandbetween2and3)z5 + z11 + x12 = 1 (demandbetween2and5)z6 = 1 (demandbetween3and4)z7 + z10 + z11 + x12 = 1 (demandbetween3and5)z8 + z10 + z11 + x12 = 1 (demandbetween4and5)0· zi · 1
25
Optimal Solution for LP(M): Iteration 3
90010001100002
2
2
2
1
2
2
2
111010000000
111001000000
000000100000
110000010000
111100001000
111000000100
011100000010
101100000001555322222222
45
35
34
25
23
14
13
12
czz
A
c
26
Pricing Problem for Iteration 3
1822832433
2222222
4535342523141312
4535342523141312
5
1
s.t.
min
yyyyyyyy
yyyyyyyyxi
i
,),(
,),(
Eji
Eji
xyxy
jij
iij
,1,0yij
.1,0xi
Optimal Solution:
14535342513
yyyyy1
54321 xxxxx
Add ring 13 = {(1, 3), (2, 5), (3, 4), (3, 5), (4,5)}
Objective function value = -5
27
Restricted LP Master Problem (LP(M)) for Iteration 4
min2z1+2z2+2z3+2z4+2z5+2z6+2z7+2z8+3z9+5z10+5z11+5z12+5z13s.tz1 + z9 + z10 + x12 = 1 (demand between 1 and 2)z2 + z9 + z10 + z11 + x13 = 1 (demand between 1 and 3)z3 + z10 + z11 + x12 = 1 (demand between 1 and 4)z4 + z9 + z10 + z11 + x12 = 1 (demand between 2 and 3)z5 + z11 + x12 + x13 = 1 (demand between 2 and 5)z6 + x13 = 1 (demand between 3 and 4)z7 + z10 + z11 + x12 + x13 = 1 (demand between 3 and 5)z8 + z10 + z11 + x12 + x13 = 1 (demand between 4 and 5)0 · zi · 1
28
Optimal Solution for LP(M): Iteration 4
5.82
1
2
100
2
100
2
100
2
100
2
5.2
2
2
0
2
5.1
5.1
1111010000000
1111001000000
1000000100000
1110000010000
0111100001000
0111000000100
1011100000010
01011000000015555322222222
45
35
34
25
23
14
13
12
czz
A
c
29
Comments
• Repeat until optimal solution to the pricing problem has objective function value zero.
• In many cases, the pricing problem is NP-hard.• There is no guarantee that the column-generation
procedure will generate all of the columns that are selected in the optimal solution to BIP(M*)– A Branch-and-Price procedure does column
generation at each node of the branch-and-bound tree• The extra constraints added by branching usually complicate
the pricing the problem.