Introduction to Bin Packing Problems

Similar documents
Travelling Salesman Problem

Combinatorial optimization problems

3.10 Column generation method

5 Integer Linear Programming (ILP) E. Amaldi Foundations of Operations Research Politecnico di Milano 1

ILP Formulations for the Lazy Bureaucrat Problem

3.10 Column generation method

Lecture 8: Column Generation

3.4 Relaxations and bounds

Column Generation. MTech Seminar Report. Soumitra Pal Roll No: under the guidance of

RO: Exercices Mixed Integer Programming

IE418 Integer Programming

Approximation Algorithms

Introduction to optimization and operations research

Discrete (and Continuous) Optimization Solutions of Exercises 2 WI4 131

a 1 a 2 a 3 a 4 v i c i c(a 1, a 3 ) = 3

The Maximum Flow Problem with Disjunctive Constraints

Lecture 11 October 7, 2013

Modeling with Integer Programming

15.081J/6.251J Introduction to Mathematical Programming. Lecture 24: Discrete Optimization

Chapter 3: Discrete Optimization Integer Programming

Chapter 3: Discrete Optimization Integer Programming

What is an integer program? Modelling with Integer Variables. Mixed Integer Program. Let us start with a linear program: max cx s.t.

Optimisation and Operations Research

Decomposition Methods for Integer Programming

Interior-Point versus Simplex methods for Integer Programming Branch-and-Bound

Outline. Outline. Outline DMP204 SCHEDULING, TIMETABLING AND ROUTING. 1. Scheduling CPM/PERT Resource Constrained Project Scheduling Model

Lecture 9: Dantzig-Wolfe Decomposition

4. How to prove a problem is NPC

Exercises NP-completeness

Resource Constrained Project Scheduling Linear and Integer Programming (1)

COMP Analysis of Algorithms & Data Structures

A Node-Flow Model for 1D Stock Cutting: Robust Branch-Cut-and-Price

1 Column Generation and the Cutting Stock Problem

Decision Diagrams for Discrete Optimization

Lecture 8: Column Generation

Discrete (and Continuous) Optimization WI4 131

MVE165/MMG630, Applied Optimization Lecture 6 Integer linear programming: models and applications; complexity. Ann-Brith Strömberg

3.10 Lagrangian relaxation

Vehicle Routing and MIP

Large-scale optimization and decomposition methods: outline. Column Generation and Cutting Plane methods: a unified view

Recoverable Robustness in Scheduling Problems

Technische Universität München, Zentrum Mathematik Lehrstuhl für Angewandte Geometrie und Diskrete Mathematik. Combinatorial Optimization (MA 4502)

21. Set cover and TSP

Computational Integer Programming. Lecture 2: Modeling and Formulation. Dr. Ted Ralphs

arxiv: v1 [math.oc] 3 Jan 2019

Integer program reformulation for robust branch-and-cut-and-price

Outline. Relaxation. Outline DMP204 SCHEDULING, TIMETABLING AND ROUTING. 1. Lagrangian Relaxation. Lecture 12 Single Machine Models, Column Generation

Approximation complexity of min-max (regret) versions of shortest path, spanning tree, and knapsack

Extended Formulations, Lagrangian Relaxation, & Column Generation: tackling large scale applications

Knapsack. Bag/knapsack of integer capacity B n items item i has size s i and profit/weight w i

Spring 2018 IE 102. Operations Research and Mathematical Programming Part 2

Exact and Heuristic Algorithms for the Symmetric and Asymmetric Vehicle Routing Problem with Backhauls

8 Knapsack Problem 8.1 (Knapsack)

A BRANCH&BOUND ALGORITHM FOR SOLVING ONE-DIMENSIONAL CUTTING STOCK PROBLEMS EXACTLY

Discrete (and Continuous) Optimization WI4 131

Cutting Plane Separators in SCIP

Lagrangian Relaxation in MIP

4. Duality Duality 4.1 Duality of LPs and the duality theorem. min c T x x R n, c R n. s.t. ai Tx = b i i M a i R n

Complexity of the min-max and min-max regret assignment problems

2001 Dennis L. Bricker Dept. of Industrial Engineering The University of Iowa. Reducing dimensionality of DP page 1

This means that we can assume each list ) is

