Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 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 General model Logic constraint Defining decision variables Continuous vs. integral solution Applications: staff scheduling, fixed charge, TSP Piecewise linear approximations to nonlinear functions

2 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 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 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 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 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 ) + 51.8( y 1 +  +y6)+y6) Call Center Employee IP Model s.t. x6x6 + x 1 + 5 6 y1y1  15 x1x1 + x 2 + 5 6 y2y2  10... x5x5 + x 6 + 5 6 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 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 8 How good is this solution? z  LP = 12795.2 is a lower bound on integer optimum Hence, the rounded solution is no more than ( 12916.8 – 12795.2 12795.2 )  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 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 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 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 12 Compact Mathematical Model Minimize z = cx subject to x  0 and integer

13 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 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 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 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 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 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 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 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 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 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 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 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) Tour123456789101112 DFW  LAX1111 DFW  DEN1111 DFW  SEA 11 1 1 LAX  CHI 22323 LAX  DFW 2 3 55 CHI  DEN334 CHI  SEA 33334 DEN  DFW2445 DEN  CHI 2 2 2 SEA  DFW2 44 5 SEA  LAX 2 Cost ($10000)234675789989 Decision Variables x j ( j =1,…,12) assign a crew to tour j (1 = yes, 0 = no) 2 44 2

25 25 Formulation (Set covering problem) Min2x12x1 +3x23x2 +4x34x3 + … +8 x 12 +9 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 26 Traveling Salesman Problem (TSP) 1 4 3 2 Problem:Find minimum distance tour that starts at a city, visits every other city exactly once, and returns to the initial city

27 27 Decision Variables x ij = 1 if tour includes arc ( i, j ) = 0 otherwise Initial Formulation Min50 x 12 +44 x 13 + 25 x 14 +... +20 x 41 +45 x 42 +40 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. = 1 1 3 2 4

28 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 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. 2 5 6 9

30 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 1234 1 -- 101715 220 -- 1918 35044--25 44540 20-- IC Type

31 31 If the order of testing is IC1  IC2  IC4  IC3  IC1... The total change-over time for one cycle is 10 + 18 + 20 + 50 = 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 32 Graph for IC Testing Example Dummy node Sample path: 0  1  3  2  4  0 Cost of path: 0 + 17 + 44 + 18 + 0 = 79 44 17 18 0 0 4 3 2 0 1

33 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 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 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 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


Download ppt "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."

Similar presentations


Ads by Google