Integer Linear Programming Modeling

Similar documents
Integer programming: an introduction. Alessandro Astolfi

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

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

Lecture 8: Column Generation

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

Resource Constrained Project Scheduling Linear and Integer Programming (1)

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

Lecture 8: Column Generation

Chapter 3: Discrete Optimization Integer Programming

Chapter 3: Discrete Optimization Integer Programming

Operations Research Lecture 6: Integer Programming

3.10 Column generation method

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

Workforce Scheduling. Outline DM87 SCHEDULING, TIMETABLING AND ROUTING. Outline. Workforce Scheduling. 1. Workforce Scheduling.

3.10 Column generation method

Application 1 - People Allocation in Line Balancing

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

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

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

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

OPTIMIZATION. joint course with. Ottimizzazione Discreta and Complementi di R.O. Edoardo Amaldi. DEIB Politecnico di Milano

In the original knapsack problem, the value of the contents of the knapsack is maximized subject to a single capacity constraint, for example weight.

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

Reconnect 04 Introduction to Integer Programming

PART 4 INTEGER PROGRAMMING

Linear and Integer Programming - ideas

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

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

Combinatorial optimization problems

Optimization Methods in Management Science

Introduction to Integer Programming

DM559/DM545 Linear and integer programming

Computational Integer Programming Universidad de los Andes. Lecture 1. Dr. Ted Ralphs

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

MODELING (Integer Programming Examples)

This means that we can assume each list ) is

3.3 Easy ILP problems and totally unimodular matrices

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

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

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

3.4 Relaxations and bounds

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

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

IV. Violations of Linear Programming Assumptions

Linear integer programming and its application

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

Recoverable Robustness in Scheduling Problems

Integer Programming: Cutting Planes

1 Column Generation and the Cutting Stock Problem

Integer Linear Programming (ILP)

Welcome to CPSC 4850/ OR Algorithms

Integer Programming and Branch and Bound

AM 121: Intro to Optimization Models and Methods Fall 2018

Optimisation and Operations Research

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

Course Notes for MS4315 Operations Research 2

System Planning Lecture 7, F7: Optimization

Integer Linear Programs

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

Advanced Topics in Operations Research

MTHSC 4420 Advanced Mathematical Programming Homework 2

Returning to Open Threads

Linear Programming. Formulating and solving large problems. H. R. Alvarez A., Ph. D. 1

Column Generation. i = 1,, 255;

Introduction to Integer Linear Programming

Structured Problems and Algorithms

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

Introduction to optimization and operations research

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

RO: Exercices Mixed Integer Programming

Section #2: Linear and Integer Programming

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

Column Generation. ORLAB - Operations Research Laboratory. Stefano Gualandi. June 14, Politecnico di Milano, Italy

Methods and Models for Combinatorial Optimization

CHAPTER 11 Integer Programming, Goal Programming, and Nonlinear Programming

Integer Programming Introduction. C, T int (3) 6C +7T 21 (1) Maximize : 12C +13T Subject to

Introduction to Bin Packing Problems

3.7 Cutting plane methods

21. Set cover and TSP

A comparison of sequencing formulations in a constraint generation procedure for avionics scheduling

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

1 Maximizing a Submodular Function

Partial Path Column Generation for the Vehicle Routing Problem with Time Windows

Applications of Linear Programming

Branch-and-Price-and-Cut for the Split Delivery Vehicle Routing Problem with Time Windows

1 T 1 = where 1 is the all-ones vector. For the upper bound, let v 1 be the eigenvector corresponding. u:(u,v) E v 1(u)

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

An Integer Cutting-Plane Procedure for the Dantzig-Wolfe Decomposition: Theory

Introduction column generation

RCPSP Single Machine Problems

Integer Programming ISE 418. Lecture 8. 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

Modeling with Integer Programming

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

Decision Models Lecture 5 1. Lecture 5. Foreign-Currency Trading Integer Programming Plant-location example Summary and Preparation for next class

Notes on Dantzig-Wolfe decomposition and column generation

Integer Programming. Chapter Copyright 2010 Pearson Education, Inc. Publishing as Prentice Hall

Logic-based Benders Decomposition

MATH 409 LECTURES THE KNAPSACK PROBLEM

Transcription:

DM554/DM545 Linear and Lecture 9 Integer Linear Programming Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark

Outline 1. 2. Assignment Problem Knapsack Problem Set Problems 2

Outline 1. 2. Assignment Problem Knapsack Problem Set Problems 3

