Lecture 23 Branch-and-Bound Algorithm. November 3, 2009

Similar documents
Network Flows. 6. Lagrangian Relaxation. Programming. Fall 2010 Instructor: Dr. Masoud Yaghini

AM 121: Intro to Optimization! Models and Methods! Fall 2018!

Decision Procedures An Algorithmic Point of View

Lecture 14 Transportation Algorithm. October 9, 2009

Gestion de la production. Book: Linear Programming, Vasek Chvatal, McGill University, W.H. Freeman and Company, New York, USA

is called an integer programming (IP) problem. model is called a mixed integer programming (MIP)

Math Models of OR: Branch-and-Bound

Introduction to Integer Linear Programming

Introduction to Integer Programming

Integer Programming. Wolfram Wiesemann. December 6, 2007

Integer programming: an introduction. Alessandro Astolfi

Linear and Integer Programming - ideas

where X is the feasible region, i.e., the set of the feasible solutions.

Lecture 22 Integer Linear Programming Prototype Examples. November 2, 2009

Section Notes 9. Midterm 2 Review. Applied Math / Engineering Sciences 121. Week of December 3, 2018

Operations Research Lecture 6: Integer Programming

INTEGER PROGRAMMING. In many problems the decision variables must have integer values.

Integer and Combinatorial Optimization: Introduction

SOLVING INTEGER LINEAR PROGRAMS. 1. Solving the LP relaxation. 2. How to deal with fractional solutions?

Integer Programming and Branch and Bound

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

Linear integer programming and its application

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

maxz = 3x 1 +4x 2 2x 1 +x 2 6 2x 1 +3x 2 9 x 1,x 2

Integer Linear Programming (ILP)

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

Travelling Salesman Problem

Section #2: Linear and Integer Programming

3.3 Easy ILP problems and totally unimodular matrices

The CPLEX Library: Mixed Integer Programming

Integer Programming Part II

Integer Programming. The focus of this chapter is on solution techniques for integer programming models.

Part 4. Decomposition Algorithms

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

Disconnecting Networks via Node Deletions

IS703: Decision Support and Optimization. Week 5: Mathematical Programming. Lau Hoong Chuin School of Information Systems

min3x 1 + 4x 2 + 5x 3 2x 1 + 2x 2 + x 3 6 x 1 + 2x 2 + 3x 3 5 x 1, x 2, x 3 0.

Relation of Pure Minimum Cost Flow Model to Linear Programming

Integer Linear Programming Modeling

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

3.10 Column generation method

AM 121: Intro to Optimization Models and Methods

1 The linear algebra of linear programs (March 15 and 22, 2015)

Linear Programming. Scheduling problems

MVE165/MMG631 Linear and integer optimization with applications Lecture 8 Discrete optimization: theory and algorithms

Week Cuts, Branch & Bound, and Lagrangean Relaxation

Overview of course. Introduction to Optimization, DIKU Monday 12 November David Pisinger

3.10 Column generation method

Integer Programming ISE 418. Lecture 8. Dr. Ted Ralphs

Discrete Optimization 2010 Lecture 7 Introduction to Integer Programming

Section Notes 9. IP: Cutting Planes. Applied Math 121. Week of April 12, 2010

Recoverable Robustness in Scheduling Problems

Hands-on Tutorial on Optimization F. Eberle, R. Hoeksma, and N. Megow September 26, Branch & Bound

Introduction to integer programming II

Zebo Peng Embedded Systems Laboratory IDA, Linköping University

Linear Programming Duality

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

Linear Programming, Lecture 4

4/12/2011. Chapter 8. NP and Computational Intractability. Directed Hamiltonian Cycle. Traveling Salesman Problem. Directed Hamiltonian Cycle

Discrete (and Continuous) Optimization WI4 131

Advanced linear programming

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

Column Generation. i = 1,, 255;

Learning to Branch. Ellen Vitercik. Joint work with Nina Balcan, Travis Dick, and Tuomas Sandholm. Published in ICML 2018

IE418 Integer Programming

Section Notes 8. Integer Programming II. Applied Math 121. Week of April 5, expand your knowledge of big M s and logical constraints.

Discrete Optimization 2010 Lecture 8 Lagrangian Relaxation / P, N P and co-n P

Thermal Unit Commitment Problem

On the Tightness of an LP Relaxation for Rational Optimization and its Applications

Structured Problems and Algorithms

(tree searching technique) (Boolean formulas) satisfying assignment: (X 1, X 2 )

3.4 Relaxations and bounds

Multiobjective Mixed-Integer Stackelberg Games

Discrete Optimization 23

23. Cutting planes and branch & bound

16.410/413 Principles of Autonomy and Decision Making

Scheduling on Unrelated Parallel Machines. Approximation Algorithms, V. V. Vazirani Book Chapter 17

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

1 Column Generation and the Cutting Stock Problem

Lectures 6, 7 and part of 8

Lecture 5 January 16, 2013

Branch-and-Bound. Leo Liberti. LIX, École Polytechnique, France. INF , Lecture p. 1

