8/14/04 J. Bard and J. W. Barnes Operations Research Models and Methods Copyright 2004 - All rights reserved Lecture 6 – Integer Programming Models Topics.

Slides:



Advertisements
Similar presentations
Thursday, April 11 Some more applications of integer
Advertisements

1 Material to Cover  relationship between different types of models  incorrect to round real to integer variables  logical relationship: site selection.
BU Decision Models Integer_LP1 Integer Optimization Summer 2013.
Chapter 3 Workforce scheduling.
1 Lecture 3 MGMT 650 Sensitivity Analysis in LP Chapter 3.
CSCI 573 Linear and Mixed Integer Programming Sven Koenig.
Progress in Linear Programming Based Branch-and-Bound Algorithms
Vehicle Routing & Scheduling: Part 1
McGraw-Hill/Irwin © The McGraw-Hill Companies, Inc., Integer Programming.
Integer Programming 3 Brief Review of Branch and Bound
Math443/543 Mathematical Modeling and Optimization
1 Mathematical Programming Integer Programming. 2 Common Types of IP’s and IP Constraints Two common types of IP’s –#1: Capital budgeting –#2: Set covering.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
INTRODUCTION TO LINEAR PROGRAMMING
Review of Reservoir Problem OR753 October 29, 2014 Remote Sensing and GISc, IST.
The Problem with Integer Programming H.P.Williams London School of Economics.
Introduction to Mathematical Programming OR/MA 504 Chapter 5 Integer Linear Programming.
1 Lecture 4 Maximal Flow Problems Set Covering Problems.
1.3 Modeling with exponentially many constr.  Some strong formulations (or even formulation itself) may involve exponentially many constraints (cutting.
Chapter 7 Integer Programming Models
Linear Programming Topics General optimization model LP model and assumptions Manufacturing example Characteristics of solutions Sensitivity analysis Excel.
Spreadsheet Modeling & Decision Analysis:
Types of IP Models All-integer linear programs Mixed integer linear programs (MILP) Binary integer linear programs, mixed or all integer: some or all of.
Spreadsheet Modeling and Decision Analysis, 3e, by Cliff Ragsdale. © 2001 South-Western/Thomson Learning. 6-1 Integer Linear Programming Chapter 6.
Integer Programming Key characteristic of an Integer Program (IP) or Mixed Integer Linear Program (MILP): One or more of the decision variable must be.
MODELING AND ANALYSIS OF MANUFACTURING SYSTEMS Session 12 MACHINE SETUP AND OPERATION SEQUENCING E. Gutierrez-Miravete Spring 2001.
15.082J and 6.855J and ESD.78J Lagrangian Relaxation 2 Applications Algorithms Theory.
Operational Research & ManagementOperations Scheduling Workforce Scheduling 1.Days-Off Scheduling 2.Shift Scheduling 3. Cyclic Staffing Problem (& extensions)
Workforce scheduling – Days off scheduling 1. n is the max weekend demand n = max(n 1,n 7 ) Surplus number of employees in day j is u j = W – n j for.
Notes 5IE 3121 Knapsack Model Intuitive idea: what is the most valuable collection of items that can be fit into a backpack?
Lecture 3 – Classic LP Examples Topics Employee scheduling problem Energy distribution problem Feed mix problem Cutting stock problem Regression analysis.
Lecture 6 – Integer Programming Models Topics General model Logic constraint Defining decision variables Continuous vs. integral solution Applications:
Chapter 1. Formulations 1. Integer Programming  Mixed Integer Optimization Problem (or (Linear) Mixed Integer Program, MIP) min c’x + d’y Ax +
Chap 10. Integer Prog. Formulations
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Two Discrete Optimization Problems Problem: The Transportation Problem.
Integer Linear Programming Terms Pure integer programming mixed integer programming 0-1 integer programming LP relaxation of the IP Upper bound O.F. Lower.
1 INTRODUCTION TO LINEAR PROGRAMMING CONTENTS Introduction to Linear Programming Applications of Linear Programming Reference: Chapter 1 in BJS book.
Branch-and-Cut Valid inequality: an inequality satisfied by all feasible solutions Cut: a valid inequality that is not part of the current formulation.
Lecture 5 – Integration of Network Flow Programming Models Topics Min-cost flow problem (general model) Mathematical formulation and problem characteristics.
1 System Planning 2013 Lecture 7: Optimization Appendix A Contents: –General about optimization –Formulating optimization problems –Linear Programming.
Integer Programming (정수계획법)
8/14/04J. Bard and J. W. Barnes Operations Research Models and Methods Copyright All rights reserved Lecture 5 – Integration of Network Flow Programming.
Integer Programming Definition of Integer Programming If requiring integer values is the only way in which a problem deviates from.
Lecture 6 – Integer Programming Models Topics General model Logic constraint Defining decision variables Continuous vs. integral solution Applications:
Management Science 461 Lecture 3 – Covering Models September 23, 2008.
IE 312 Review 1. The Process 2 Problem Model Conclusions Problem Formulation Analysis.
Introduction to Integer Programming Integer programming models Thursday, April 4 Handouts: Lecture Notes.
EMGT 5412 Operations Management Science
EMIS 8373: Integer Programming Combinatorial Optimization Problems updated 27 January 2005.
Discrete Optimization MA2827 Fondements de l’optimisation discrète Material from P. Van Hentenryck’s course.
0 Integer Programming Introduction to Integer Programming (IP) Difficulties of LP relaxation IP Formulations Branch and Bound Algorithms Reference: Chapter.
Linear Programming Topics General optimization model
Introduction to Operations Research
Lecture 5 – Integration of Network Flow Programming Models
Traveling Salesman Problem
Linear Programming Topics General optimization model
Integer Programming II
Lecture 5 – Integration of Network Flow Programming Models
1.3 Modeling with exponentially many constr.
Linear Programming Topics General optimization model
Linear Programming Topics General optimization model
Integer Programming (정수계획법)
Chapter 1. Formulations (BW)
1.3 Modeling with exponentially many constr.
Integer Programming (정수계획법)
Lecture 6 – Integer Programming Models
Chapter 1. Formulations.
REVIEW FOR EXAM 1 Chapters 3, 4, 5 & 6.
Lecture 12 Network Models.
Presentation transcript:

8/14/04 J. Bard and J. W. Barnes Operations Research Models and Methods Copyright All rights reserved Lecture 6 – Integer Programming Models Topics General model Logic constraint Defining decision variables Continuous vs. integral solution Applications: staff scheduling, fixed charge, TSP Piecewise linear approximations to nonlinear functions

2 Linear Integer Programming - IP Maximize/Minimize z = c 1 x 1 + c 2 x 2 +    + c n x n {    } b i, i = 1,…, m s.t. a i 1 x 1 + a i 2 x 2 +    + a in x n 0  x j  u j, j = 1,…, n x j integer for some or all j =1,…, n

3  An IP is a mixed integer program (MIP) if some but not all decision variables are integer.  If all decision variables are integer we have a pure IP.  A binary decision variable must be 0 or 1 (a yes-no decision variable).  If all decision variables are binary the IP is a binary IP (BIP)  Decision variables not integer-constrained are continuous decision variables Decision Variables in IP Models

4 Why study IP? (1)LP divisibility assumption (fractional solutions are permissible) is not always valid. (2)Binary variables allow powerful new techniques like logical constraints.

5 Call Center Employee Scheduling Day is divided into 6 periods, 4 hours each Demand/period = (15, 10, 40, 70, 40, 35) Workforce consists of full-timers and part-timers –FT = 8-hour shift, $121.6/ shift –PT = 4-hr shift, $51.8/shift One PT = 5/6 FT In any period, at least 2/3 of the staff must be FT employees Problem: Find minimum cost workforce

6 Decision variables: x t = # of full-time employees that work shift t y t = # of part-time employees that work shift t Min z =121.6( x 1 +  +x6+x6 ) ( y 1 +  +y6)+y6) Call Center Employee IP Model s.t. x6x6 + x y1y1  15 x1x1 + x y2y2  x5x5 + x y6y6  35 x6x6 + x 1  2 3 (x6(x6 + y 1 )... x5x5 + x 6  2 3 (x5(x5 + y 6 ) x t  0, y t  0, t = 1,2, …,6

7 Optimal LP solution x = [ 7.06, 0, 40, 12.94, 27.06, 7.94 ] y = [ 0, 3.53, 0, 20.47, 0, 0 ] z = 12,795.2 Not feasible to IP model A correction method: round continuous solution x = [ 8, 0, 40, 13, 27, 8 ] y = [ 0, 3, 0, 21, 0, 0 ] z = 12,916.8 We do not know! Feasible – Yes, Optimal? We do not know!

8 How good is this solution? z  LP = is a lower bound on integer optimum Hence, the rounded solution is no more than ( – )  100% = 0.95% from the optimum. x = ( 10, 0, 40, 20, 20, 5 ) y = ( 10, 0, 0, 12, 0, 12 ) z * IP = 12,795.2 Optimal solution is Here the optimal LP and IP objective functions have the same value. This is not commonly true.

9 Sometimes there is no “obvious” feasible solution that can be obtained by rounding                     optimal LP solution X1X1 X2X2 optimal IP solution iso-cost line    The IP solution can be “far” from the LP rounded solution even when the rounded solution is feasible.

10 The Days-Off Scheduling Problem Each employee works 5 days per week and is given 2 consecutive days off [ (5,7)-cycle problem] c j =weekly cost of pattern j per employee r i =number of required on day i x j =number of employees assigned to days-off pattern j Note: There are 7 days-off patterns; i, j = 1,…,7

11 Days-Off Mathematical Model Minimize z =  c j x j subject to (  x j ) – x i – x i -1  r i, i = 1,…7 x j  0 and integer, j = 1,…,7; x 0 = x 7 7 j =1 7 j =1 Solve problem to get x * j Minimum cost workforce W =  x * j 7 j =1

12 Compact Mathematical Model Minimize z = cx subject to x  0 and integer

13 Logic Constraints Either-Or Constraints Either f 1 ( x 1,…, x n )  b 1 or f 2 ( x 1,…, x n )  b 2 or both. IP formulation y = 0  first constraint must hold y = 1  second constraint must hold Optimization process will choose the y value. Let y  {0,1} f 1 ( x 1,…, x n )  b 1 + My f 2 ( x 1,…, x n )  b 2 + M (1 – y )

14 K out of N constraints must hold N i =1  y i = K y i  {0, 1}, i = 1,…, N At least K out of N must be satisfied N constraints f 1 ( x 1,…, x n )  b 1  f N ( x 1,…, x n )  b N f 1 ( x 1,…, x n )  b 1 + M (1 – y 1 )  f N ( x 1,…, x n )  b N + M (1 – y N )

15 Example of K out of N Constraints A production system has N potential quality control inspection strategies Management has decided that K of these strategies should be adopted

16 Compound Alternatives } Region 1 constraints } Region 2 constraints } Region 3 constraints y 1 + y 2 + y 3 = 1, y 1, y 2, y 3  {0,1} f 1 ( x 1,…, x n )  b 1 + M (1 – y 1 ) f 2 ( x 1,…, x n )  b 2 + M (1 – y 1 ) f 3 ( x 1,…, x n )  b 3 + M (1 – y 2 ) f 4 ( x 1,…, x n )  b 4 + M (1 – y 2 ) f 5 ( x 1,…, x n )  b 5 + M (1 – y 3 ) f 6 ( x 1,…, x n )  b 6 + M (1 – y 3 )

