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

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

Integer Linear Programming Modeling

Travelling Salesman Problem

Chapter 3: Discrete Optimization Integer Programming

Linear programs, convex polyhedra, extreme points

Chapter 3: Discrete Optimization Integer Programming

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

Summary of the simplex method

Integer Linear Programming (ILP)

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

Integer programming: an introduction. Alessandro Astolfi

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

3.4 Relaxations and bounds

21. Set cover and TSP

MVE165/MMG631 Linear and integer optimization with applications Lecture 5 Linear programming duality and sensitivity analysis

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

Introduction column generation

Introduction to optimization and operations research

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

Optimisation and Operations Research

Lecture 8: Column Generation

Integer Linear Programming

Integer Programming Part II

AM 121: Intro to Optimization Models and Methods Fall 2018

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

Exercises NP-completeness

8.5 Sequencing Problems

Ann-Brith Strömberg. Lecture 4 Linear and Integer Optimization with Applications 1/10

Linear Programming. Scheduling problems

Discrete (and Continuous) Optimization WI4 131

Week Cuts, Branch & Bound, and Lagrangean Relaxation

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

Introduction to Bin Packing Problems

Combinatorial optimization problems

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

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

Modeling with Integer Programming

with Binary Decision Diagrams Integer Programming J. N. Hooker Tarik Hadzic IT University of Copenhagen Carnegie Mellon University ICS 2007, January

Section #2: Linear and Integer Programming

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

3.10 Lagrangian relaxation

3.10 Column generation method

Resource Constrained Project Scheduling Linear and Integer Programming (1)

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

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

Advanced linear programming

Σ w j. Σ v i KNAPSACK. for i = 1, 2,..., n. and an positive integers K and W. Does there exist a subset S of {1, 2,..., n} such that: and w i

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

16.410/413 Principles of Autonomy and Decision Making

The Traveling Salesman Problem: An Overview. David P. Williamson, Cornell University Ebay Research January 21, 2014

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

Recoverable Robustness in Scheduling Problems

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

MODELING (Integer Programming Examples)

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

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

Optimization Exercise Set n.5 :

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.

3.10 Column generation method

Discrete Optimization 2010 Lecture 7 Introduction to Integer Programming

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

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

Course Notes for MS4315 Operations Research 2

Lecture 8: Column Generation

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

1 Column Generation and the Cutting Stock Problem

Modelling linear and linear integer optimization problems An introduction

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

The Multiple Traveling Salesperson Problem on Regular Grids

Methods and Models for Combinatorial Optimization. We have seen... Luigi De Giovanni, Marco Di Summa. Introduction

MTHSC 4420 Advanced Mathematical Programming Homework 2

CS 301: Complexity of Algorithms (Term I 2008) Alex Tiskin Harald Räcke. Hamiltonian Cycle. 8.5 Sequencing Problems. Directed Hamiltonian Cycle

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

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

18 hours nodes, first feasible 3.7% gap Time: 92 days!! LP relaxation at root node: Branch and bound

Summary of the simplex method

This means that we can assume each list ) is

NP-Completeness. NP-Completeness 1

MATH 409 LECTURES THE KNAPSACK PROBLEM

Algorithm Design Strategies V

MATTHIAS GERDTS. COMBINATORIAL OPTIMISATION MSM 3M02b

Computational complexity theory

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

CS6999 Probabilistic Methods in Integer Programming Randomized Rounding Andrew D. Smith April 2003

19. Fixed costs and variable bounds

Algorithms and Theory of Computation. Lecture 22: NP-Completeness (2)

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

The traveling salesman problem

Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Limitations of Algorithms

CHAPTER 3: INTEGER PROGRAMMING

Optimization Prof. A. Goswami Department of Mathematics Indian Institute of Technology, Kharagpur. Lecture - 20 Travelling Salesman Problem

PART 4 INTEGER PROGRAMMING

Introduction to Integer Programming

Activity Predecessors Time (months) A - 2 B A 6 C A 4 D B 4 E C 2 F B,D 1 G D,E 2 H C 1. dummy0 C4 E2

Greedy Algorithms My T. UF

Bounds on the Traveling Salesman Problem

Cutting Planes in SCIP

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

IP Cut Homework from J and B Chapter 9: 14, 15, 16, 23, 24, You wish to solve the IP below with a cutting plane technique.

Transcription:

MVE165/MMG630, Integer linear programming: models and applications; complexity Ann-Brith Strömberg 2011 04 01

Modelling with integer variables (Ch. 13.1) Variables Linear programming (LP) uses continuous variables: xij 0 Integer linear programming (ILP) use also integer, binary, and discrete variables If both continuous and integer variables are used in a program, it is called a mixed integer (linear) program (MILP) Constraints In an ILP (or MILP) it is possible to model linear constraints, but also logical relations as, e.g. if then and either or This is done by introducing additional binary variables and additional constraints

Mixed integer modelling fixed charges Send a truck Start up cost f > 0 Load bread loafs cost p > 0 per loaf x = # bread loafs to transport from bakery to store c(x) f f + px M x { 0 if x = 0 Cost function c(x) = f + px if 0 < x M The function c : R + R + is nonlinear and discontinuos

