Fundamentals of Integer Programming

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

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

Algorithms for Decision Support. Integer linear programming models

5.3 Cutting plane methods and Gomory fractional cuts

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

3 INTEGER LINEAR PROGRAMMING

Mathematical Tools for Engineering and Management

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

Advanced Use of GAMS Solver Links

Unit.9 Integer Programming

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

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

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

DETERMINISTIC OPERATIONS RESEARCH

Integer and Combinatorial Optimization

TIM 206 Lecture Notes Integer Programming

THEORY OF LINEAR AND INTEGER PROGRAMMING

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

SUBSTITUTING GOMORY CUTTING PLANE METHOD TOWARDS BALAS ALGORITHM FOR SOLVING BINARY LINEAR PROGRAMMING

The MIP-Solving-Framework SCIP

GENERAL ASSIGNMENT PROBLEM via Branch and Price JOHN AND LEI

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

NOTATION AND TERMINOLOGY

Linear Programming. Linear Programming. Linear Programming. Example: Profit Maximization (1/4) Iris Hui-Ru Jiang Fall Linear programming

AMPL Integer Linear Programming. ORLAB Operations Research Laboratory. Borzou Rostami. Politecnico di Milano, Italy.

Methods and Models for Combinatorial Optimization Exact methods for the Traveling Salesman Problem

Modelling of LP-problems (2WO09)

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

COMP9334: Capacity Planning of Computer Systems and Networks

SUBSTITUTING GOMORY CUTTING PLANE METHOD TOWARDS BALAS ALGORITHM FOR SOLVING BINARY LINEAR PROGRAMMING

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

Approximation Algorithms

Integer Programming Theory

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

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

Column Generation: Cutting Stock

Research Interests Optimization:

Solving lexicographic multiobjective MIPs with Branch-Cut-Price

AMPL Integer Linear Programming And Sensitivity Analysis for LP. ORLAB Operations Research Laboratory. Borzou Rostami. Politecnico di Milano, Italy

Minimum Weight Constrained Forest Problems. Problem Definition

Integer Programming Chapter 9

Combinatorial Optimization

Optimization Methods in Management Science

The Heuristic (Dark) Side of MIP Solvers. Asja Derviskadic, EPFL Vit Prochazka, NHH Christoph Schaefer, EPFL

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

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

Algorithms for Integer Programming

Approximation Algorithms

Tutorial on Integer Programming for Visual Computing

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

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

LECTURE NOTES Non-Linear Programming

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

Approximation Algorithms

Machine Learning for Software Engineering

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

Exact Algorithms for Mixed-Integer Bilevel Linear Programming

Exploiting Degeneracy in MIP

11. APPROXIMATION ALGORITHMS

Lecture 3. Corner Polyhedron, Intersection Cuts, Maximal Lattice-Free Convex Sets. Tepper School of Business Carnegie Mellon University, Pittsburgh

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

A branch-and-cut approach to solve the Hamiltonian Cycle Problem. Marco Colombo

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

7KH9HKLFOH5RXWLQJSUREOHP

Selected Topics in Column Generation

Integer Programming and Network Modeis

Cutting Planes for Some Nonconvex Combinatorial Optimization Problems

Benders in a nutshell Matteo Fischetti, University of Padova

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

Pivot and Gomory Cut. A MIP Feasibility Heuristic NSERC

Integer Programming! Using linear programming to solve discrete problems

Modern Benders (in a nutshell)

Math Models of OR: The Simplex Algorithm: Practical Considerations

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

Approximation Algorithms: The Primal-Dual Method. My T. Thai

BCN Decision and Risk Analysis. Syed M. Ahmed, Ph.D.

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

A Steady-State Genetic Algorithm for Traveling Salesman Problem with Pickup and Delivery

Integer Programming: Algorithms - 2

Motivation for Heuristics

Towards Efficient Higher-Order Semidefinite Relaxations for Max-Cut