Optimisation and Operations Research

CHAPTER 3: INTEGER PROGRAMMING

Integer Linear Programming

Stochastic Integer Programming

A primal-simplex based Tardos algorithm

Mathematical Programs Linear Program (LP)

Highly-scalable branch and bound for maximum monomial agreement

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

TIM 206 Lecture 3: The Simplex Method

MATHEMATICS FOR COMPUTER VISION WEEK 8 OPTIMISATION PART 2. Dr Fabio Cuzzolin MSc in Computer Vision Oxford Brookes University Year

Written Exam Linear and Integer Programming (DM545)

Optimization Methods in Logic

R u t c o r Research R e p o r t. The Branch and Bound Method

Representations of All Solutions of Boolean Programming Problems

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

CSC Design and Analysis of Algorithms. LP Shader Electronics Example

Introduction column generation

3.7 Cutting plane methods

Transcription:

Branch-and-Bound Algorithm November 3, 2009

Outline Lecture 23 Modeling aspect: Either-Or requirement Special ILPs: Totally unimodular matrices Branch-and-Bound Algorithm Underlying idea Terminology Formal description Algorithm demonstrated on an example Operations Research Methods 1

Either-Or Requirement Modeling Suppose you have two constrains and you can choose only one of them. For example, the constraints may represent two alternative resource consumption relations. Specifically suppose a company wants to introduce two new products 1 and 2, which can be made on two different machines. The machine production times are given by 3x 1 + 2x 2 250 machine 1 x 1 + 4x 2 600 machine 2 The company needs to purchase a machine and can afford to buy only one Operations Research Methods 2

machine. Thus, the requirement in the problem is either 3x 1 + 2x 2 250 or x 1 + 4x 2 600 How can we model this requirement within ILP setting? Operations Research Methods 3

