Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 6 – Integer Programming Models Topics General model Logic constraint Defining decision variables Continuous vs. integral solution Applications:

Similar presentations


Presentation on theme: "Lecture 6 – Integer Programming Models Topics General model Logic constraint Defining decision variables Continuous vs. integral solution Applications:"— Presentation transcript:

1 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 of the 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, then the IP is a binary IP (BIP)  Decision variables that are not required to be integer-valued are continuous 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 (FT) and part- timers (PT) –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 (this is a headcount constraint) Problem: Find minimum cost workforce

6 x t =# of full-time employees that begin the day at the start of interval t and work for 8 hours y t =# of part-time employees that are assigned interval t Min z =121.6( x 1 +  +x6+x6 ) + 51.8( y 1 +... +y6)+y6) Call Center Employee IP Model s.t. x 1 + x 6 + 5 6 y1y1  15 x1x1 + x 2 + 5 6 y2y2  10... x5x5 + x 6 + 5 6 y6y6  35 x 1 + x 6  2 3 (x1(x1 + x 6 + y 1 )... x5x5 + x 6  2 3 (x5(x5 + y 6 ) x t  0, y t  0, t = 1,2,…,6 Decision variables:

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 = 12,795.2 is a lower bound on integer optimum Hence, the rounded solution is no more than ( 12,916.8 – 12,795.2 12,795.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 Sometimes there is no “obvious” feasible solution that can be obtained by rounding The IP solution can be “far” from the LP rounded solution even when the rounded solution is feasible.                     optimal LP solution X1X1 X2X2 optimal IP solution iso-cost line   

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 subject to x j  0 and integer, j = 1,…,7; x 0 = x 7 Solve problem to get Minimum cost workforce

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 + M y f 2 ( x 1,…, x n )  b 2 + M (1 – y )

14 K out of N constraints must hold 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 N i =1  y i = K y i  {0, 1}, i = 1,…, 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 (Choice constraints for one region only) } 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 k =1 Min  h k ( x k ) where h k ( x k ) = { f k + c k x k if x k > 0 0 if x k = 0 f k = setup cost, c k = per unit cost IP formulation: Min n k =1  ( c k x k + f k y k ) s.t. x k  My k, k = 1,…, n y k  {0,1}, k = 1,…, n x k  0, k = 1,…, n

18 Example: Facility 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 fiyifiyi 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}, i = 1,…, m Satisfy each customer’s demand each warehouse can ship no more than its supply if it is built Facility Location IP Model

20 Example:Uncapacitated Facility Location Problem Problem:Open set of facilities & assign each customer to one facility such that cost is minimized. Cost could be a function of distance from facility to customer or could be based on a response time (e.g., locating fire stations).

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

22 Weak formulation Min s.t. x ij  {0,1}, y i  {0,1}  i  I, j  J x ij must be 0 for all j  J if y i = 0; up to n of the x ij can be 1 if y i = 1. {  Not computationally efficiency   x ij = 1,  j  J iIiI   x ij  ny i,  i  I jJjJ iIiI i  I j  J  c ij x ij +  f i y i

23 Mathematically Equivalent Strong Formulation Min s.t.   x ij = 1,  j  J Each customer is assigned to exactly one facility Setup constraint Can assign customer j to facility i only if we open facility i. iIiI iIiI i  I j  J x ij  y i,  i  I, j  J x ij  {0,1} y i  {0,1},  i  I, j  J  c ij x ij +  f i y i

24 3 crews, each must be assigned a sequence of flights that begins and ends in Dallas ( DFW ) Each flight leg must be covered Possible tours Set Covering Problem (Airline Crew Scheduling) 123456789101112 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 Leg

25 Formulation (Set covering problem) Min 2 x 1 + 3 x 2 + 4 x 3 + … + 8 x 11 + 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 but only 1 crew works (all get paid).  1   side constraint

26 Traveling Salesman Problem (TSP) 1 4 3 2 Problem:Find minimum distance tour that starts at city 1, visits every other city exactly once, and returns to city 1.

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 Add Subtour Elimination Constraints Let S 1 = {1,3} and 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 are an exponential number of subtour elimination constraints. 2 5 6 9

30 Sequencing problems with sequence-dependent setup 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 was just tested and which type will be tested next. Change-Over Times IC Type 1234 1 -- 101715 220 -- 1918 35044--25 44540 20-- IC Type

31 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

32 If the cycle is repeated, IC1  IC3  IC2  IC4  IC1... then the total change-over time for one cycle is 17 + 44 + 18 + 45 = 124. 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.

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.


Download ppt "Lecture 6 – Integer Programming Models Topics General model Logic constraint Defining decision variables Continuous vs. integral solution Applications:"

Similar presentations


Ads by Google