How to use your favorite MIP Solver: modeling, solving, cannibalizing. Andrea Lodi University of Bologna, Italy

Using COIN-OR to Solve the Uncapacitated Facility Location Problem

Heuristics in MILP. Group 1 D. Assouline, N. Molyneaux, B. Morén. Supervisors: Michel Bierlaire, Andrea Lodi. Zinal 2017 Winter School

Theorem 2.9: nearest addition algorithm

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

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

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

Benders Decomposition

Implementing a B&C algorithm for Mixed-Integer Bilevel Linear Programming

INTEGER AND MIXED- INTEGER OPTIMIZATION

Some Advanced Topics in Linear Programming

AMATH 383 Lecture Notes Linear Programming

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

Combinatorial Auctions: A Survey by de Vries and Vohra

CS599: Convex and Combinatorial Optimization Fall 2013 Lecture 1: Introduction to Optimization. Instructor: Shaddin Dughmi

Linear Programming CISC4080, Computer Algorithms CIS, Fordham Univ. Linear Programming

Branch-price-and-cut for vehicle routing. Guy Desaulniers

4 LINEAR PROGRAMMING (LP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

DM515 Spring 2011 Weekly Note 7

Transcription:

Fundamentals of Integer Programming Di Yuan Department of Information Technology, Uppsala University January 2018

Outline Definition of integer programming Formulating some classical problems with integer programming Linear programming Solution methods for integer programming (Introduction to modeling language and solver) Impact of modeling on problem solving 2

Definition of Integer Programming Optimization and Programming Mathematical programming: to find the best solution from a set of alternatives A generic formulation: max f(x) min s. t. x 2 X Variables Objective function Solution set The variables (their values) represent problem solution The solution set is specified by equations and inequalities 3

Definition of Integer Programming Binary Knapsack A set of items, each with a value and weight A knapsack with a weight capacity limit Select items to maximize the total value of the knapsack, without exceeding the weight limit $12 2 kg $24 3 kg $11 2.5 kg $10 1 kg $30 4 kg $25 5 kg 4

Definition of Integer Programming Types of Optimization Models max f(x) min s. t. g i (x)» b i ; i = 1; : : : ; m Linear programming Integer (linear) programming Nonlinear programming Integer nonlinear programming 5

Definition of Integer Programming Generic Model of Mixed Integer (Linear) Programming (MIP) Special case: binary variables 6

Modeling Some Classical Problems with Integer Programming Coloring Assign a color to each vertex (node); two adjacent vertexes must use different colors Minimize the total number of colors used 7

Modeling Some Classical Problems with Integer Programming Coloring (cont d) How to define the variables and constraints? De ne color set C ² x ic = 1 if node i has color c ² y c = 1 if color c is used (by any node) 1 2 8

Modeling Some Classical Problems with Integer Programming Set Covering Candidate service centers and demand points Each service center has a deployment cost, and can serve a subset of the demand points Select a subset of service centers at minimum total cost, to cover all demand points 9

Modeling Some Classical Problems with Integer Programming Set Covering (cont d) ² J: Set of demand points ² I: Candidate set of service centers ² I j : Subset of service centers covering point j 2 J ² c i : Deployment cost, i 2 I ² x i = 1 if i 2 I is deployed X min c i x i s. t. X i2i x i 1; 8j 2 J i2i j x 2 f0; 1g 10

Modeling Some Classical Problems with Integer Programming Uncapacitated Facility Location A set of candidate facility (e.g., warehouse) locations A set of customers Opening a facility has a fixed charge Transportation cost between facility locations and customers 11

Modeling Some Classical Problems with Integer Programming Uncapacitated Facility Location (cont d) ² I: Candidate set of facility locations ² J: Set of customers ² f i : Fixed charge, i 2 I ² c ij : Transportation cost, i 2 I; j 2 J ² x ij = 1 if facility i 2 I serves customer j ² y i = 1 if facility i 2 I is deployed 12

Modeling Some Classical Problems with Integer Programming Traveling Salesman Problem Find a tour visiting each node in a graph exactly once with minimum length 13

Modeling Some Classical Problems with Integer Programming Traveling Salesman Problem (cont d) How to formulate this problem by integer programming? ² x ij = 1 if city j is visited immediately after city i (i 6= j) X X min c ij x ij i2n j2n:j6=i X s. t. x ij = 1; 8i 2 N j2n:j6=i x 2 f0; 1g Have we overlooked anything? X X i2s j2nns x ij 1; 8S ½ N Potential drawback of the formulation? 14

Linear Programming A Small Example x 2 5 x 1 5 15

Linear Programming Linear Programming Relaxation Relaxation: removal of some constraints/restrictions In general, the linear programming relaxation is an approximation of the integer model; the solution of the former may be fractional Which one is easier to solve? 16

Linear Programming Solving a Linear Programming Model Fundamental property: Optimum is located at one of the extreme/corner points (why?) This is used by the Simplex Method for solving linear programs (visiting a sequence of objective-improving extreme points) There are other efficient, interior-point methods 17

Linear Programming The Convex Hull Convex hull: The minimum convex set containing the solution space Integer programming = linear programming on the convex hull of the integer points Convex hull exists, but its description is hard to derive in general 18

Solution Methods for Integer Programming Computing the Global Optimum General-purpose method: Linear programming relaxation + Iterative improvement in approximating the convex hull, a.k.a. cutting planes Divide-and-conquer, a.k.a. branch-and-bound LP optimum LP optimum Optimality gap: The (relative) difference between the objective value of the best known integer solution and that of the best ( optimistic ) LP bound so far 19

Solution Methods for Integer Programming Cutting Planes: An Example Knapsack problem instance: LP optimum: x 1 = x 5 = x 6 = x 7 = 1, x 4 = 0:167, x 2 = x 3 = 0 Can we pack items 1, 4, 6, and 7 all in the knapsack? (5+6+6+5=22) The above inequality (referred as a cover cut ) is valid for integer solutions, but violated by the LP relaxation optimum 20

Solution Methods for Integer Programming Cutting Planes: An Example (cont d) Adding the cut to the linear programming relaxation: LP optimum: x 4 = x 5 = x 6 = x 7 = 1, x 1 = x 2 = x 3 = 0 Challenge: To time-efficiently find valid and useful cuts 21

Solution Methods for Integer Programming Branch-and-Bound: An Example Same knapsack problem instance: max 6x 1 + 4x 2 + 6x 3 + 7x 4 + 5x 5 + 9x 6 + 8x 7 s. t. 5x 1 + 6x 2 + 8x 3 + 6x 4 + 4x 5 + 6x 6 + 5x 7 21 x 2 f0; 1g LP optimum: x 1 = x 5 = x 6 = x 7 = 1, x 4 = 0:167, x 2 = x 3 = 0 Rounding down x 4 to zero gives an integer solution of value 28 ) Integer optimum is at least 28 22

