Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 6 – Integer Programming Models

Similar presentations


Presentation on theme: "Lecture 6 – Integer Programming Models"— 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 J. Bard and J. W. Barnes Operations Research Models and Methods Copyright All rights reserved 8/14/04

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

4 Why study IP? 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 Call Center Employee IP Model
Decision variables: xt = # of full-time employees that work shift t yt = # of part-time employees that work shift t Min z = 121.6(x1 + +x6 ) (y1 + +y6) 5 s.t. x6 + x1 + y1 15 6 5 2 x1 + x2 + y2 10 x6 + x1 (x6 + x1 + y1) 6 3 . . . . . . 5 2 x5 + x6 + y6 35 x5 + x6 (x5 + x6 + y6) 3 6 xt ³ 0, yt ³ 0, t = 1,2, …,6

7 Optimal LP solution Feasible – Yes, Optimal? We do not know!
x = [ 7.06, 0, 40, , , ] y = [ 0, 3.53, 0, , 0, 0 ] z = 12, 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 ( )  100% = 0.95% How good is this solution? from the optimum.
z * = is a lower bound on integer optimum Hence, the rounded solution is no more than LP ( )  100% = 0.95% from the optimum. Optimal solution is x = ( 10, 0, 40, 20, 20, 5 ) z*IP = 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.

9 Sometimes there is no “obvious” feasible solution that can be obtained by rounding
X2  optimal LP solution X1 iso-cost line optimal IP solution 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 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

11 Days-Off Mathematical Model
7 j =1 Minimize z =  cjxj subject to (  xj ) – xi – xi-1  ri , i = 1,…7 xj  0 and integer, j = 1,…,7; x0 = x7 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 f1(x1,…,xn) £ b1
or f2(x1,…,xn) £ b2 or both. IP formulation Let y Î {0,1} 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 K out of N constraints must hold
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 S yi = 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 } Region 1 constraints } Region 2 constraints } Region 3 constraints
Compound Alternatives 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 Min å fj(xj) where fj(xj) = {
Fixed-Charge Problem n Min å fj(xj) where fj(xj) = { kj + cjxj if xj > 0 if xj = 0 j =1 kj = set-up cost, cj = per unit cost IP formulation: n Min å (cjxj + kjyj ) j =1 s.t. xj £ Myj , j = 1,…,n yj Î {0,1} , j = 1,…,n xj ³ 0 , j = 1,…,n

18 Example: Warehouse Location Problem
A company has m 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 : shipment from warehouse i to customer j

19 Warehouse Location IP Model
å å Min cijxij + å kiyi i =1 j =1 i =1 m å xij = dj j = 1,…,n s.t. Satisfy each customer’s demand i =1 n å xij £ siyi i = 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}, j = 1,…,m

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 Data Decision Variables
potential facility location, j Î J with |J | = n customers to be served, i Î I with |I | = m Data kj : cost of opening a facility at location j cij : cost of serving customer i from facility j Decision Variables yj : open facility at location j (1 = yes, 0 = no) xij : assign customer i to location j (1 = yes, 0 = no)

22 Strong Formulation å å cijxij + å kjyj å xij = 1, " i Î I Min
iÎI jÎJ jÎJ Each customer assigned to exactly one facility Forcing constraint å xij = 1, " i Î I s.t. jÎJ xij £ yj , " i Î I, j Î J xij , yj Î {0,1} , " i Î I, j Î J Can assign customer i to facility j only if we open facility j.

23 { Mathematically Equivalent Weak formulation å å cijxij + å kjyj
Min iÎI jÎJ jÎJ å xij = 1, " i Î I s.t. jÎJ { xij must be 0 for all iÎI if yj = 0; up to |I |xij can be 1 if yj = 1. å xij £ |I |yj , j Î J iÎI xij, yj Î {0,1} " i Î I, j Î J  Less computational efficiency

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

25 Decision Variables Initial Formulation
xij = 1 if tour includes arc (i, j ) = 0 otherwise Initial Formulation Min 50x12 + 44x13 + 25x14 20x41 + 45x42 + 40x43 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 12 . . 32 42 . 2 4 x + x + x = 1 41 42 43 x + x + x = 1 3 14 24 34 This is incomplete because subtours are allowed.

26 Add Subtour Elimination Constraints
Let S1 = {1,3} & 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 £ 1 and x24 + x42 £ 1 To generalize, let N = {1,…,n}, and let S  N SEC: S xij £ |S| – 1, 2 £ |S| £ n/2 (ij)S

27 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 exponentially many subtour elimination constraints.

28 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 1 2 3 4 -- 10 17 15 20 19 18 50 44 25 45 40

29 If the order of testing is
IC1  IC2  IC4  IC3  IC 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)

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

31 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

32 Linear Transformation for jth Variable
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

33 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

34 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"

Similar presentations


Ads by Google