Graph. Supply Vertices and Demand Vertices. Supply Vertices. Demand Vertices

Computational Complexity. IE 496 Lecture 6. Dr. Ted Ralphs

1. Introduction Recap

On Two Class-Constrained Versions of the Multiple Knapsack Problem

- Well-characterized problems, min-max relations, approximate certificates. - LP problems in the standard form, primal and dual linear programs

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P

Column Generation I. Teo Chung-Piaw (NUS)

Integer Program Reformulation for Robust. Branch-and-Cut-and-Price Algorithms

Multicommodity Flows and Column Generation

Notes on Complexity of the Simple Assembly Line Balancing Problem

Now just show p k+1 small vs opt. Some machine gets k=m jobs of size at least p k+1 Can also think of it as a family of (1 + )-approximation algorithm

Operations Research Lecture 6: Integer Programming

Improving Branch-And-Price Algorithms For Solving One Dimensional Cutting Stock Problem

Analysis of Algorithms. Unit 5 - Intractable Problems

COT 6936: Topics in Algorithms! Giri Narasimhan. ECS 254A / EC 2443; Phone: x3748

COSC 341: Lecture 25 Coping with NP-hardness (2)

Reformulation and Decomposition of Integer Programs

Introduction column generation

Weighted Acyclic Di-Graph Partitioning by Balanced Disjoint Paths

Heuristics for Solving the Bin-Packing Problem with Conflicts

Column Generation for Extended Formulations

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

NP-Completeness. NP-Completeness 1

Duality of LPs and Applications

Branch-and-cut (and-price) for the chance constrained vehicle routing problem

Week Cuts, Branch & Bound, and Lagrangean Relaxation

Stochastic Decision Diagrams

Discrete Optimization 2010 Lecture 10 P, N P, and N PCompleteness

Algorithms. Outline! Approximation Algorithms. The class APX. The intelligence behind the hardware. ! Based on

Part III: Traveling salesman problems

Algorithms. NP -Complete Problems. Dong Kyue Kim Hanyang University

Integer Linear Programming (ILP)

The sharpest column: stabilizing column generation for the bin packing problem via a lexicographic pricer

Decomposition-based Methods for Large-scale Discrete Optimization p.1

The Off-line Group Seat Reservation Problem

Network Design and Game Theory Spring 2008 Lecture 6

Branching Rules for Minimum Congestion Multi- Commodity Flow Problems

Introduction to Mathematical Programming IE406. Lecture 21. Dr. Ted Ralphs

to work with) can be solved by solving their LP relaxations with the Simplex method I Cutting plane algorithms, e.g., Gomory s fractional cutting

Transcription:

Introduction to Bin Packing Problems Fabio Furini March 13, 2015

Outline Origins and applications Applications: Definition: Bin Packing Problem (BPP) Solution techniques for the BPP Heuristic Algorithms Compact MIP formulation Stronger MIP formulation Pseudo-polynomial MIP formulation Arc-flow Formulation Dyckhoff Formulation

Extended Formulations Branch-and-Price Algorithms Knapsack Problems (KP01) Set Partitioning Formulation for BPP Set Covering Formulation for BPP Column Generation Lagrangian Dual bound Branch and Price Algorithm Branching rule Fabio Furini Université Paris Dauphine LAMSADE 3/35

Origins and applications Fabio Furini Université Paris Dauphine LAMSADE 4/35

Applications: Consider the following problem: determining the smallest number of rolls of a fixed width that have to be cut in order to satisfy the demand of clients. filling up containers; loading trucks with weight capacity constraints; creating file backups; placing data on multiple disks; job scheduling. Fabio Furini Université Paris Dauphine LAMSADE 5/35

Definition: Bin Packing Problem (BPP) Fabio Furini Université Paris Dauphine LAMSADE 6/35

Given a positive integer number of bins m of capacity W and a list of n items of integer sizes w 1,..., w n (0 w i W ), the problem is to assign the items to the bins so that the capacity of the bins is not exceeded and the number of bins used is minimized Fabio Furini Université Paris Dauphine LAMSADE 7/35

Theorem (Garey and Johnson (1979)) The BPP is NP-Hard (reduce from PARTITION). BPP has several real-world applications such as: Fabio Furini Université Paris Dauphine LAMSADE 8/35

