Algorithms for Decision Support. Integer linear programming models

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

Fundamentals of Integer Programming

3 INTEGER LINEAR PROGRAMMING

February 19, Integer programming. Outline. Problem formulation. Branch-andbound

5.3 Cutting plane methods and Gomory fractional cuts

MVE165/MMG630, Applied Optimization Lecture 8 Integer linear programming algorithms. Ann-Brith Strömberg

56:272 Integer Programming & Network Flows Final Examination -- December 14, 1998

Integer Programming Theory

/ Approximation Algorithms Lecturer: Michael Dinitz Topic: Linear Programming Date: 2/24/15 Scribe: Runze Tang

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

56:272 Integer Programming & Network Flows Final Exam -- December 16, 1997

Simulation. Lecture O1 Optimization: Linear Programming. Saeed Bastani April 2016

CS 473: Algorithms. Ruta Mehta. Spring University of Illinois, Urbana-Champaign. Ruta (UIUC) CS473 1 Spring / 36

Linear Programming. Course review MS-E2140. v. 1.1

Integer Programming Explained Through Gomory s Cutting Plane Algorithm and Column Generation

A Generic Separation Algorithm and Its Application to the Vehicle Routing Problem

Optimization Methods in Management Science

Introduction to Mathematical Programming IE496. Final Review. Dr. Ted Ralphs

Algorithms for Integer Programming

GENERAL ASSIGNMENT PROBLEM via Branch and Price JOHN AND LEI

Discrete Optimization. Lecture Notes 2

The MIP-Solving-Framework SCIP

The Size Robust Multiple Knapsack Problem

15.082J and 6.855J. Lagrangian Relaxation 2 Algorithms Application to LPs

Benders in a nutshell Matteo Fischetti, University of Padova

Last topic: Summary; Heuristics and Approximation Algorithms Topics we studied so far:

DETERMINISTIC OPERATIONS RESEARCH

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Computational Integer Programming. Lecture 12: Branch and Cut. Dr. Ted Ralphs

Pivot and Gomory Cut. A MIP Feasibility Heuristic NSERC

The ILP approach to the layered graph drawing. Ago Kuusik

Integer Programming. Xi Chen. Department of Management Science and Engineering International Business School Beijing Foreign Studies University

Lagrangean relaxation - exercises

MA4254: Discrete Optimization. Defeng Sun. Department of Mathematics National University of Singapore Office: S Telephone:

Integer Programming: Algorithms - 2

Progress in Linear Programming-Based Algorithms for Integer Programming: An Exposition

Mathematical and Algorithmic Foundations Linear Programming and Matchings

Mathematical Tools for Engineering and Management

Modern Benders (in a nutshell)

Approximation Algorithms

MVE165/MMG631 Linear and integer optimization with applications Lecture 7 Discrete optimization models and applications; complexity

Design and Analysis of Algorithms (V)

Combinatorial Optimization

THEORY OF LINEAR AND INTEGER PROGRAMMING

Integer and Combinatorial Optimization

Modelling of LP-problems (2WO09)

The University of Jordan Department of Mathematics. Branch and Cut

CMPSCI611: The Simplex Algorithm Lecture 24

Exact solutions to mixed-integer linear programming problems

TIM 206 Lecture Notes Integer Programming

Linear Programming. Readings: Read text section 11.6, and sections 1 and 2 of Tom Ferguson s notes (see course homepage).

TMA946/MAN280 APPLIED OPTIMIZATION. Exam instructions

Linear Programming. Widget Factory Example. Linear Programming: Standard Form. Widget Factory Example: Continued.

Advanced Use of GAMS Solver Links

Vertex Cover Approximations

11 Linear Programming

LP-Modelling. dr.ir. C.A.J. Hurkens Technische Universiteit Eindhoven. January 30, 2008

2. Modeling AEA 2018/2019. Based on Algorithm Engineering: Bridging the Gap Between Algorithm Theory and Practice - ch. 2

COVERING POINTS WITH AXIS PARALLEL LINES. KAWSAR JAHAN Bachelor of Science, Bangladesh University of Professionals, 2009

11. APPROXIMATION ALGORITHMS

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Financial Optimization ISE 347/447. Lecture 13. Dr. Ted Ralphs

Linear Programming. them such that they

Machine Learning for Software Engineering

lpsymphony - Integer Linear Programming in R

Combinatorial Optimization - Lecture 14 - TSP EPFL

Integer Programming! Using linear programming to solve discrete problems

Linear Programming Duality and Algorithms

Branch-and-cut implementation of Benders decomposition Matteo Fischetti, University of Padova

Linear Programming. Slides by Carl Kingsford. Apr. 14, 2014

Approximation Algorithms

CSE 417 Branch & Bound (pt 4) Branch & Bound

