1 / 36

Lecture 6 – Integer Programming Models

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. Linear Integer Programming - IP.

halen
Download Presentation

Lecture 6 – Integer Programming Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 = c1x1 + c2x2 +    + cnxn } { £ s.t. ai1x1 + ai2x2 +    + ainxn 0 £xj£uj, j = 1,…,n xj integer for some or all j =1,…,n bi, i = 1,…,m ³ =

  3. Decision Variables in IP Models · 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

  4. Why study integer programming? • The 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. Call Center Employee IP Model Decision variables: xt = # of full-time employees that begin the day at the start of interval t and work for 8 hours yt = # of part-time employees that are assigned interval t . . . . . . Min z = 121.6(x1 + +x6 ) + 51.8(y1 + +y6) 5 ³ s.t. x1 + x6 + y1 15 2 6 x1 + x6³ (x1 + x6 + y1) 3 5 . . ³ x1 + x2 + y2 10 . 6 . 2 . ³ . x5 + x6 (x5 + x6 + y6) 3 5 ³ x5 + x6 + y6 35 6 xt³ 0, yt³ 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 Feasible – Yes, Optimal? We do not know!

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

  9. X2    optimal LP solution         X1 iso-cost line optimal IP solution             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.

  10. The Days-Off Scheduling Problem Each employee works 5 days per week and is given 2 consecutive days off [ (5,7)-cycle problem] cj = weekly cost of pattern j per employee ri = number of employees required on day i xj = number of employees assigned to days-off pattern j Note: There are 7 days-off patterns; i, j = 1,…,7 Pattern i has days i and i + 1off. For example, pattern 3 would be: (Mon, Tue, off, off, Thu, Fri, Sat, Sun)  (1, 1, 0, 0, 1, 1, 1)

  11. Days-Off Mathematical Model subject to xj 0 and integer, j = 1,…,7; x0 = x7 Solve problem to get Minimum cost workforce

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

  13. Logic Constraints Either-orconstraints Either f1(x1,…,xn) £b1 or f2(x1,…,xn) £b2 or both IP formulation Let yÎ {0,1}; M = “large” number f1(x1,…,xn) £b1 + My f2(x1,…,xn) £b2 + M(1 – y) y = 0  first constraint must hold y = 1  second constraint must hold Optimization process will choose the y value.

  14. Kout ofN constraints must hold N constraints f1(x1,…,xn) £b1  fN(x1,…,xn) £bN f1(x1,…,xn) £b1 + M(1 – y1)  fN(x1,…,xn) £bN + M(1 – yN) At least K out of N must be satisfied. N Syi = K i=1 yiÎ {0, 1}, i = 1,…,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) f1(x1,…,xn) £b1 + M(1 –y1) f2(x1,…,xn) £b2 + M(1 –y1) } Region 1 constraints f3(x1,…,xn) £b3 + M(1 –y2) f4(x1,…,xn) £b4 + M(1 –y2) } Region 2 constraints f5(x1,…,xn) £b5 + M(1 –y3) f6(x1,…,xn) £b6 + M(1 –y3) } Region 3 constraints y1 + y2 + y3 = 1,y1, y2, y3Î {0,1}

  17. IP formulation: n å (cjxj + fjyj) Min j=1 xj£Myj, j = 1,…,n yjÎ {0,1}, j = 1,…,n xj³ 0, j = 1,…,n s.t. Fixed-Charge Problem Min åhj(xj), where hj(xj) ={ n fj + cjxj if xj > 0 0 if xj = 0 j=1 and fj = setup cost, cj = per unit cost

  18. Example:Facility Location Problem A company hasm potential warehouse sites and n customers Data: dj : demand for customer j si : capacity (supply) of warehouse i Decision variables: yi: build a warehouse at site i (1 = yes, 0 = no) xij : shipments from warehouse i to customer j

  19. Facility Location IP Model m n m å å å cijxij + fiyi Min j =1 i =1 i =1 m åxij =djj = 1,…,n s.t. Satisfy each customer’s demand i =1 n åxij£siyii = 1,…,m each warehouse can ship no more than its supply if it is built j =1 xij³ 0,i = 1,…,m, j = 1,…,n yiÎ {0,1}, i = 1,…,m

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

  21. Notation Indices/Sets potential facility locations, iÎI with |I| = m customers, jÎJ with |J| = n Data fi : cost of opening a facility at location i cij : cost of assigning customer j to facility i Decision variables yi : open facility at location i (1 = yes, 0 = no) xij : assign customer j to location i (1 = yes, 0 = no)

  22. Weak Formulation å å cijxij + å fiyi Min iÎI iÎIjÎJ åxij = 1, "j Î J s.t. iÎI if yi = 0, xij must be 0 for all j ÎJ; if yi = 1, up to n of the xij can be 1. åxij£nyi, "iÎ I jÎJ xijÎ {0,1}, yiÎ {0,1} "iÎ I, jÎ J  Not computationally efficient

  23. Mathematically Equivalent Strong Formulation å å cijxij + å fiyi Min iÎI iÎIjÎJ Each customer is assigned to exactly one facility Setup constraint åxij = 1, "jÎJ s.t. iÎI xij£yi, "i Î I, jÎ J xijÎ {0,1} yiÎ {0,1} , "iÎ I, jÎ J Can assign customer j to facility ionly if we open facility i.

  24. Set Covering Problem (Airline Crew Scheduling) • 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 Leg 1 2 3 4 5 6 7 8 9 10 11 12 DFW  LAX 1 1 1 1 DFW DEN 1 1 1 1 1 1 1 1 DFW  SEA 2 2 3 2 3 LAX  CHI LAX DFW 2 3 5 5 CHI  DEN 3 3 4 CHI  SEA 3 3 3 3 4 DEN  DFW 2 4 4 5 2 2 DEN  CHI 2 5 4 4 SEA  DFW 2 2 4 4 SEA  LAX 2 2 Cost ($10000) 2 3 4 6 7 5 7 8 9 9 8 9 Decision variables xj (j =1,…,12) assign a crew to tour j (1 = yes, 0 = no)

  25. Formulation (set covering problem) … 2x1 + 3x2 + 4x3 + + 8x11 + 9x12 Min s.t. ³ 1 (DFW  LAX) x1 + x4 + x7 + x10 x2 + x5 + x + x11 ³ 1 (DFW  DEN) 8 x3 + x + x9 + x ³ 1 (DFW  SEA) 6 12 x4 + x7 + x9 + x + x12 ³ 1 (LAX  CHI) 10 x1 + x6 + x + x ³ 1 (LAX  DFW) 10 11    x6 + x9 x10 + x + x12 (SEA  LAX) ³ 1 + 11 … x1 + + + x2 x12 (assign 3 crews) = 3 xjÎ {0,1}, j = 1,…,12 side constraint Allows “dead heading”; i.e., multiple crews fly on 1 leg but only 1 crew works (all get paid).

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

  27. Decision variables xij = 1 if tour includes arc (i, j ) = 0 otherwise Initial formulation + . . . + 20x41 + 45x42 + 40x43 Min 50x12 + 44x13 + 25x14 s.t. x + x + x = 1 12 13 14 xijÎ {0,1}, i¹j x + x + x = 1 21 31 41 x + x + x = 1 21 23 24 1 x + x + x = 1 . 42 12 32 . . 4 2 x + x + x = 1 41 42 43 x + x + x = 1 3 34 14 24 This is incomplete because subtours are possible.

  28. Subtour Elimination Constraints Let S1 = {1,3} and S2 = {2,4} and require at least 1 arc from S1 to S2 x12 + x14 + x32 + x34³ 1 Disallows the “2 loop” solution. Alternative formulation: x13 + x31£ 1andx24 + x42£ 1 To generalize, let N = {1,…,n}, and let SN SEC: Sxij£ |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: x25 + x26 + x29 + x52 + x56 + x59 + x62 + x65 + x69 + x92 + x95 + x96£ 4 – 1 = 3 6 2 5 9 In general, there are an exponential number ofsubtour elimination constraints.

  30. Changeover Times IC type 1 2 3 4 -- 1 10 17 15 2 20 19 18 -- IC type 3 50 44 -- 25 20 -- 4 45 40 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 changeover time depends on what type of IC was just tested and which type will be tested next.

  31. Graph for IC Testing Example 1 0 Dummy node 2 44 0 17 0 3 18 4 Sample path: 0  1  3  2  4  0 Cost of path: 0 + 17 + 44 + 18 + 0 = 79

  32. If the cycle is repeated, • IC1  IC3  IC2  IC4  IC1 . . . • then the total changeover time for one cycle is • 17 + 44 + 18 + 45 = 124 [arc (4,1) added]. • 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: fj(xj), 0 xjuj Let r = number of grid points Let (dij, fij) be ith grid point, i = 1,…,r

  34. Linear Transformation for jth Variable r i=1 Let xj = Si dij and fj(xj) = Si fij where S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

  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 a1 ≤ y1 ai ≤ yi-1+ yi, i = 2,…,r–1 ar ≤ yr-1 y1 + y2 + · · · + yr-1 = 1 yi = 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.

More Related