Discrete Optimization Often we need to deal with integral inseparable quantities Sometimes rounding can go Other times rounding not feasible: eg, presence of a bus on a line is 0.3... 4

Integer Linear Programming Linear Objective Linear Constraints but! integer variables The world is not linear: "OR is the art and science of obtaining bad answers to questions to which otherwise worse answers would be given" max c T x Ax b x 0 max c T x Ax b x 0 x integer max c T x Ax b x {0, 1} n max c T x + h T y Ax + Gy b x 0 y 0 y integer Linear Programming (LP) Integer (Linear) Programming (ILP) Binary Integer Program (BIP) 0/1 Integer Programming Mixed Integer (Linear) Programming (MILP) max f (x) g(x) b x 0 Non-linear Programming (NLP) 5

Recall: Z set of integers Z + set of positive integer Z + 0 set of nonnegative integers ({0} Z+ ) N 0 set of natural numbers, ie, nonnegative integers {0, 1, 2, 3, 4,...} 6

Combinatorial Optimization Problems Definition (Combinatorial Optimization Problem (COP)) Input: Given a finite set N = {1,..., n} of objects, weights c j j N, a collection of feasible subsets of N, F Task: Find a minimum weight feasible subset, ie, min c S N j S F j S Many COP can be modelled as IP or BIP. { 1 if j S Typically: incidence vector of S, x S B n : xj S = 0 otherwise 7

Rounding max 100x 1 + 64x 2 50x 1 + 31x 2 250 3x 1 2x 2 4 x 1, x 2 Z + x 2 3x 1 2x 2 + 4 LP optimum (376/193, 950/193) IP optimum (5, 0) x 1 x 1 + 0.64x 2 4 50x 1 + 31x 2 250 feasible region convex but not continuous: Now the optimum can be on the border (vertices) but also internal. Possible way: solve the relaxed problem. If solution is integer, done. If solution is rational (never irrational) try rounding to the nearest integers (but may exit feasibility region) if in R 2 then 2 2 possible roundings (up or down) if in R n then 2 n possible roundings (up or down) Note: rounding does not help in the example above! 8

Cutting Planes max x 1 + 4x 2 x 1 + 6x 2 18 x 1 3 x 1, x 2 0 x 1, x 2 integers x 2 x 1 = 3 x 1 + 6x 2 = 18 x 1 + x 2 = 5 x 1 x 1 + 4x 2 = 2 9

Branch and Bound max x 1 + 2x 2 x 1 + 4x 2 8 4x 1 + x 2 8 x 1, x 2 0, integer x 2 x 1 + 4x 2 = 8 x 1 x 1 + 2x 2 = 1 4x 1 + x 2 = 8 10

4.8 x 1 1 x 1 2 x 2 x 1 = 1 x 2 x 1 + 4x 2 = 8 x 1 + 4x 2 = 8 x 1 x 1 x 1 + 2x 2 = 1 4x 1 + x 2 = 8 x 1 + 2x 2 = 1 4x 1 + x 2 = 8 11

x 2 1 4.8 x 1 2 x 2 1 4.5 x 2 2 2 2 x 1 =2 x 2 =0 x 1 =1 x 2 =1 3 3 4 4 x 1 =0 x 2 =2 x 2 x 2 x 1 + 4x 2 = 8 x 1 + 4x 2 = 8 x 1 x 1 x 1 + 2x 2 = 1 4x 1 + x 2 = 8 x 1 + 2x 2 = 1 4x 1 + x 2 = 8 12

Outline 1. 2. Assignment Problem Knapsack Problem Set Problems 13

Mathematical Programming: Find out exactly what the decision maker needs to know: which investment? which product mix? which job j should a person i do? Define Decision Variables of suitable type (continuous, integer valued, binary) corresponding to the needs Formulate Objective Function computing the benefit/cost Formulate mathematical Constraints indicating the interplay between the different variables. 14

How to build a constraint Formulate relationship between the variables in plain words Then formulate your sentences using logical connectives and, or, not, implies Finally convert the logical statement to a mathematical constraint. Example The power plant must not work in both of two neighbouring time periods on/off is modelled using binary integer variables x i = 1 or x i = 0 x i = 1 implies x i+1 = 0 x i + x i+1 1 15

Outline 1. 2. Assignment Problem Knapsack Problem Set Problems 16

The Assignment Problem Problem Common application: Assignees are being assigned to perform tasks. Suppose we have n persons and n jobs Each person has a certain proficiency at each job. Formulate a mathematical model that can be used to find an assignment that maximizes the total proficiency. 17

The Assignment Problem Model Decision Variables: { 1 if person i is assigned job j x ij = 0 otherwise, for i, j = 1, 2,..., n Objective Function: max n n ρ ij x ij i=1 j=1 where ρ ij is person i s proficiency at job j 18

The Assignment Problem Model Constraints: Each person is assigned one job: n x ij = 1 for all i j=1 e.g. for person 1 we get x 11 + x 12 + x 13 + + x 1n = 1 Each job is assigned to one person: n x ij = 1 for all j i=1 e.g. for job 1 we get x 11 + x 21 + x 31 + + x n1 = 1 19

Outline 1. 2. Assignment Problem Knapsack Problem Set Problems 20

The Knapsack Problem Problem.. Input: Given a set of n items, each with a value v i and weight w i (i = 1,..., n) Task: determine the number of each items to include in a collection so that the total weight is less than a given limit, W, and the total value is as large as possible. The knapsack name derives from the problem faced by someone who is constrained by a fixed-size knapsack and must fill it with the most useful items. Assuming we can take at most one of any item and that i w i > W, formulate a mathematical model to determine which items give the largest value. Model used, eg, in capital budgeting, project selection, etc. 21

The Knapsack Problem Decision Variables: x i = { 1 if item i is taken 0 otherwise, for i = 1, 2..., n Objective Function: max n v i x i i=1 Constraints: Knapsack capacity restriction: n w i x i W i=1 22

Outline 1. 2. Assignment Problem Knapsack Problem Set Problems 23

Set Covering Problem Given: a set of regions, a set of possible construction locations for emergency centers, regions that can be served in less than 8 minutes, cost of installing an emergency center in each location. Task: decide where to install a set of emergency centers such that the total cost is minimized and all regions are safely served As a COP: M = {1,..., m} regions, N = {1,..., n} centers, S j M regions serviced by j N in 8 min. min c T N j S j = M j T j T regions: M = {1,..., 5} centers: N = {1,..., 6} cost of centers: c j = 1 j = 1,..., 6 coverages: S 1 = (1, 2), S 2 = (1, 3, 5), S 3 = (2, 4, 5), S 4 = (3), S 5 = (1), S 6 = (4, 5) 24

As a BIP: Variables: x B n, x j = 1 if center j is selected, 0 otherwise Objective: min n c j x j j=1 Constraints: incidence matrix: a ij = n j=1 a ijx j 1 { 1 0 25

Example regions: M = {1,..., 5} centers: N = {1,..., 6} cost of centers: c j = 1 j = 1,..., 6 coverages: S 1 = (1, 2), S 2 = (1, 3, 5), S 3 = (2, 4, 5), S 4 = (3), S 5 = (1), S 6 = (4, 5) A = x 1 x 2 x 3 x 4 x 5 x 6 S 1 S 2 S 3 S 4 S 5 S 6 1 1 1 0 0 1 0 2 1 0 1 0 0 0 3 0 1 0 1 0 0 4 0 0 1 0 0 1 5 0 1 1 0 0 1 26

Set covering cover each of M at least once 1. min, 2. all RHS terms are 1 3. all matrix elements are 1 Set packing cover as many of M without overlap 1. max, 2. all RHS terms are 1 3. all matrix elements are 1 Set partitioning cover exactly once each element of M 1. max or min, = 2. all RHS terms are 1 3. all matrix elements are 1 min c T x Ax 1 x B n max c T x Ax 1 x B n max c T x Ax = 1 x B n Generalization: RHS 1 Application examples: Aircrew scheduling: M: legs to cover, N: rosters Vehicle routing: M: customers, N: routes 27

Manpower Planning Input A set of workers A set of 15 working hours per day with a required staffing per hour Each person work in shifts that covers 7 hours A person starting in hour i contributes to the workload in hours i,..., i + 6 Eg: A person starting in hour 3 contributes to the workload in hours 3,4,5,6,7,8,9 Task: Formulate a mathematical model to determine the number of people required to cover the workload 28

Decision Variables: x i N 0 : number of people starting work in hour i(i = 1,..., 15) Objective Function: Constraints: Demand: Bounds: i=t i=t 6 min 9 i=1 x i x i d t for t = 1,..., 15 x 5,..., x 0 = 0 29

A good written example of how to present a model: [from G. Desaulniers, J. Desrosiers, Y. Dumas, M.M. Solomon and F. Soumis. Daily Aircraft Routing and Scheduling. Management Science, 1997, 43(6), 841-855]