Integer linear programming modelling fixed charges Let y = # trucks to send (here y equals 0 or 1) Replace c(x) by fy + px Constraints: 0 x My and y {0,1} minfy + px New model: s.t. x My 0 x 0 y {0, 1} y = 0 x = 0 fy + px = 0 y = 1 x M fy + px = f + px x > 0 y = 1 fy + px = f + px x = 0 y = 0 But: Minimization will push y to zero!

Discrete alternatives x2 Suppose: either x 1 + 2x 2 4 or 5x 1 + 3x 2 10, and x 1,x 2 0 must hold Not a convex set Let M 1 and define y {0,1} x1 New constraint set: y = x 1 + 2x 2 My 4 5x 1 + 3x 2 M(1 y) 10 y {0, 1} x 1,x 2 0 { 0 x1 + 2x 2 4 must hold 1 5x 1 + 3x 2 10 must hold

Exercises: Homework 1. Suppose that you are interested in choosing from a set of investments {1,..., 7} using 0 1 variables. Model the following constraints. 1.1 You cannot invest in all of them 1.2 You must choose at least one of them 1.3 Investment 1 cannot be chosen if investment 3 is chosen 1.4 Investment 4 can be chosen only if investment 2 is also chosen 1.5 You must choose either both investment 1 and 5 or neither 1.6 You must choose either at least one of the investments 1, 2 and 3 or at least two investments from 2, 4, 5 and 6 2. Formulate the following as mixed integer progams 2.1 u = min{x 1, x 2 }, assuming that 0 x j C for j = 1, 2 2.2 v = x 1 x 2 with 0 x j C for j = 1, 2 2.3 The set X \ {x } where X = {x Z n Ax b} and x X

Linear programming: A small example y 6 5 4 3 2 1 (4) 1 2 3 4 5 6 7 (0) (3) (2) (x,y ) maximize x + 2y (0) subject to x + y 10 (1) x + 3y 9 (2) x 7 (3) (1) x, y 0 (4,5) (5) x Optimal solution: (x,y ) = (5 1 4,43 4 ) Optimal objective value: 14 3 4

Integer linear programming: A small example y 5 4 (4) 3 2 1 1 2 3 4 5 6 7 (0) (3) (2) (x,y ) (5) (1) maximize x + 2y (0) subject to x + y 10 (1) x + 3y 9 (2) x 7 (3) x, y 0 (4,5) x, y integer x What if the variables are forced to be integral? Optimal solution: (x,y ) = (6,4) Optimal objective value: 14 < 14 3 4 The optimal value decreases (possibly constant) when the variables are restricted to have integral values

ILP: Solution by the branch and bound algorithm (e.g., Cplex, XpressMP, or GLPK) (Ch. 15.1 15.2) Relax integrality requirements linear, continuous problem (x,y) = (5 1 4,43 4 ),z = 143 4 Search tree: branch over fractional variable values y 5 4 (x, y) = (5, 4 2 3 ), z = 14 1 3 fractional x 5 x 6 fractional y 4 y 5 integer 3 2 integer not feasible 1 1 2 3 4 5 6 7 x (x, y) = (6, 4), z = 14 (x, y) = (5, 4), z = 13

The knapsack problem budget constraints (Ch. 13.2) Select an optimal collection of objects or investments or projects... cj = benefit of choosing object j, j = 1,...,n Limits on the budget aj = cost of object j, j = 1,...,n b = total budget { 1, if object j is chosen, Variables: x j = 0, otherwise. j = 1,...,n Objective function: max n j=1 c jx j Budget constraint: n j=1 a jx j b Binary variables: x j {0,1}, j = 1,...,n

Computational complexity (Ch. 2.6) A small knapsack instance z1 = max 213x 1 + 1928x 2 + 11111x 3 + 2345x 4 + 9123x 5 subject to 12223x 1+12224x 2+36674x 3+61119x 4+85569x 5 89 643 482 x 1,..., x 5 0, integer Optimal solution x = (0,1,2444,0,0), z1 = 27 157 212 Cplex finds this solution in 0.015 seconds The equality version z2 = max 213x 1 + 1928x 2 + 11111x 3 + 2345x 4 + 9123x 5 subject to 12223x 1+12224x 2+36674x 3+61119x 4+85569x 5 = 89 643 482 x 1,..., x 5 0, integer Optimal solution x = (7334,0,0,0,0), z2 = 1 562 142 Cplex computations interrupted after 1700 sec. ( 1 2 hour) No integer solution found Best upper bound found: 25 821 000 55 863 802 branch and bound nodes visited Only one feasible solution exists!

Computational complexity Mathematical insight yields successful algorithms Example: Assignment problem: Assign n persons to n jobs. # feasible solutions: n! Combinatorial explosion An algorithm that solves this problem in time O(n 4 ) n 4 Binary knapsack: O(2 n ) Complete enumeration of all solutions is not efficient n 2 5 8 10 100 1000 n! 2 120 40000 3600000 9.3 10 157 4.0 10 2567 2 n 4 32 256 1024 1.3 10 30 1.1 10 301 n 4 16 625 4100 10000 100000000 1.0 10 12 (n log n 0.6 3.5 7.2 10 200 3000) (Continuous knapsack (sorting of c j a j ): O(n log n))

The set covering problem (Ch. 13.8) A number (n) of items and a cost for each item A number (m) of subsets of the n items Find a selection of the items such that each subset contains at least one selected item and such that the total cost for the selected items is minimized Mathematical formulation: min c T x subject to Ax 1 x binary c R n and 1 = (1,...,1) T R m are constant vectors A R m n is a matrix with entries a ij {0,1} x R n is the vector of variables Related models: set partitioning (Ax = 1), set packing (Ax 1)

Example: Installing security telephones The road administration wants to install emergency telephones such that each street has access to at least one phone It is logical to place the phones at street crossings Each crossing has an installation cost: c = (2,2,3,4,3,2,2,1) Find the cheapest selection of crossings to provide all streets with phones 1 2 3 Street A Street B Street C Street D Street E 4 Street G 5 Street F Street I Street H Street J Street K 6 7 8 Define variables and constraints

Installing security telephones: Mathematical model Binary variables for each crossing: x j = 1 if a phone is installed at j, x j = 0 otherwise. For each street, introduce a constraint saying that a phone should be placed at at least one of its crossings: A: x 1 + x 2 1, B: x 2 + x 3 1, 2 Street A Street B C: x 1 + x 6 1, D: x 2 + x 6 1, E: x 2 + x 4 1, F: x 4 + x 7 1, G: x 4 + x 5 1, H: x 3 + x 5 1, Street G I: x 5 + x 8 1, J: x 6 + x 7 1, K: x 7 + x 8 1 1 3 Street J Street E 4 5 Street F Street K 6 7 8 Objective function: min 2x 1 + 2x 2 + 3x 3 + 4x 4 + 3x 5 + 2x 6 + 2x 7 + x 8 An optimal solution: x 2 = x 5 = x 6 = x 7 = 1, x 1 = x 3 = x 4 = x 8 = 0. Objective value: 9. Street C Street D Street I Street H

More modelling examples (Ch. 13.3) Given three telephone companies A, B and, C which charge a fixed start-up price of 16, 25 and, 18, respectively For each minute of call-time A, B, and, C charge 0.25, 0.21 and, 0.22 We want to phone 200 minutes. Which company should we choose? x i = number of minutes called by i {A,B,C} Binary variables y i = 1 if x i > 0, y i = 0 otherwise (pay start-up price only if calls are made with company i) Mathematical model min 0.25x 1 + 0.21x 2 + 0.22x 3 + 16y 1 + 25y 2 + 18y 3 subject to x 1 + x 2 + x 3 = 200 0 x i 200y i, i = 1,2,3 y i {0,1}, i = 1,2,3

More modelling examples (2) (Ch. 13.9) We wish to process three jobs on one machine Each job j has a processing time p j, a due date d j, and a penalty cost c j if the due date is missed How should the jobs be scheduled to minimize the total penalty cost? Processing Due date Late penalty Job time (days) (days) $/day 1 5 25 19 2 20 22 12 3 15 35 34 Model on the board!

The assignment model (Ch. 13.5) Assign each task to one resource, and each resource to one task Linear cost c ij for assigning task i to resource j, i,j {1,...,n} { 1, if task i is assigned to resource j Variables: x ij = 0, otherwise min subject to n n c ij x ij i=1 j=1 n x ij = 1, i = 1,...,n j=1 n x ij = 1, j = 1,...,n i=1 x ij 0, i,j = 1,...,n

The assignment model Choose one element from each row and each column 1 c 11 : x 11 1 c 11 c 12 c 13 c 21 c 22c 23 c 31 c 32 c 33 c 1n c 2n c 3n 2 2 n c nn : x nn n c n1c n2 c n3 This integer linear model has integral extreme points, since it can be formulated as a network flow problem Therefore, it can be efficiently solved using specialized (network) linear programming techniques Even more efficient special purpose (primal dual graph-based) algorithms exist c nn

The travelling salesperson problem (TSP) (Ch. 13.10) Given n cities and connections between all cities (distances on each connection) Find shortest tour that passes through all the cities 1220 1 120 2 100 210 130 110 80 3 5 150 4 160 150 A problem that is very easy to describe and understand but very difficult to solve (combinatorial explosion) different versions of TSP: Euclidean, metric, symmetric,...

An ILP formulation of the TSP problem Let the distance from city i to city j be d ij Introduce binary variables x ij for each connection Let V = {1,...,n} denote the set of nodes (cities) min d ij x ij, s.t. i V j V x ij = 1, i V, (1) j V x ij = 1, j V, (2) i V x ij 1, U V : 2 U V 2, (3) i U,j V \U x ij binary i, j V Cf. the assignment problem Draw graph * 2! Enter and leave each city exactly once (1) and (2) Draw! Constraints (3): subtour elimination Draw! Alternative formulation of (3): Draw! (i,j) U x ij U 1, U V : 2 U V 2