Solution Methods for Integer Programming Branch-and-Bound: An Example (cont d) Branching generates a search tree Opt. gap =? L P = 2 8. 6 6 x 2 = 0 : 1 6 7 L P = 2 8. 7 5 x 3 = 0 : 1 2 5 x 4 = 0 x 4 = 1 x 3 = 0 x 3 = 1...... L P = 29. 16 Opt. gap =? x 4 = 0 : 167 ( o n e f r a c t i o n a l v a r i a b l e ) L P = 2 5. 5 x 5 = 0 : 5 Integer, value 29 Opt. gap =? We can stop branching here if the integer solution of value 29 is known (why?) Can we stop branching here because of an integer solution of value 28? 23

Introduction to Modeling Language and Solver Optimization Solver Solver: software implementing methods for solving optimization models (here: integer programming models) Interface + optimization engine knapsack.lp 24

Introduction to Modeling Language and Solver Another Sample of Solver Log for Integer Programming 25

Introduction to Modeling Language and Solver Modeling Language: Separation between Model and Data knapsack.mod knapsack6.dat 26

Introduction to Modeling Language and Solver Command Script: An Example 27

Introduction to Modeling Language and Solver Modeling System + Solver Command script - Model and data specification - Solver options - Display options - etc. Model Modeling system Data - Sets - Parameters - Variables - Objective function - Constraints Solver - Set elements - Parameter values Result analysis Feasible solution? Optimal solution? Optimum and variable value Solution time etc. 28

