Advanced LP models column generation
min max
min max OK OK ?
Bin packing example bins of size K items of different types items of type i have size s(i) and there are n(i) of them problem put all items into the bins minimizing the number of bins
+ = 3 1 2 2 4 4 2 + = 4 feasible patterns + = 8
x 2 1 3 4 5 6 7 + = 3 8 4 + 1 1 2 4 3 x 2 1 3 4 5 6 7
min S x i ........ 1 2 1 3 ........ x = 2 2 4 3 4 ........ 4 4 4 2 8 x integer
min max OK OK ?
1 2 4 3 ............ < 1 .. ........ 1 2 1 y 2 3 1 ........ 2 2 4 3 ........ 4 4 4 2
y < + 1 2 2 y < + a y < + a s < K + max a y + < 1 3 1 < + 1 2 2 y 3 1 < + a 2 3 1 y < + for all feasible patterns a 2 3 1 s < K + max a 2 3 1 y + < 1
otherwise add pattern maximizing knapsack 2 3 1 y + a 2 3 1 s < K + a 1 a 2 a 3 integer knapsack ! if max 1 optimality ! < otherwise add pattern maximizing knapsack
example bin capacity = 20 3 types: type 1: size = 7; quantity = 50 type 2: size = 5; quantity =100 type 3: size = 3; quantity = 70 25 24 4 53 bins x starting patterns 2 0 2 0 4 0 y= ( 0 1/4 1/2 ) generated patterns 0 0 6 y= ( 1/3 1/4 1/6 ) 0 1 5 y= ( .35 .25 .15 )
however, change quantities to 52 97 71 solution is : x = 26 1 x = 23.3 x = 0 x = 3.8 2 3 4 53.1 how to get an integer solution?
V(j)=optimal value for a knapsack of capacity j max a 2 3 1 y + < 1 a 2 3 1 s < K + a 1 a 2 a 3 integer V(j)=optimal value for a knapsack of capacity j V(j) = max { V(j - s(i)) + y(i) : i= 1, ... , n} V(j) > V(j - s(i)) + y(i) i= 1, ... , n; j=1,...,K V(K) < 1 V(j) >
min max
max S b(i) y(i) V(j) > V(j - s(i)) + y(i) i= 1, ... , n; j=1,...,K V(K) < 1 V(j) > however this is the dual problem we need the patterns which are in the primal so let’s make the dual of the above problem
It turns out that the dual is a flow problem nodes capacity values (0,1,2,...,K) arcs each possible filling from capacity j to capacity j+s(i) dual variables flows on arcs
4 29 24 25 1 2 3 4 5 6 7 8 9 10 11 12 25+4 13 14 15 16 17 18 19 20
4 25 times the pattern 2 0 2 25 1 2 3 4 24 4 5 4 6 25 7 8 24 9 10 11 12 25+4 13 29 4 14 15 24 25+4 16 17 18 24 19 20
4 24 times the pattern 0 4 0 1 25 2 24 3 4 4 5 4 6 7 25 8 24 9 10 11 12 25+4 13 29 4 14 15 24 16 25+4 17 18 24 19 20
4 4 times the pattern 0 1 5 1 25 2 4 3 24 4 5 4 6 7 25 8 24 9 10 11 12 25+4 4 13 29 14 15 24 25+4 16 17 18 24 19 20