Outline. Modeling. Outline DMP204 SCHEDULING, TIMETABLING AND ROUTING. 1. Models Lecture 5 Mixed Integer Programming Models and Exercises

Integer Programming and Network Modeis

CSCE 411 Design and Analysis of Algorithms

Advanced Operations Research Techniques IE316. Quiz 2 Review. Dr. Ted Ralphs

Linear and Integer Programming :Algorithms in the Real World. Related Optimization Problems. How important is optimization?

Motivation for Heuristics

Foundations of Computing

Solutions for Operations Research Final Exam

Column Generation Method for an Agent Scheduling Problem

CMSC 451: Linear Programming

Exact Algorithms for Mixed-Integer Bilevel Linear Programming

Improved Gomory Cuts for Primal Cutting Plane Algorithms

Outline. Column Generation: Cutting Stock A very applied method. Introduction to Column Generation. Given an LP problem

In this chapter we introduce some of the basic concepts that will be useful for the study of integer programming problems.

Column Generation: Cutting Stock

Exploiting Degeneracy in MIP

Department of Mathematics Oleg Burdakov of 30 October Consider the following linear programming problem (LP):

Cutting Planes for Some Nonconvex Combinatorial Optimization Problems

General Purpose Methods for Combinatorial Optimization

Lecture 12: Feasible direction methods

Research Interests Optimization:

Unit.9 Integer Programming

1 Linear programming relaxation

COMP9334: Capacity Planning of Computer Systems and Networks

NOTATION AND TERMINOLOGY

OR 674 DYNAMIC PROGRAMMING Rajesh Ganesan, Associate Professor Systems Engineering and Operations Research George Mason University

College of Computer & Information Science Fall 2007 Northeastern University 14 September 2007

Transcription:

Algorithms for Decision Support Integer linear programming models 1

People with reduced mobility (PRM) require assistance when travelling through the airport http://www.schiphol.nl/travellers/atschiphol/informationforpassengerswithreducedmobility.htm 2

What exactly happened when 100 PRMs miss their flight at July 14, 2018? How many PRMs will ask for assistance next month? What is the best schedule for the employees assisting the PRMs? 3

Scorecards Data visualization.. Data mining Machine learning Forecasting Simulation Optimization 4

PRMs: Possible techniques for decision support 1. Management considers to change the locations of the lounges and to extend the number of lounges 2. Management want to find good strategies for assigning PRMs to employees 1. Define a few different options 2. Imitate the process of supervising PRMs in the computer 3. Run each option and compute the performance 4. Compare the performance to the currrent situation and select the best option Discrete-event simulation 5

PRMs: Possible techniques for decision support (2) 1. Management wants to find the best locations of the lounges 2. Management wants to determine the assignment of PRM s to employees such the waiting time for the PRM s outside the lounges is minimal. Combinatorial optimization 6

Combinatorial optimization Define variables x representing a schedule Express waiting time w x in terms of these variables Formulate constraints in terms of these variables: x C C contains a finite but very large number of element Optimize: 7

Contents We forget stochastics for a while We move to discrete (or combinatorial) optimization Integer linear programming is well-known modelling and solution technique First, linear programming Modelling integer linear programming problems Solving integer linear programming problems by branchand-bound. Branch-and-cut Integer linear programming is frequently used in practice 8

Example: Ajax Three types of computers: Alpha, Beta, and Gamma. Net profit: $350,- per Alpha, $470,- per Beta, and $610,- per Gamma. Every computer can be sold at the given profit. Testing: Alpha and Beta computers on the A-line, Gamma computers on the C-line. Testing takes 1 hour per computer. Capacity A-line: 120 hours; capacity C-line: 80 hours. Required labor: 10 hours per Alpha, 15 hours per Beta, and 20 hours per Gamma. Total amount of labor available: 2000 hours. 9

Example: Ajax Decision variables: MA number of alpha s produced, etc max Z 350 MA 470 MB 610 MC Objective function subject to MA MC MB 120 48 (A line) (C line) Constraints 10MA 15MB 20MC 2000 (labor) MA,MB,MC 0 10

Linear programming Min c T x s.t. Ax b x 0 With x R, c Q, A Q, and b Q 11

LP:Geometric 3 x 1 x2 3 2 x 1 x2 1 1 x 1 0 12 max x 2 0 1 2 3 2x 1 x 2

The simplex method Example dictionaries 13

14

15

16

17

18

19

20

Solution options A linear programming problem can be infeasible Example: max 6x 4x x x 3,2x 2x 8,x,x 0 be unbounded Example: max 6x 4x x x 3,2x 2x 8,x,x 0 for any λ 2we have that x λ,x λ is feasible have a bounded optimum 21

Solution method for linear programming Simplex method Slower than polynomial Practical Ellipsoid method Polynomial (Khachian, 1979) Not practical Interior points methods Polynomial (Karmakar, 1984) Seems not too hard to implement. But, for larger problems you run into numerical problems. Use a standard solver (Gurobi, CPLEX, GLPK) Outperforms Simplex for very large instances LP P 22

