IE 312-5.1-Location Problem Basic Models-Continuous II
IE 312-5.1-Location Problem Basic Models-Continuous II
U. MAHİR YILDIRIM
Next Week
Techniques for Continuous Space Location Problem
Rectilinear
Median Gravity Squared Euclidean
Method Method
Euclidean
Weiszfeld Contour Line
Method Method
3
Continuous Space Location Problem
Weiszfeld Method
The objective function for the single facility location problem with Euclidean distance
can be written as:
Min TC = ci f i (xi − x ) 2
+ ( yi − y ) 2
𝑦ത instead of 𝑥 ∗ and 𝑦 ∗ in this approach
as we will use additional superscripts
i =1 later on.
4
Continuous Space Location Problem
Weiszfeld Method (cont'd)
TC 1 m wi 2(xi − x )
x
=
2 i =1 (xi − x ) 2 + (y i − y) 2
m m
wi xi wi x
= − =0
i =1 (xi − x ) 2 + (y i − y) 2 i =1 (xi − x ) 2 + (y i − y) 2
m
wi xi
i =1 (xi − x ) 2 + (y i − y) 2
x = m
wi
i =1 (xi − x ) 2 + (y i − y) 2
5
Continuous Space Location Problem
Weiszfeld Method (cont'd)
TC 1 m wi 2(y i − y)
=
y 2 i =1 (xi − x ) 2 + (y i − y) 2
m m
wi yi wi y
= − =0
i =1 (xi − x ) + (y i − y)
2 2
i =1 (xi − x ) + (y i − y)
2 2
m
wi yi
i =1 (xi − x ) 2 + (y i − y) 2
y = m
wi
i =1 (xi − x ) 2 + (y i − y) 2
6
Continuous Space Location Problem
Weiszfeld Method (cont'd)
Then what?
m
wi yi
m
wi xi
i =1 (xi − x ) 2 + (y i − y) 2 i =1 (xi − x ) 2 + (y i − y) 2
x = m
y = m
wi
wi
(xi − x ) + (y i − y)
i =1
2 2
i =1 (xi − x ) 2 + (y i − y) 2
7
Why not start with a guess?
m
wi yi
m
wi xi
Step 1: Set
i =1 (xi − x ) + (y i − y )
k 2 k 2
i =1 (xi − x k ) 2 + (y i − y k ) 2
x k +1 = m
; y k +1 = m
wi wi
(xi − x k ) 2 + (y i − y k ) 2
i =1 i =1 (xi − x k ) 2 + (y i − y k ) 2
Convergence to the optimal solution is guaranteed (if we do not round the numbers!) 9
Recall the Previous Example
• A test station is to be added to an Initialize 𝑥ҧ and 𝑦.
ത Set iteration counter 𝑘 = 1
existing plant. The numbers of loads
per day from the existing 4 stations Gravity method: 𝑥lj 1 = 5.60, 𝑦lj 1 = 4.90
are given in the table below
• Find the optimal location of the test Calculate 𝑥ҧ 2 and 𝑦ത 2
station if the distance is measured by
the Euclidean metric. 𝑥lj 2 = 5.64, 𝑦lj 2 = 6.35
10
Solution (cont'd)
𝒌 𝒙𝒌 𝒚𝒌 𝒌 𝒙𝒌 𝒚𝒌 𝒌 𝒙𝒌 𝒚𝒌
1
2
3
5.60
5.64
5.47
4.90
5.46
5.68
1
2
3
5.600
5.642
5.468
4.900
5.462
5.685
1
2
3
5.6000
5.6423
5.4681
4.9000
5.4621
5.6846
Convergence
4 5.33 5.82 4 5.327 5.821 4 5.3269 5.8208
5 5.23 5.90 5 5.227 5.904 5 5.2275 5.9037 𝒚𝒌
6 5.16 5.95 6 5.159 5.949 6 5.1592 5.9489
7 5.11 5.97 7 5.113 5.971 7 5.1131 5.9714
8 5.08 5.98 8 5.082 5.982 8 5.0818 5.9825
Difference
9 5.06 5.99 9 5.060 5.988 9 5.0604 5.9883
10 5.05 5.99 10 5.045 5.992 10 5.0452 5.9918
11 5.03 5.99 11 5.034 5.994 11 5.0343 5.9940
12 5.03 6.00 12 5.026 5.996 12 5.0263 5.9956
13 5.02 6.00 13 5.020 5.997 13 5.0203 5.9966 𝒙𝒌
14 5.02 6.00 14 5.016 5.997 14 5.0158 5.9974
15 5.012 5.998 15 5.0123 5.9980
16 5.010 5.998
17 5.008 5.999
⁞ ⁞ ⁞
18 5.006 5.999
19 5.005 5.999
20 5.004 5.999 26 5.0009 5.9999
21 5.003 6.000 27 5.0007 5.9999
22 5.002 6.000 28 5.0006 5.9999
23 5.002 6.000 29 5.0004 5.9999
30 5.0004 5.9999 11
Comparing the Three Methods
12
Techniques for Continuous Space Location Problem
Rectilinear
Median Gravity Squared Euclidean
Method Method
Euclidean
Weiszfeld Contour Line
Method Method
13
Continuous Space Location Problem
Contour Lines Method
• The location obtained using the previous methods may not be feasible.
• We therefore wish to determine adjacent feasible locations that minimize the
total cost function.
14
Continuous Space Location Problem
Contour Lines Method
• To do so, we use the contour line method, which
graphically constructs regions bounded by
contour lines.
• Locating the new facility on any point along the
contour line incurs the same total cost.
15
Contour Lines
F
B
G
C
A
E H
D
I
17
Contour Lines Method
Example
10
8
C3 (2,8)
7 w3= 2
6
C6 (5,6) C5 (8,6)
5 w6= 3 w3= 4
4
C4 (4,4)
3 w4= 5
2
C2 (5,2)
1 w2= 3
C1 (1,1)
0 1 2 3 4 5 6 7 8 9 10
w1= 5
18
Continuous Space Location Problem
Contour Lines Method
10
Step 1: Draw a vertical line through the x
coordinate and a horizontal line 9
6
C6 (5,6) C5 (8,6)
5 w6= 3 w3= 4
4
C4 (4,4)
3 w4= 5
2
C2 (5,2)
1 w2= 3
C1 (1,1)
0 w11= 5 2 3 4 5 6 7 8 9 10
19
Continuous Space Location Problem
Contour Lines Method
10
Step 2: Sum the weights for all existing
9
facilities having the same x-coordinate
2
and enter the total at the bottom of the 8
C3 (2,8)
w3= 2
vertical line passing through that 7
3+4
coordinate; perform same calculations 6
C6 (5,6) C5 (8,6)
w6= 3 w3= 4
for the y-coordinates. 5
5 4
C4 (4,4)
3 w4= 5
3 2
C2 (5,2)
5 1 w2= 3
C1 (1,1)
0 w11= 5 2 3 4 5 6 7 8 9 10
5 2 5 3+3 4
20
Continuous Space Location Problem
Contour Lines Method
10
̶ 9
+ ̶ 8
C3 (2,8)
7 w3= 2
+ 6
C6 (5,6) C5 (8,6)
5 w6= 3 w3= 4
̶ 22 5 2 5 6 4
21
Continuous Space Location Problem
Contour Lines Method
• What about the others? 10
̶ 8
C3 (2,8)
+ ̶ 7 w3= 2
6
C6 (5,6) C5 (8,6)
+ 5 w6= 3 w3= 4
4
C4 (4,4)
3 w4= 5
• So, in that region, the net pull is 2
C1 (1,1)
w1= 5
+5+2+5-6-4 = +2 1
C2 (5,2)
w2= 3
0 1 2 3 4 5 6 7 8 9 10
5 2 5 6 4
+5+2+5 ̶ 6 ̶ 4 22
Continuous Space Location Problem
Contour Lines Method
• What about the others? 10
̶ 8
C3 (2,8)
+ ̶ 7 w3= 2
6
C6 (5,6) C5 (8,6)
+ 5 w6= 3 w3= 4
4
C4 (4,4)
3 w4= 5
• Similarly, the net pull in that 2
C1 (1,1)
w1= 5
region is calculated as 1
C2 (5,2)
w2= 3
+5+2+5+6-4 = +14 0 1 2 3 4 5 6 7 8 9 10
5 2 5 6 4
+5+2+5+6 ̶ 4 23
Continuous Space Location Problem
Contour Lines Method
Step 3: For each region between 10
2
Perform the same calculations for 8
C3 (2,8)
movement along y-axis. 7 w3= 2
7 6
̶ 5 ̶ 7 ̶ 2 C6 (5,6) C5 (8,6)
̶ 5 w6= 3 w3= 4
5 4
+ ̶ C4 (4,4)
3 w4= 5
3 2
+ +3+5 5 1
C2 (5,2)
w2= 3
C1 (1,1)
0 w11= 5 2 3 4 5 6 7 8 9 10
5 2 5 6 4
24
Continuous Space Location Problem
Contour Lines Method
-22 -12 -8 +2 +14 +22
Step 3: For each region between 10
5 4
+ ̶ C4 (4,4)
-6
3 w4= 5
3 2
+ 5 1
C2 (5,2)
w2= 3
-12
C1 (1,1)
0 w11= 5 2 3 4 5 6 7 8 9 10 -22
5 2 5 6 4
25
Continuous Space Location Problem
Contour Lines Method
-22 -12 -8 +2 +14 +22
Step 4: For each grid region enclosed 10
0 1 2 3 4 5 6 7 8 9 10
-22
5 2 5 6 4
26
Continuous Space Location Problem
Contour Lines Method
-22 -12 -8 +2 +14 +22
Step 4: For each grid region enclosed 10
22 12 8 -2 -14 -22
5 4 4 4 4 4 4 +4
5
the net horizontal pull 4
-22 -12 -8 2 14 22 -6
3 6 6 6 6 6 6
the net vertical pull
3 2 -22 -12 -8 2 14 22
12 12 12 12 12 12 -12
5 1 -22 -12 -8 2 14 22
22 22 22 22 22 22
0 1 2 3 4 5 6 7 8 9 10
-22
5 2 5 6 4
27
Continuous Space Location Problem
Contour Lines Method
Step 5: An iso-cost contour line can be
constructed from any coordinate
point by drawing a line through that
point with calculated slope.
When the grid region boundary is met,
the slope of the contour line changes
to that of the grid region entered.
28
Continuous Space Location Problem
Contour Lines Method – How to Draw Contours
Continuing to draw the contour line
and changing the slope as different grid
+11/5 -9/5 regions are entered will result in a
+3/5
closure at the beginning point of the
-1 contour line.
-11/3
+3
-1 +3
29
Continuous Space Location Problem
Contour Lines Method – How to Draw Contours
Note that the number of contour lines
depends on the scenario and the
+11/5 -9/5 maximum number is equal to the number
+3/5
of regions you pass through.
The median location is coinciding with branch 2 with coordinates (10, 10)
31
How It Works?
-1.22 1.67
32
Notes on Contour Lines Method
1. The number of vertical and horizontal lines need not be equal
2. The net pull amounts computed in step 3 correspond to the numerator
and denominator, respectively of the slope equation of any contour line
through the region bounded by the vertical lines i and i + 1 and
horizontal lines j and j + 1
3. Once the slope of each region is determined, any point can be selected
and a series of contour lines can be drawn giving the same cost
33