Introduction to Modeling Language and Solver AMPL Basics: Sets Simple sets (numbers or symbols) Indexed collection of sets 29

Introduction to Modeling Language and Solver AMPL Basics: Parameters Scalar parameter and parameters for set elements Bounds and default value Symbolic parameters 30

Introduction to Modeling Language and Solver AMPL Basics: Variables Similar to declaration of numerical parameters May have value and/or type restrictions 31

Introduction to Modeling Language and Solver AMPL Basics: Objective Function and Constraints Integer linear programming: The objective is a linear expression of the variables Single constraint Indexed collections of constraints (with condition) 32

Introduction to Modeling Language and Solver AMPL Basics: A Complete Model for Set Covering X min s. t. X i2i c i x i x i 1; 8j 2 J i2i j x 2 f0; 1g 33

Impact of Modeling on Problem Solving Uncapacitated Facility Location Can we reduce the model size? 34

Impact of Modeling on Problem Solving Uncapacitated Facility Location (cont d) Facilities Customers Aggregated Model Disaggregate Model (seconds) (seconds) 20 200 1.19 0.39 30 50 70 300 500 700 5.55 69.67 2362.67 1.6 19.42 764.30 AMPL Version 20060626 (Linux 2.6.9-5.EL)... Node log... Best integer = 1.433808e+05 Node = 0 Best node = 1.687869e+04 Best integer = 2.293498e+04 Node = 0 Best node = 1.687869e+04 Heuristic still looking. Heuristic still looking. Heuristic complete. Best integer = 2.276127e+04 Node = 828 Best node = 1.831542e+04 Best integer = 2.267411e+04 Node = 1000 Best node = 1.838685e+04 Implied bound cuts applied: 2292 Flow cuts applied: 18... Times (seconds): Solve = 2362.67 CPLEX 10.1.0: optimal integer solution within mipgap or absmipgap; objective 22674.11 1048766 MIP simplex iterations 16865 branch-and-bound nodes AMPL Version 20060626 (Linux 2.6.9-5.EL)... Node log... Best integer = 4.704366e+04 Node = 0 Best node = 2.203318e+04 Best integer = 2.295632e+04 Node = 0 Best node = 2.203318e+04 Heuristic still looking. Best integer = 2.267411e+04 Node = 0 Best node = 2.203529e+04 Heuristic complete. Gomory fractional cuts applied: 3 Using devex. Times (seconds): Solve = 764.304 CPLEX 10.1.0: optimal integer solution; objective 22674.11 157501 MIP simplex iterations 36 branch-and-bound nodes 35

Impact of Modeling on Problem Solving Coloring De ne color set C ² x ic = 1 if node i has color c ² y c = 1 if color c is used (by any node) 1 2 - Symmetry: Solution search becomes inefficient - Alternative model of set-covering type Is this a good formulation? Other formulations? 36

Impact of Modeling on Problem Solving Coloring (cont d) Sample results for an extension of graph coloring: Nodes Model I (previous slide) Model II (not shown) Best Solution Time Best Solution Time 10 10 0.1s 10 0.1s 20 16 1s 16 3s 30 21 10h 21 7s 40 15 10h 15 32s 50 28 10h 23 1m19s 60 31 10h 26 4m31s It may matter (a lot) which model you use 37