17 Fixed-Charge Problem n j =1 Min  f j ( x j ) where f j ( x j ) = { k j + c j x j if x j > 0 0 if x j = 0 k j = set-up cost, c j = per unit cost IP formulation: Min n j =1  ( c j x j + k j y j ) s.t. x j  My j, j = 1,…, n y j  {0,1}, j = 1,…, n x j  0, j = 1,…, n

18 Example: Warehouse Location Problem A company has m potential warehouse sites and n customers Data: d j : demand for customer j s i : capacity (supply) of warehouse i Decision variables: y i : build a warehouse at site i ? (1 = yes, 0 = no) x ij : shipment from warehouse i to customer j

19 Min m  i =1 n  j =1 c ij x ij + m  i =1 kiyikiyi s.t. m i =1  x ij = d j j = 1,…, n n j =1  x ij  s i y i i = 1,…, m x ij  0, i = 1,…, m, j = 1,…, n y i  {0,1}, j = 1,…, m Satisfy each customer’s demand each warehouse can ship no more than its supply if it is built Warehouse Location IP Model

20 Example: Facility Location Problem (with forcing constraints) Problem:open set of facilities & assign each customer to one facility at minimum cost. No shipping here: Cost of assigning customers to facilities could be based on a response time (e.g., locating fire stations).

21 Indices/Sets potential facility location, j  J with | J | = n customers to be served, i  I with | I | = m Data k j : cost of opening a facility at location j c ij : cost of serving customer i from facility j Decision Variables y j : open facility at location j (1 = yes, 0 = no) x ij : assign customer i to location j (1 = yes, 0 = no)

22 Strong Formulation Min s.t.   x ij = 1,  i  I Each customer assigned to exactly one facility Forcing constraint Can assign customer i to facility j only if we open facility j. jJjJ jJjJ i  I j  J x ij  y j,  i  I, j  J x ij, y j  {0,1},  i  I, j  J  c ij x ij +  k j y j

23 Mathematically Equivalent Weak formulation Min s.t. x ij, y j  {0,1}  i  I, j  J x ij must be 0 for all i  I if y j = 0; up to | I | x ij can be 1 if y j = 1. {  Less computational efficiency   x ij = 1,  i  I jJjJ   x ij  | I | y j, j  J iIiI jJjJ i  I j  J  c ij x ij +  k j y j

24 3 crews, each must be assigned a sequence of flights that begins and ends in Dallas ( DFW ) Each flight segment must be covered Possible tours Set Covering Problem (Airline Crew Scheduling) Tour DFW  LAX1111 DFW  DEN1111 DFW  SEA LAX  CHI LAX  DFW CHI  DEN334 CHI  SEA DEN  DFW2445 DEN  CHI SEA  DFW SEA  LAX 2 Cost ($10000) Decision Variables x j ( j =1,…,12) assign a crew to tour j (1 = yes, 0 = no)

25 Formulation (Set covering problem) Min2x12x1 +3x23x2 +4x34x3 + … +8 x x 12 s.t. x1x1 + x4x4 + x7x7 + x 10 (DFW  LAX) x2x2 + x5x5 + x 8 + x 11 (DFW  DEN) x3x3 + x 6 + x9x9 + x 12 (DFW  SEA) x4x4 + x7x7 + x9x9 + x 10 + x 12 (LAX  CHI) x1x1 + x6x6 + x 10 + x 11 (LAX  DFW)  x6x6 + x9x9 + x 10 + x 11 + x 12  1 (SEA  LAX) x1x1 + x2x2 + … + x 12 = 3 (assign 3 crews) x j  {0,1}, j = 1,…,12 Allows “dead heading” ; i..e., multiple crews fly on 1 leg. Only 1 crew works (all get paid).  1   side constraint

26 Traveling Salesman Problem (TSP) Problem:Find minimum distance tour that starts at a city, visits every other city exactly once, and returns to the initial city

27 Decision Variables x ij = 1 if tour includes arc ( i, j ) = 0 otherwise Initial Formulation Min50 x x x x x x 43 s.t. x 12 + x 13 + x 14 = 1 x 21 + x 31 + x 41 = 1 x 21 + x 23 + x 24 = 1 x 12 + x 32 + x 42 = 1... x 41 + x 42 + x 43 = 1 x 14 + x 24 + x 34 x ij  {0,1}, i  j This is incomplete because subtours are allowed. =

28 Add Subtour Elimination Constraints Let S 1 = {1,3} & S 2 = {2,4} and require at least 1 arc from S 1 to S 2 x 12 + x 14 + x 32 + x 34  1 Disallows the “2 loop” solution. Alternative formulation: x 13 + x 31  1 and x 24 + x 42  1 To generalize, let N = {1,…, n }, and let S  N SEC:  x ij  | S | – 1, 2  | S |  n /2 (ij)  S

29 Example of SEC Let n = 10 and S = { 2, 5, 6, 9 }. Then | S | = 4. SEC: x 25 + x 26 + x 29 + x 52 + x 56 + x 59 + x 62 + x 65 + x 69 + x 92 + x 95 + x 96  4 – 1 = 3 In general, there exponentially many subtour elimination constraints

30 Sequencing problems with sequence-dependent set-up times can be modeled as a TSP Testing integrated circuits (ICs): A machine is used to test several batches of ICs of differing types. After each batch the machine must be reset. The change-over time depends on what type of IC we just tested and what we’ll test next. Change-Over Times IC Type IC Type

31 If the order of testing is IC1  IC2  IC4  IC3  IC1... The total change-over time for one cycle is = 98 The goal is to sequence the testing order so that the throughput (i.e., minimize cycle time) is maximized for fixed batch sizes (Note that in this example the “travel times” are not symmetric)

32 Graph for IC Testing Example Dummy node Sample path: 0  1  3  2  4  0 Cost of path: =

33 General Piecewise Linear Approximations Given: f j ( x j ), 0  x j  u j Let r = number of grid points Let ( d ij, f ij ) be i th grid point, i = 1,…, r

34 Linear Transformation for j th Variable Let x j =   i d ij and f j ( x j ) =   i f ij where   i = 1,  i  0, i = 1,…,r Not sufficient to guarantee solution is on one of the line segments. r i =1 r i =1 r i =1

35 Additional Constraints for Piecewise Linear Approximation Requirement:No more than two  i can be positive; also  i ’ s must be adjacent; i.e.,  i and  i+1  1 ≤ y 1  i ≤ y i -1 + y i, i = 2,…,r–1  r ≤ y r -1 y 1 + y 2 + · · · + y r -1 = 1 y i = 0 or 1, i = 1,...,r–1

36 What you Should Know about Integer Programming How to convert a problem statement in an IP model How to define the decision variables How to convert logic statements into constraints How to formulation fixed charge problems, scheduling problems, covering problems,TSP, piece- wise linear approximation to nonlinear functions