
Lecture 10. The Bin Packing Problem The one dimensional bin packing problem is defined as follows. Given a set 1, … , of items and theirs weights ∈0,1, ∈. We wish to partition the set into minimal number of subsets ,,… , in such a way that 1, 1 . The sets we will call bins. In other words, we wish to pack all items in a minimal number of bins. It is NP‐hard problem in the strong sense. Lecture 10 1 Mathematical Model Decision variables: 1 if bin is used 1 if item is in bin ; 0 otherwise 0 otherwise min s.t. ,1,…,; 1, 1, … , ; ,0,1, , 1, … , . Can we find the optimal solution for the linear programming relaxation in polynomial time? Lecture 10 2 Bad News • There is much symmetry in the model. • The problem is hard to approximate. Theorem 1. The existence of a polynomial time ‐approximation algorithm for any positive ε implies P = NP. Proof. Let us consider the following NP‐complete problem. Given positive numbers ,…,. Is it possible to partition this set into two subsets , in such a way that We put and apply our ‐ approximation algorithm. If we get 2 bins, then answer is Yes, otherwise No. It is exact answer! Lecture 10 3 Strong Heuristic (FFD) Rank the items by the weights: ≥ ≥ … ≥ and apply the First Fit strategy: − put the first item in the first bin; − at the step , we try to put item into the used bins and, if it is not possible, we put item into a new bin. ≤ 11 4 Theorem 2. 9 for all and there exist some instances for the bin packing problem with ≥ 11 . 9 Lecture 10 4 , 1 6 Hard Example 2, 6 12 1, … , 30 , 12 18 2, 18 30 ¼ – 2ε ¼ – 2ε ¼ ε ¼ – 2ε ¼ 2ε ¼ ε ¼ –2ε ¼ 2ε ¼ ε ¼ –2ε ½ ε ½ ε ¼ –2ε ¼ 2ε ¼ ε ¼ –2ε 6 3 6m 2m 3m 9 FFD(L) = 11m Lecture 10 5 Huge Reformulation Given 1,…, is the set of items; 0 is the weight of item ; 0, integer, is the number of identical items is the number of identical items in packing pattern . Find a partition of all items into a minimal number of bins. Variables: 0, integer, is the number of bins for the pattern min s.t. ,; 0, integer, . is the set of all possible patterns. Lecture 10 6 LP‐Based Heuristic Solve the linear programming relaxation min s.t. ,; 0, . Put , . It is a feasible solution with deviation from the optimum at most ∑ ∑ where is the optimal solution for the LP model. Can we solve LP? Lecture 10 7 The Column Generation Method Let us consider a subset ′⊂ of patterns and assume that the following subproblem min s.t. , ; ≥ 0, ∈ ; has at least one feasible solution. Denote by the optimal solution to this subproblem. Lecture 10 8 The Dual Problem max 1, ; 0, . Denote by 0 its optimal solution. If 1, for \ ; (∗) then , ; 0, \ is the optimal solution for the LP problem. Lecture 10 9 How to Check (∗)? Let us consider the following knapsack problem: max s.t. (capacity of bin) 1; 0, integer, . If 1 then (∗) is satisfied. If 1 then we have got a new pattern and include it in . Lecture 10 10 The Framework of the Method 1. Select an initial subset . 2. Solve the subproblem for and its dual one, get , . 3. Solve the knapsack problem for and compute . 4. If 1 then STOP. 5. Include new pattern : ,, into subset and goto 2. Surprise: As a rule, solution , is optimal for the bin packing problem. If it is not true, we have at most one additional bin only! Lecture 10 11 Two‐Dimensional Packing Problem Given: rectangles with size × , 1, … , . Find: a packing of the rectangles into a rectangle area with minimal square. Rotations are forbidden × → min 6 2 5 It is guillotine solution. 1 3 4 Lecture 10 12 The Strip Packing Problem Дано: rectangles with size ×,, and large strip with width . Find: a packing of rectangles into the strip with minimal length. For 1 we have 2 5 one‐dimentional 4 bin packing problem 1 (NP‐hard) 3 Hometask. Design a linear integer programming model for the strip packing problem (with and without 90° rotations). Lecture 10 13 The Two‐Dimensional Knapsack Problem Given: rectangles with size × , profit for each rectangle, and the size of a vehicle × . Find: a subset of rectangles with maximal total profit which can be packed into the vehicle. For , we have 5 6 4 the classical knapsack 9 7 problem 10 1 3 2 8 Hometask. Design a linear integer programming model for the two‐dimensional knapsack problem. Lecture 10 14 The Two‐Dimensional Bin Packing Problem Given: rectangles with size × and the size of a vehicle × . Find: a packing all rectangles into the minimal number of vehicles. 4 6 7 3 – 1 5 1 2 . Hometask. Design LP‐based heuristic for the two‐dimensional bin packing problem. Lecture 10 15 .
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages15 Page
-
File Size-