Knapsack problem Knapsack with volume 15 What should you take with you to maximize utility? Item 1:paper 2:book 3:bread 4:smart 5:water -phone Utility 8 12 7 15 12 Volume 4 8 5 2 6 23

Knapsack problem (2) x 1 = 1 if item 1 is selected, 0 otherwise, x 2, max z= 8 x 1 + 12 x 2 + 7 x 3 + 15 x 4 + 12 x 5 subject to 4 x 1 + 8 x 2 + 5 x 3 + 2 x 4 + 6 x 5 15 x 1, x 2, x 3, x 4, x 5 Є {0,1} 24

Knapsack problem (3) n items, knapsack volume b Item j has Utility (revenue) c j Volume (weight) a j ILP formulation Decision variables: x 1if item j is selected and x 0 otherwise s.t. max n j 1 x j n j 1 c j x j a j x j b 0, 1 j 1,, n 25

(Mixed) Integer linear programming Min c T x+ d T y s.t. Ax + By b x,y 0 x integral (or binary) Extension of LP: Good news: more possibilities for modelling Bad news: larger solution times 26

(Mixed) Integer linear program Min c T x s.t. Ax + By b x,y 0 x integral (or binary) LP-relaxation Min c T x s.t. Ax + By b x,y 0 Lower bound (or upper bound in case of maximization) 27

28

Modeling Decision variables Objective function Constraints 29

Assignment problem n persons, n jobs. Each person can do at most one job Each job has to be executed C ij cost if person i performs job j We want to minimize cost 30

Maximum independent set Given a graph G=(V,E) V: nodes E: edges An independent set I is a set of nodes, such that every edge has at most one nodes in I, i.e., no pair of nodes in I is connected. What is the maximum number of nodes in an independent set? 31

Facility location Possible locations: n Customers:m 32

Capacitated facility location Data: m customers, Customer demand: D i n possible locations of depots (facilities) c ij unit cost of serving customer i by depot j Capacity depot: C j Fixed cost for opening depot DC: F j Which depots are opened and which customer is served by which depot? 33

Capacitated facility location: Our example shows modelling possibilities with binary variables Our model uses binary variables for fixed cost constraints Our model uses binary variables forcing constraints: depot can only be used when it is open. 34

Uncapacitated facility location Data: m customers, n possible locations of depot Each customer is assigned to one depot d ij cost of serving customer i by depot j Fixed cost for opening depot DC: F j Which depots are opened and which customer is served by which depot? 35

Uncapacitated facility location Two models FL and AFL Same optimal value Z IP for ILP Set of feasible solutions for LP-relaxation satisfy: P P Set of optimal values satisfy: Z Z Z The LP-relaxation of FL gives a stronger bound 36

Just to show you the idea LP hull FL 37

Treasure island Diamonds are buried on an island Numbers give number of diamonds in neighboring positions (include diagonal) At most one diamond per position No diamond at position with number We now have a feasibility problem 38

Treasure island with pitfall Like treasure island but exactly one given number is incorrect. 39

(Mixed) Integer linear program Min c T x s.t. Ax + By b x,y 0 x integral (or binary) LP-relaxation Min c T x s.t. Ax + By b x,y 0 Lower bound (or upper bound in case of maximization) 40

Knapsack problem revisited n items, knapsack volume b Item j has Utility (revenue) c j Volume (weight) a j ILP formulation Decision variables: x 1if item j is selected and x 0 otherwise s.t. max n j 1 x j n j 1 c j x j a j x j b 0, 1 j 1,, n 41

Knapsack problem: LP-relaxation LP-relaxation: Greedy algorithm Step 0.Order variables such that c a 1 1 c a 2 2... c a n n Step1. x i 0 i ; restcapacity b b; i 1 Step 2. If a i b, then x j 1, else x j b a i.set b b a x i i ; j j 1 Step 3. If b 0, go to Step 2. Feasible solution: rounding down 42

How to solve an Integer Linear Program First solve the LP-relaxation You may have learned how to do this by the Simplex method in the bachelor course Optimization In this course, we just assume (pretend) that we can do this after previous lecture There is excellent software for this (even Excel can solve a (not too large) LP) If LP-relaxation has integral solution: finished Otherwise, proceed by branch-and-bound 43

Solving ILP by branch-and-bound: informally (for maximization) Split into sub problems, e.g. by fixing a variable to 0 or 1. This is branching, you get nodes of a tree. Select a node to evaluate. You can compute: upper bound by solving LP-relaxation a feasible solution (e.g. by rounding heuristic) 4 options: 1. Infeasible: do not search further from this node 2. LP-relaxation upper bound less than or equal to the best known feasible solution: hopeless node, do not search further here (bounding) 3. LP-relaxation has integral solution: this node is completely solved. 4. LP-relaxation upper bound larger than heuristic solution. Search further by splitting (branching) 44