One possibility: Lecture 23 Introduce a binary variable y {0, 1} for a decision of selecting machine: y = { 1 if we choose machine 1 0 otherwise Let M > 0 be very large number (e.g., M = 1000) We can model the either-or selection of machines as follows 3x 1 + 2x 2 250 + M(1 y) machine 1 x 1 + 4x 2 600 + My machine 2 A similar idea can be used for selection of k out of m constraints, where k and m are given positive integers with k < m Operations Research Methods 4

Solving ILPs Some of the ILPs have a special structure that allows us to ignore integer constraints and solve them as LPs and still obtain integer solutions Such a class of ILP problems is rather small; one such problem that we have seen is Transportation problem with integer supplies and demands Most of the ILP problems do not have the special structure These are solved using Branch-and-Bound (BB) algorithm Operations Research Methods 5

Transportation Problem: MG Auto model Denver Miami Supply Los Angeles 80 215 1000 Detroit 100 108 1500 New Orleans 102 68 1200 Demand 2300 1400 minimize 80x 11 + 215x 12 + 100x 21 + 108x 22 + 102x 31 + 68x 33 subject to x 11 + x 12 = 1000 LA x 21 + x 22 = 1500 Detroit x 31 + x 32 = 1200 NewOrleans x 11 + x 21 + x 31 = 2300 Denver x 12 + x 22 + x 32 = 1400 Miami x ij 0 for all i, j Operations Research Methods 6

Let A be the matrix that captures the linearly independent constraints (the last row is linearly dependent on the first four rows) Ax = b represents the first four constraints What makes the transportation model special is the structure of the matrix A corresponding to the independent equality constraints Ax = b. A = 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 0 1 0 1 0. The matrix is totally unimodular. DEF. A matrix A is totally unimodular if every square nonsingular submatrix has determinant +1 or -1. A square matrix is nonsingular if it is invertible. Operations Research Methods 7

A condition for an m n matrix A to be totally unimodular is: The matrix A is totally unimodular if it has the following properties (a) Every column of A contains at most two non-zero entries (b) Every entry in A is 0, +1, or -1 (c) The rows of A can be partitioned into two disjoint index sets B and C, such that (1) If two non-zero entries in a column of A have the same sign, then the row of one is in B, and the other is in C; (2) If two non-zero entries in a column of A have opposite signs, then the rows of both are in B, or both in C. A = 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 0 1 0 1 0. Operations Research Methods 8

For our matrix A, we can see that the conditions are satisfied with B = {1, 2, 3} and C = {4}. Not all ILP problems are with such a nice stricture. To solve the general ILPs, we need a special algorithm that can deal with the integer nature of the variables. Operations Research Methods 9

Branch-and-Bound Algorithm Operations Research Methods 10

Suppose we are facing the problem maximize 9x 1 + 5x 2 + 6x 3 + 4x 4 subject to 6x 1 + 3x 2 + 5x 3 + 2x 4 10 x 3 + x 4 1 x 1 + x 3 0 x 2 + x 4 0 x j {0, 1} j = 1,..., 4 There are 2 4 possibilities for the variables x j. We can enumerate them all and find the best decision. Operations Research Methods 11

One way to represent these options is through the use of a binary tree The places where the decision tree branches are referred as nodes. The nodes at the end of the branching tree are referred as leaf-nodes Our feasible points are at the leaf-nodes of this decision tree. We could build the whole tree and then explore the objective value at leaf-nodes But, this is not efficient. Branch-and-Bound (BB) algorithm is an efficient approach that builds the tree as needed and searches the nodes of the tree efficiently. Operations Research Methods 12

BB is an iterative algorithm that at each iteration branches the tree and possibly prunes the tree until the solution if found. Each node in a tree corresponds to a subproblem of the original problem. Each iteration involves the following operations: (a) Branching - deciding on from which node to branch among the active nodes in the tree (b) Bounding - operation that is performed at each created node to decide on which nodes to be fathomed (pruning the branches), It amounts to solving the corresponding subproblem at each node. (c) Fathoming - in essence pruning the tree. Based on some test and the bound values at the active nodes, the algorithm decides on nodes that can be discarded. This step also includes a termination criterion. Operations Research Methods 13

Initialization The initial node in the tree corresponds to solving the LP relaxation of the given problem LP relaxation is the problem resulting from the given ILP when we ignore integer constraints of the variables This node is active and it is the most recent. Operations Research Methods 14

Typical Iteration for MAXIMIZATION (a) Branching. Among the most recently created nodes that are active select one (braking ties according to the largest bound). Branch from that node by fixing one of the relaxed variables to 0 and 1 (in the node subproblem) (b) Bounding. At each new node, solve the corresponding LP problem and determine the optimal LP value. Round the non-integer value down (to the nearest integer). This is the bound of the subproblem at the node. (c) Fathoming. For each new node (subproblem) apply the following three tests: (1) Integer solution. If one of the new nodes has integer solution, its bound is compared to the bounds of other such nodes. If it does not have the best value - it is fathomed. If it has the best value it is fathomed and it is our current best solution (incumbent). (2) Bound value. If any of the new nodes has a bound smaller than currently the best bound - fathom the node. (3) Infeasibility. If LP at any of the new nodes has no solution (not feasible) - fathom the node. Operations Research Methods 15

Termination Stop when there are no more subproblems (no branching). The node with the best value provides the solution. Otherwise perform a new iteration. Operations Research Methods 16

Application BB algorithm to solve the following ILP: maximize 9x 1 + 5x 2 + 6x 3 + 4x 4 subject to 6x 1 + 3x 2 + 5x 3 + 2x 4 10 x 3 + x 4 1 x 1 + x 3 0 x 2 + x 4 0 x j {0, 1} j = 1,..., 4 Operations Research Methods 17

Initialization At the initial node, we would solve its LP relaxation maximize 9x 1 + 5x 2 + 6x 3 + 4x 4 subject to 6x 1 + 3x 2 + 5x 3 + 2x 4 10 x 3 + x 4 1 x 1 + x 3 0 x 2 + x 4 0 0 x j 1 j = 1,..., 4 Using LP algorithm, we find the optimal value (5/6, 1, 0, 1) and the optimal value z = 16 1 2. If the solution and the optimal value were integers, we would stop. Since it is not, this value gives us 16 as the best lower bound on the optimal value of the ILP (blb = 16). Operations Research Methods 18

The initialization and moving to the first iteration Operations Research Methods 19

Iteration 1: We branch from the LP relaxation (ALL node) into two new nodes corresponding to x 1 = 1 and x 1 = 0. At node x 1 = 1 we solve the following LP maximize 9 + 5x 2 + 6x 3 + 4x 4 subject to 3x 2 + 5x 3 + 2x 4 4 x 3 + x 4 1 x 3 1 x 2 + x 4 0 0 x j 1 j = 2,..., 4 Operations Research Methods 20

At node x 1 = 0 we solve the following LP maximize 5x 2 + 6x 3 + 4x 4 subject to 3x 2 + 5x 3 + 2x 4 10 x 3 + x 4 1 x 3 0 x 2 + x 4 0 0 x j 1 j = 2,..., 4 Node to the right is incumbent and fathomed (no branching there ever). Node to the left is the only active node and most recent. Operations Research Methods 21

Iteration 2: We branch from the node x 1 = 1 going to nodes x 2 = 1 and x 2 = 0. At node x 2 = 1 (also we have x 1 = 1), we solve the following LP maximize 14 + 6x 3 + 4x 4 subject to 5x 3 + 2x 4 1 x 3 + x 4 1 x 3 1 x 4 1 0 x j 1 j = 3, 4 The solution is (1, 1, 0, 1/2) and the optimal value is 16. Operations Research Methods 22

At node x 2 = 0 (and x 1 = 1) we solve the following LP maximize 9 + 6x 3 + 4x 4 subject to 5x 3 + 2x 4 4 x 3 + x 4 1 x 3 1 x 4 0 0 x j 1 j = 3, 4 The solution is (1, 0, 4/5, 0) and the optimal value is 13 4 5. We round this value down to 13. Operations Research Methods 23

The node to the right is fathomed since its value 13 is less than currently the best bound 16 Operations Research Methods 24