#### Transcript Distance Measures

Facility Location • Logistics Management • Factors that Affect Location Decisions • Distance Measures • Classification of Planar Facility Location Problems • Planar Single-Facility Location Problems – Minisum Location Problem with Rectilinear Distances – Minisum Location Problem with Euclidean Distances – Minimax Location Problem with Rectilinear Distances – Minimax Location Problem with Euclidean Distances • Planar Multi-Facility Location Problems – Minisum Location Problem with Rectilinear Distances Logistics Management • Logistics Management can be defined as the management of the transportation and distribution of goods. The term goods includes raw materials or subassemblies obtained from suppliers as well as finished goods shipped from plants to warehouses or customers. • Logistics management problems can be classified into three categories: – Location Problems: involve determining the location of one or more new facilities in one or more of several potential sites. The cost of locating each new facility at each of the potential sites is assumed to be known. It is the fixed cost of locating a new facility at a particular site plus the operating and transportation cost of serving customers from this facility-site combination. – Allocation Problems: assume that the number and location of facilities are known a priori and attempt to determine how each customer is to be served. In other words, given the demand for goods at each customer center, the production or supply capacities at each facility, and the cost of serving each customer from each facility, the allocation problem determines how much each facility is to supply to each customer center. – Location-Allocation Problems:involve determining not only how much each customer is to receive from each facility but also the number of facilities along with their locations and capacities. Factors that Affect Location Decisions • • • • • • • • • • • • • • • • • • • Proximity to source of raw materials. Cost and availability of energy and utilities. Cost, availability, skill, and productivity of labor. Government regulations at the federal, state, county, and local levels. Taxes at the federal, state, county, and local levels. Insurance. Construction costs and land price. Government and political stability. Exchange rate fluctuation. Export and import regulations, duties, and tariffs. Transportation system. Technical expertise. Environmental regulations at the federal, state, county and local levels. Support services. Community services - schools, hospitals, recreation, and so on. Weather. Proximity to customers. Business climate. Competition-related factors. Distance Measures • Rectilinear distance (L1 norm) Pi = (ai, bi) – d(X, Pi) = |x - ai| + |y - bi| X = (x, y) • Straight line or Euclidean distance (L2 norm) – d(X, Pi) = Pi = (ai, bi) (x - a i ) 2 + (y - b i ) 2 • Tchebyshev distance (L norm) X = (x, y) Pi = (ai, bi) – d(X, Pi) = max{|x - ai|, |y - bi|} X = (x, y) Classification of Planar Facility Location Problems # of facilities Objectives Distance measures Rectilinear Minisum Euclidean Tchebyshev SingleFacility Rectilinear Minimax Euclidean Tchebyshev Facility Location Rectilinear Minisum Euclidean Tchebyshev MultiFacility Rectilinear Minimax Euclidean Tchebyshev Planar Single-Facility Location Formulations • Minisum Formulation : m Min f(x) = w i d X, Pi i 1 where X = (x, y) : location of the new facility Pi = (ai, bi) : location of the i-th existing facility, i = 1, …, m wi : weight associated to the i-th existing facility ti For example, wi = c i , vi where ci : cost per hour of travel, ti : number of trips per month, vi : average velocity. • Minimax Formulation : Min f(x) = Max i = 1, …, m {wi d(X, Pi)} Min z s. t. wi d(X, Pi) z, i = 1, …, m Insights for the Minisum Problem with Euclidean Distance Hole P2 P1 Horizontal pegboard P3 P5 String P4 w5 w1 w2 w3 w4 Weight proportional to wi • Majority Theorem : When one weight constitutes a majority of the total weight, an optimal new facility location coincides with the existing facility which has the majority weight. Minisum Location Problem with Rectilinear Distances m Min f(x, y) = w i [|x a i | |y b i |] i=1 Note that f(x, y) = f1(x) + f2(y) m where w i |x a i | f1(x) = i=1 m f2(y) = w i |y b i | i=1 The cost of movement in the x direction is independent of the cost of movement in the y direction, and viceversa. Now, we look at the x direction. f1(x) is convex a local min is a global min. Minisum Location Problem with Rectilinear Distances (cont.) • The coordinates of the existing facilities are sorted so that a1 a2 a3 …. • Now, we consider the case of m = 3. Case x a1 : f1(x) = w1 |a1 - x| + w2 |a2 - x| + w3 |a3 - x| = - (w1 + w2 + w3)x + w1 a1 + w2 a2 + w3 a3 = - W x + w1 a1 + w2 a2 + w3 a3, where W = w1 + w2 + w3 Case a1 x a2 : f1(x) = w1 |a1 - x| + w2 |a2 - x| + w3 |a3 - x| = (w1 - w2 - w3)x - w1 a1 + w2 a2 + w3 a3 = (- W + 2 w1) x - w1 a1 + w2 a2 + w3 a3 … Objective Function f1(x) f1(x) - w1 - w2 - w3 The slope changes sign w1 + w2 + w3 w1 - w2 - w3 w1 + w2 - w3 w1 w2 w3 a1 a2 a3 x Minisum Location Problem with Rectilinear Distances (cont.) • Slopes of f1(x) : M0 = - (w1 + w2 + w3) = - W M1 = 2 w1 + M0 M2 = 2 w2 + M1 M3 = 2 w3 + M2 = w1 + w2 + w3 = W • Median conditions : f1(x) is minimized at the point where the slope changes from nonpositive to nonnegative. M1 = w1 - w2 - w3 < 0 2 w1 < (w1 + w2 + w3) = W w1 < W/2 M2 = w1 + w2 - w3 0 2 (w1 + w2) (w1 + w2 + w3) = W (w1 + w2) W/2 Example 1 • Problem Data : m=3 a1 = 10 a2 = 20 a3 = 40 w1 = 5 w2 = 6 w3 = 4 • Solution : W = w1 + w2 + w3 = 15 W/2 = 7.5 w1 = 5 < 7.5 w1 + w2 = 11 > 7.5 Minimizing point : a2 = 20 Linear Programming Formulation Min f1(x) = w1 |a1 - x| + w2 |a2 - x| + w3 |a3 - x| Min z = w1 (r1+ s1) + w2 (r2+ s2) + w3 (r3+ s3), s. t. x - r 1 + s1 x - r 2 + s2 x Dual variables = a1, = a2, : y1 : y2 - r3+ s3 = a3, : y3 rj, sj 0, j = 1, 2, 3. • Relationships among variables : aj - x = rj - sj , |aj - x| = rj + sj, rj, sj 0. • If both rj, sj > 0, we can reduce each by j = min {rj, sj}. • This maintains feasibility and reduces z In an optimal solution, at least one of the rj and sj is 0, i. e., rj sj = 0. Linear Programming Formulation (cont.) • Dual Problem : Max g = - a1y1 - a2 y2 - a3 y3 + (w1 a1 + w2 a2 + w3 a3) s. t. y1 + y2 + y3 = w1 + w2 + w3 = W 0 yj 2 wj, j = 1, 2, 3 Min a1y1 + a2 y2 + a3 y3 s. t. y1 + y2 + y3 = W 0 yj 2 wj, j = 1, 2, 3 0 y1 2 w1 a1 0 y2 2 w2 W 1 • Complementary slackness conditions : 0 < yj* < 2 wj x* = aj a2 a3 0 y3 2 w3 a1 a2 a3 W 2 Example 1 : Dual Solution • f1(x) = 5 |x - 10| + 6 |x - 20| + 4 |x - 40| • W = 15 0 y1 10 10 0 y2 12 15 1 20 40 0 y3 8 y1* = 10 y2* = 5 y3* = 0 0 < y2* < 12 x* = a2 = 20 15 2 Minisum Location Problem with Euclidean Distances m 1 2 2 w i [(x a i ) (y b i ) ] • Min f(x, y) = i=1 2 (ai, bi) The optimum location is always in the convex hull of {(a1, b1), …, (am, bm)} • Colinear case : all the points are in a line (ai, bi) The problem reduces to minimizing f1(x), which is the rectilinear distance problem. Non-colinear Case 1 2 2 • The graph of [(x a i ) (y bi ) ] is a cone (strictly convex function). 2 1 2 2 y [(x a i ) (y bi ) ] 2 contours (ai, bi) x (ai, bi, 0) y m x 1 2 2 • f(x, y) = w i [(x a i ) (y bi ) ] is strictly convex unless the convex i=1 hull is a line segment. 2 Non-colinear Case (cont.) • First order optimality conditions : f(x, y) 0 x x 0 f(x, y) 0 y y (x0, y0) is optimal 0 • Any point where the partial derivatives are zero is optimal. Let i (x, y) wi m and 1 2 2 [(x a i ) (y bi ) ] 2 (x, y) i (x, y) i 1 Non-colinear Case (cont.) f(x, y) m i (x, y) (x - a i ) = 0 i=1 x f(x, y) m i (x, y) (y - b i ) = 0 i=1 y m x a i i (x, y) i=1 (x, y) m y b i i (x, y) i=1 (x, y) No-colinear Case (cont.) • If the optimal solution is in an exiting facility (ai, bi), then i (x, y) . • A simple way to avoid the problem of division by zero is to “perturb” the problem as follows : m Min f(x, y) w i [(x a i ) (y b i ) ] 2 2 1 2 i 1 f(x,y) where > 0 and small. f(x,y) is flat near the optimum. x (x*,y*) y Weiszfeld’s Algorithm 1 m Initialization : (i) (x , y ) (a i , bi ) m i 1 0 or 0 1 m w (a i , bi ), (ii) (x , y ) W i 1 i 0 0 where m Iterative step (k = 1, 2, …) : xk = a i i (x k-1 , y k-1 ) i=1 (x k-1 , y k-1 ) m yk = Terminating conditions : b i i (x k-1 , y k-1 ) i=1 (x k-1 , y k-1 ) (i) (x k , y k ) - (x k-1 , y k-1 ) or (ii) f(x k-1 , y k-1 ) - f(x k , y k ) W = w1 + ... + w m Example 2 Problem Data : m=4 P1 = (0, 0) w1 = 1 P2 = (0, 10) w2 = 1 P3 = (5, 0) w3 = 1 P4 = (12, 6) w4 = 1 Solution : x0 = (5+12)/4 = 4.25 y0 = (10+6)/4 = 4 k (x, y) f(x, y) 1 4.023, 3.116 24.808 2 3.949, 2.647 24.665 5 3.958, 2.124 24.600 10 3.995, 2.011 24.597 Optimum 4.000, 2.000 Minimax Location Problem with Rectilinear Distances • Possible example : locating an ambulance with the existing facilities being the locations of possible accidents. Hospital Hospital P1 h1 h3 P3 X P2 P4 h4 Hospital : h2 Hospital Poss. Accident : Ambulance : Minimax Location Problem with Rectilinear Distances (cont.) • Notation EF (existing facilities) locations : Pi = (ai, bi), i = 1, …, m NF (new facility = ambulance) location : X = (x, y) Travel distance from EF i to the nearest hospital = hi, i = 1, …, m Travel distance from NF to EF i = |x - ai| + |y - bi| • Formulation : Min where Min s. t. g(x, y) g(x, y) = max {|x - ai| + |y - bi| + hi : i = 1, …, m} z |x - ai| + |y - bi| + hi z, i = 1, …, m Minimax Location Problem with Rectilinear Distances (cont.) Make the intersection as small as possible with the largest diamond as small as possible. • We want to make the inequalities linear (3) (2) (1) (4) |x - ai| + |y - bi| z - hi x - ai + y - bi z - hi ai - x + bi - y z - hi ai - x + y - bi z - hi x - ai + b i - y z - h i (1) (2) (3) (4) Minimax Location Problem with Rectilinear Distances (cont.) Min z x + y - z ai + bi - hi, s. t. i = 1, ..., m x + y + z ai + bi + hi, i = 1, ..., m - x + y - z - ai + bi - hi, i = 1, ..., m - x + y + z - ai + bi + hi, i = 1, ..., m Min s. t. z x + y - z c1 where c1 = Min {ai + bi - hi} i = 1, ..., m x + y + z c2 c2 = Max {ai + bi + hi} - x + y - z c3 c3 = Min {- ai + bi - hi} - x + y + z c4 c4 = Max {- ai + bi + hi} i = 1, ..., m i = 1, ..., m i = 1, ..., m Minimax Location Problem with Rectilinear Distances (cont.) Min z s. t. - x - y + z - c1 x + y + z c2 x - y + z - c3 - x + y + z c4 c5 = Max {c2 - c1, c4 - c3} z (c2 - c1)/2 (lower bound) z (c4 - c3)/2 (lower bound) z = c5/2 Optimal solution : (x1, y1, z1) = 1/2 (c1 - c3, c1 + c3 + c5, c5) (x2, y2, z2) = 1/2 (c2 - c4, c2 + c4 - c5, c5) The line segment joining (x1, y1) and (x2, y2) is the set of optimal NF locations Minimax Location Problem with Euclidean Distances • Examples : helicopter in an emergency unit, radio transmitter (x, y) (ai, bi) EF : (ai, bi), i = 1, …, m NF : (x, y) min g(x, y) where g(x, y) = max {[(x - ai)2 + (y - bi)2]1/2, i = 1, …, m} min z s. t. [(x - ai)2 + (y - bi)2]1/2 z, min z s. t. (x - ai)2 + (y - bi)2 z , i = 1, …, m i = 1, …, m Elzinga-Hearn Algorithm (1971) Step 1. Choose any two points and go to Step 2. Step 2. Find the minimum covering circle for the chosen points*. Discard from the set of chosen points those points not defining the minimum covering circle, and go to Step 3. Step 3. If the constructed circle contains all the points, then the center of the circle is a minimax location, so stop. Otherwise, choose some point outside the circle, add it to the set of points defining the circle, and go to Step 2. * Find the minimum covering circle for the chosen points : A. If there are two points, let the two points define the diameter of the circle. B. If there are three points defining a right or obtuse triangle, let the two points opposite to the right or obtuse angle define the diameter of the circle. Otherwise, construct a circle through the three points (see Figure 1). C. If there are four points, construct a circle using as defining points those indicated in Figure 2. Elzinga-Hearn Algorithm (cont.) Defining points : Defining points : Defining points : ABD BCD CD Defining points : C BD A Defining points : A Defining points : B BD ACD A Defining points : Defining points : B B C AD Defining points : ABD Defining points : AD ABD Figure 1. Alternative B Figure 2. Alternative C Planar Multi-Facility Location Problems P1 P4 w24 w11 X2 X1 v12 w23 P2 w12 P3 Old Facility : New Facility : Minisum Multi-Facility Location Problem with Rectilinear Distances Location of new facilities: Xj = (xj, yj), j = 1, …, n. Location of existing facilities: Pi = (ai, bi), i = 1, …, m. Weight between new facilities j and k: vjk, where k > j. Weight between new facility j and existing facility i: wji. Problem formulation: Min f((x1,y1), …, (xn, yn)) = f1(x1, …, xn) + f2(y1, …, yn) where f1(x1, …, xn) = f2(y1, …, yn) = n m v jk x j x k w ji x j a i v jk y j y k w ji y j bi 1 j k n 1 j k n j1 i 1 n m j1 i 1 Example 3 • Problem Data : n = 2 (NF) m = 3 (EF) 0 2 v = [vjk] = 0 0 2 1 0 w = [wji] = 4 0 5 x = [xj] = (x1, x2) a = [aj] = (10, 20, 40) Min f1(x1, x2) = 2 |x1 - x2| + 2 |x1 - 10| + |x1 - 20| Min f1(x1, x2) = 2 (p12 + q12) + 2 (r11 + s11) + (r12 + s12) s. t. + 4 |x2 - 20| + 4 (r21 + s21) + 5 (r23 + s23) x1 - x2 - p12 + q12 x1 =0 - r11 + s11 x1 = 10 - r12 + s12 x2 = 20 - r21 + s21 x2 • + 5 |x2 - 40| = 10 - r23 + s23 Relationships among variables : x1 - x2 = p12 - q12, |x1 - x2| = p12 + q12, p12, q12 0 xi - aj = rij - sij, |xi - aj| = rij + sij, rij, sij 0 = 40 Example 3 (Dual Problem) Max (- 10 u11 - 20 u12 - 10 u21 - 40 u23) + (102 + 201 + 104 + 405) Min 10 u11 + 20 u12 + 10 u21 + 40 u23 s. t. z12 + u11 + u12 =5 - z12 + u21 + u23 =7 0 z12 4 0 u11 4 0 u12 2 0 u21 8 0 u23 10 w ji 2 1 0 4 0 5 wi v jk 0 2 2 0 w v ji 5 7 12 jk Equivalent Network Flow Problem E1 (10) u11 4 (0) 4 5 N1 8 12 (0) (0) 1 u12 2 Cap = (20) z12 4 u21 8 Cap = E2 N3 (0) 7 N2 u23 10 (40) Cap = (0) E3 After drawing the network, the solution can be usually obtained by inspection. 12 Equivalent Network Flow Problem (cont.) Complementary slackness conditions : 1. xk* xj* zjk* < 2 vjk xj* xk* 0 < zjk* In particular, 0 < zjk* < 2 vjk xj* = xk* 2. ai xj* uji* < 2 wji xj* ai 0 < uji* In particular, 0 < uji* < 2 wji xj* = ai In Example 3, 0 < z12* < 2 v12 x1* = x2*, 0 < u12 = 2 w12 x2* = a1 = 10. If the network is not connected, then the problem decomposes into independent problems, one for each component. Example 4 Four hospitals located within a city are cooperating to establish a centralized blood-bank facility that will serve the hospitals. The new facility is to be located such that the (total) distance traveled is minimized. The hospitals are located at the following coordinates: P1=(5,10), P2=(7,6), P3=(4,2), and P4=(16,3). The number of deliveries to be made per week between the blood-bank facility and each hospital is estimated to be 3, 8, 2, and 10, respectively. Assuming rectilinear travel, determine the optimum location. m=4 P1 = (5, 10) P3 = (4, 2) Computation of x*: a3 = 4 a1 = 5 a2 = 7 a4 = 16 Computation of y*: b3 = 2 b4 = 3 b2 = 6 b1 = 10 w1 = 3 w3 = 2 P2 = (7, 6) P4 = (16, 3) w2 = 8 w4 = 10 w3 = 2 w1 = 3 w2 = 8 w4 = 10 w3 = 2 w3 + w1 = 5 w3 + w1 + w2 = 13 x* = w3 = 2 w4 = 10 w2 = 8 w1 = 3 w3 = 2 w3 + w4 = 12 y* = W= Example 5 (10, 16) 16 h4 = 11 Find the optimal location of an ambulance with respect to four (known) possible 14 accident locations which coordinates are P1=(6,11), P2=(12,5), P3=(14,7), and P4=(10,16). The objective is to minimize 12 (6, 11) the maximum distance from the ambulance location to an accident location and from 10 h1 = 10 (12, 9) the accident location to its closest hospital. The distances from the accident locations 8 to their closest hospitals are h1=10, h2=16, (14, 7) h3=14, and h4=11. Assume that distances are rectilinear. If multiple optima exist, (10, 7) 6 h3 = 14 (12, 5) find all optimal solutions. h2 = 16 (5, 4) 6 8 10 12 14 Example 5 Solution m=4 P1 = (6, 11) P3 = (14, 7) h1 = 10 h3 = 14 P2 = (12, 5) P4 = (10, 16) h2 = 16 h4 = 11 c1 = min {ai + bi - hi} = min {6+11-10, 12+5-16, 14+7-14, 10+16-11} = c2 = max {ai + bi + hi} = max {6+11+10, 12+5+16, 14+7+14, 10+16+11} = c3 = min {-ai + bi - hi} = min {-6+11-10, -12+5-16, -14+7-14, -10+16-11} = c4 = max {-ai + bi + hi} = max {-6+11+10, -12+5+16, -14+7+14, -10+16+11} = c5 = max (c2 - c1, c4 - c3}= max { - , - }= Optimal objective value: c z* = 5 2 Set of optimal solutions: line segment defined by the following end points: 1 (c1 - c3, c1 + c3 + c5) = 2 1 (x2*, y2*) = (c2 - c4, c2 + c4 - c5) = 2 (x1*, y1*) = 1 ( 2 1 ( 2 - , + + - , + - )=( )=( , , ) ) Example 6 Given five existing facilities located at points P1, P2, P3, P4, and P5 as shown below, determine the optimum location for a new facility which will minimize the maximum distance to the existing facilities. Assume that distances are Euclidean. Elzinga-Hearn algorithm: Figure 1 : Initial set of points = {P1, P2, P3}; center = C1. Figure 2 : 2nd set of points = {P1, P2, P4}; center = C2. Figure 3 : 3rd set of points = {P2, P4, P5}; center = C3 (optimal location). Figure 1 P3 P5 P2 P1 C1 P1 P2 P3 P4 Figure 2 P4 P5 P2 P1 C2 P3 P2 P1 P4 Figure 3 P4 P5 P2 P1 C3 P3 P1 P5 P4