Solving ILP by branch-and-bound Let x* be the best known feasible solution and let v(x*) be its objective value. 1. Select an active sub problem F i (unevaluated node) 2. Solve LP-relaxation of F i. If F i is infeasible: delete node and go to 1 3. Consider upper bound Z LP (F i ) from LP-relaxation and compute feasible solution x f ( e.g. by rounding) 1. If Z LP (F i ) v(x)* delete node 2. If v(x f ) > v(x*): update x* 3. If solution x LP to LP-relaxation is integral, then node finished, otherwise split node into two new active sub problems 4. Go to step 1 Optional This if for maximization problem. 45

Minimum spanning tree G=(N,E) N set of n nodes E set of m edges C e cost of edge e Tree is a subgraph without cycles Spanning tree is a tree containing all nodes Find a spanning tree with minimum cost 46

Modelling choice matters: Strength (quality) of an ILP formulation T set of feasible integral solutions For LP formulation F, P F is defined as the feasible set of solutions of F Ideal situation: P F is the convex hull of T Formulation A is stronger than formulation B if P P A B Hence, the bound from model A is stronger Most likely, solving the ILP by branch-and-bound will be faster 47

Modelling choice matters!!! LP hull A 48

Modelling choice matters: If you have an ILP formulation and it solves very slow, This may not be the final answer you might try an alternative one. 49

Cutting plane algorithm 50

Cutting plane algorithm 1. Solve the LP-relaxation. Let x* be an optimal solution. 2. If x* is integral, stop x* optimal solution to the integer linear programming problem. 3. If not, add a valid inequality that is not satisfied by x* and go to Step 1. To find such an inequality you have to solve separation problem. Valid inequality: linear constraint that is satisfied by all integral solutions. 51

Valid inequalities General Gomory cuts Problem specific 52

Solving LP-relaxation The Simplex method gives two types of variables: x B : basic variables, one for each constraint, can be nonzero (left-side in Dictionary) x N:non-basic variables, are zero (right-side in Dictionary) during the algorithm B changes step by step When running the Simplex method you find the following type of equations (are rows of the dictionary) for each x B: x i a io j N a ij x j x i j N a ij x j a io 53

LP:Geometric 3 2 x 2 5 2x 2x2 1 7 Gomory cut x 1 x2 1 54 1 x 1 0 (2 ¼, 5/4) 1 2 3 max 2x1 x2 x 2 0

Gomory cuts If solution is fractional, then at least one of the a is fractional Take row from final dictionary corresponding to fractional basic variable x i j N a ij x j a io with a io fractional Gomory cut x i j N a ij x j aio 55

Problem-specific valid inequalities Usually classes of inequalities Weighted independent set Cover inequalities for knapsack problems Finding valid inequalities is a combinatorial challenge 56

Branch-and-cut Combination of cutting planes and ILP solving by branchand-bound Applied in well-known ILP-solvers: CPLEX, GUROBI, EXPRES-MP COIN-OR 57

Solving ILP by branch-and-bound or branch-and-cut Let x* be the best known feasible solution Search strategy 1. Select an active sub problem F i (unevaluated node) 2. If F i is infeasible: delete node 3. Compute upper bound Z LP (F i ) by solving LP-relaxation and feasible solution x f (by rounding) How many cuts? Which If Z LP (F i ) value x* delete node (bounding) classes? If x f is better than x*: update x* If solution x LP to LP-relaxation is integral, Primal heuristic then If x LP is better than x*: update x* and node finished, otherwise split node into two new subproblems (branching) 4. Go to step 1 Branching strategy Optional This if for maximization problem, the book uses a minimization problem. 58

Branch-and-cut is a framework algorithm!! Last century, tailoring to your own problem was necessary in most cases and a huge amount of research has been undertaken in doing this: Pre-processing Classes of valid inequalities How many cuts in each node? Search strategy Branching strategy Primal heuristics Reduced cost fixing Now solvers like CPLEX and Gurobi successfully (and secretly) apply a lot of the above techniques. Tailoring of branch-and-cut sometimes successful, especially valid inequalities in case of a weak LPrelaxations 59

from http://www.lnmb.nl/conferences/2015/programlnmbconference/lnmb-ngb_bixby.pdf 60

61

World record exact TSP solving Branch-and-cut CONCORDE: http://www.math.uwaterloo.ca/tsp/concorde/index.html 62

Still we are talking about combinatorial optimization We have many, many, many variables Still large computation times Decomposition approaches often help Algorithmic challenges: you need clever algorithms that every now and then use LP-solvers as a component More in Scheduling and timetabling Advanced linear programming (Mastermath) 63