How difficult is the BPP in practice? Some NP-Hard problems can be solved to optimality for instances of reasonable size: TSP thousands of nodes (cutting planes) BPP up to 1000 items (Branch and Bound, Branch and Price) BPP and its variants are really difficult from the practical viewpoint. Fabio Furini Université Paris Dauphine LAMSADE 9/35

Solution techniques for the BPP Fabio Furini Université Paris Dauphine LAMSADE 10/35

Heuristic Algorithms First Fit Algorithm: pack the current item into the first nonempty bin in which it fits. If no such bin exists, pack the current item into an empty bin. Best Fit Algorithm: pack the current item into the nonempty bin of largest free space in which it fits. If no such bin exists, pack the current item into an empty bin. Fabio Furini Université Paris Dauphine LAMSADE 11/35

Compact MIP formulation Variables (i = 1,..., n h = 1,..., m): { { 1 item i goes to bin h 1 if bin h is used x h i = y h = 0 otherwise 0 otherwise m min y h (1) h=1 m x h i = 1 i = 1,..., n (2) h=1 n w ix h i W y h h = 1,..., m (3) i=1 x h i {0, 1} i = 1,..., n, h = 1,..., m (4) y h {0, 1} h = 1,..., m (5) Fabio Furini Université Paris Dauphine LAMSADE 12/35

Question 1: write the Model ((1),(5)) for the following example: 3 bins and 3 items, W = 4, w 1 = 1, w 2 = 3, w 3 = 4. Question 2: try to figure out the optimal solution value of its Linear Programming relaxation and a possible solution vector of the variable values. Question 3: Cutting Stock Problem try to extend the Model ((1),(5) in case each item has a demand of d i copies (i = 1,..., n) Fabio Furini Université Paris Dauphine LAMSADE 13/35

Model ((1),(5)) is a weak! The Linear Relax has a useless value of: LR = ni=1 w i W (6) y h = LR/m h = 1,..., m (7) x h i = 1/m i = 1,..., n, h = 1,..., m (8) Huge symmetry!! for each integer solution of value k, there exist ( m k ) k! equivalent solutions. Fabio Furini Université Paris Dauphine LAMSADE 14/35

Stronger MIP formulation a feasible solution of value k (k < m) Variables (i = 1,..., n; min h=1,...,k h=1,...,k h = 1,..., k): y h (9) x h i = 1 i = 1,..., n (10) n w ix h i W y h h = 1,..., k (11) i=1 x h i y h i = 1,..., n, h = 1,..., k (12) x h i {0, 1} i = 1,..., n, h = 1,..., k (13) y h {0, 1} h = 1,..., k (14) Fabio Furini Université Paris Dauphine LAMSADE 15/35

Pseudo-polynomial MIP formulation Fabio Furini Université Paris Dauphine LAMSADE 16/35

Arc-flow Formulation Cutting pattern corresponds to a path in an acyclic directed graph G = (V, A), with V = 0, 1,..., W as its set of W + 1 vertices, which define positions in the stock sheet, and A = {(a, b) : 0 a < b W, b a = w i, i = 1,..., n} as its set of arcs. Minimum flow problem, where: variables ν ab correspond to the flow in arc (a, b), (item number of width b a placed at a units from the beginning of a bin variable φ corresponds to the total flow through the graph, and can be seen as the return flow from vertex W to vertex 0. Fabio Furini Université Paris Dauphine LAMSADE 17/35

min φ (a,b) A (c,c+w i ) A ν b a R + ν b a (a,b) A φ if b=0 νb a = 0 if b=1,...,w-1 φ if b=w (15) (16) ν c+w i c 1 i = 1,..., n (17) (a, b) A (18) Fabio Furini Université Paris Dauphine LAMSADE 18/35

Example: graph associated with an instance with bins of capacity W = 7 and items of sizes 5, 3, 2, respectively: Fabio Furini Université Paris Dauphine LAMSADE 19/35

Dyckhoff Formulation Residual Bins (RB): each time a bin of width W is cut in order to produce an item i of length w i, a residual bin of size W w i is obtained, which can be further used to produce additional items. m is the number of all the possible Residual Bins. Decision variables: 1 if item i is cut in residual bin z µ iz = 0 otherwise. Fabio Furini Université Paris Dauphine LAMSADE 20/35

1 if RB t results from cutting item type i from the RB z a izt = 0 otherwise. Fabio Furini Université Paris Dauphine LAMSADE 21/35

min n µ i0 (19) i=1 m µ iz 1 i = 1,..., n (20) z=0 m n n a izt µ iz µ it t = 1,..., m (21) z=1 i=1 i=1 µ iz R + i = 1,..., n z = 0,..., m (22) Fabio Furini Université Paris Dauphine LAMSADE 22/35

Extended Formulations Branch-and-Price Algorithms Fabio Furini Université Paris Dauphine LAMSADE 23/35

Knapsack Problems (KP01) Given: n items, with p j profit and w j weight of item j (j = 1,..., n) 1 container ( knapsack ) of capacity W select a subset of the items so that the sum of the profits is maximum and the sum of the weights does not exceed the capacity W. n N P-Hard problem, p j and w j integer, w j W, w j > W j=1 Fabio Furini Université Paris Dauphine LAMSADE 24/35

n max p i x i (23) i=1 n w i x i W (24) i=0 x i {0, 1} i = 1,..., n (25) Fabio Furini Université Paris Dauphine LAMSADE 25/35

Set Partitioning Formulation for BPP S = {s N : s is a KP 01 solution}. { 1 if KP01 s is in the solution x s = 0 otherwise min x s (26) s S x s = 1 i = 1,..., n (27) s S:i s x s {0, 1} s S (28) Fabio Furini Université Paris Dauphine LAMSADE 26/35

Set Covering Formulation for BPP min s S x s s S:i s (29) x s 1 i = 1,..., n (30) x s {0, 1} s S (31) S can be defined as the family of all maximal KP01 solutions. The LP of this formulation leads to tight lower bounds and avoids symmetry The number of maximal KP01 solutions is exponential in the number of items n (we need column generation and Branch-and-Price). Fabio Furini Université Paris Dauphine LAMSADE 27/35

Question 6: explicitly write the Set Partitioning and the Set Covering formulation of the following instance: bins of capacity W = 7 and items of sizes 5, 3, 2. Question 7: write the dual of these models and discuss how they change in case of having only a subset of the original variables Fabio Furini Université Paris Dauphine LAMSADE 28/35

Primal Dual min max n variables n constraints m constraints m variables constraint a i x b i variable u i 0 constraint a i x b i variable u i 0 constraint a i x = b i variable u i R variable x j 0 constraint a T j u c j variable x j 0 constraint a T j u c j variable x j R constraint a T j u = c j Fabio Furini Université Paris Dauphine LAMSADE 29/35

Column Generation min x s (32) s S s S:i s x s 1 i N (33) x s 0 s S (34) max π i (35) i N π i 1 s S (36) i s π i 0 i N (37) We solve the model with a subset S of the variables. Given an optimal solution (x,π ) of the restricted master problem, does it exist a set s S: i s π i > 1 (38) Fabio Furini Université Paris Dauphine LAMSADE 30/35

Lagrangian Dual bound i s π i > φ (33) i s π i φ = 1 LB = i N π i φ (35) Fabio Furini Université Paris Dauphine LAMSADE 31/35

Question 8: write a MIP model which allow the separation of the family of constraints (36) Question 9: write this MIP model for the following instance: bins of capacity W = 7 and items of sizes 5, 3, 2. Fabio Furini Université Paris Dauphine LAMSADE 32/35

Branch and Price Algorithm Column generation methods: necessary when the number of variables of a Linear Program is exponential Branch-and-Price Impose a subset of the variables 1 Solve the LP and get the current solution x, π 2 If some constraints in the Dual are violated by x, π, add the columns to the LP and go to 1 3 x is optimal and feasible for the LP (possibly fractional) Branch on a feasible disjunction for the problem and go to 1 Fabio Furini Université Paris Dauphine LAMSADE 33/35

Branching rule Basic idea (Ryan/Foster branching): at each node of the search tree we select two items i and j N. Then: 1) Same bin create a super item merging i and j, 2) Different bins create an extra constraints: x i + x j 1 In both cases 1) and 2) the resulting pricing problem is still a KP01, with 1) a super item forced to be packed together 2) an extra constraints not allowed to be packed together Fabio Furini Université Paris Dauphine LAMSADE 34/35

Questions?