113
1 Lokacijski problemi Dr Dušan Teodorović

Lokacijski problemi - transportne mreze

  • Upload
    predrag

  • View
    173

  • Download
    13

Embed Size (px)

Citation preview

Page 1: Lokacijski problemi - transportne mreze

1

Lokacijski problemi

Dr Dušan Teodorović

Page 2: Lokacijski problemi - transportne mreze

2

Osnovne postavke teorije lokacije

Teorija lokacije pokušava da da odgovore na sledeća pitanja:

a) Koliki je ukupan broj objekata na mreži u kojima se obavlja opsluga?

b) Gde locirati ove objekte?

c) Na koji način izvršiti alokaciju klijenata koji zahtevaju opslugu po pojedinim objektima? (Odrediti za svaki od objekata skup klijenata koji će da budu opsluženi iz objekta).

Page 3: Lokacijski problemi - transportne mreze

3

Osnovne postavke teorije lokacije

U određenim slučajevima objekte je moguće locirati u bilo kojoj tački posmatranog regiona (kontinualni lokacijski problemi)

Drugu grupu lokacijskih problema predstavljaju problemi u kojima se podrazumeva da je lociranje objekata moguće izvršiti samo u određenim, unapred definisanim tačkama (diskretni lokacijski problemi).

Page 4: Lokacijski problemi - transportne mreze

4

Osnovne postavke teorije lokacije

Predmet našeg razmatranja biće lokacijski problemi kod kojih je lociranje objekata dozvoljeno samo u određenim tačkama.

Najveći broj saobraćajnih terminala moguće je zbog postojanja geografskih, urbanističkih, pravnih, ekonomskih i organizacionih ograničenja locirati samo u određenom broju čvorova.

Page 5: Lokacijski problemi - transportne mreze

5

Osnovne postavke teorije lokacije

Prvi rad posvećen delom i lokacijskim problemima potiče iz 19‑tog veka. Znameniti matematičar Fermat je ukazao u svom radu na sledeći problem:

“Za zadate tri tačke u ravni pronaći četvrtu, tako da zbir rastojanja između četvrte tačke i datih triju tačaka bude minimalan.”

Začetnikom moderne lokacijske analize se smatra Alfred Weber koje je razmatrao problem lokacije skladista (1909) i težio u svojoj analizi da minimizira rastojanja izmedju skladišta i korisnika skladišta

Page 6: Lokacijski problemi - transportne mreze

6

Osnovne postavke teorije lokacije

Od položaja određenih objekata na transportnoj mreži bitno zavise kako kvalitet saobraćajnih usluga, tako i ukupni troškovi transportnog sistema.

Položaj objekta na mreži u kojima se vrši neko opsluživanje zavisi od vrste samog opsluživanja (vazduhoplovno pristanište, stanice javnog gradskog prevoza, vatrogasna brigada, stanica hitne pomoći , policijske stanice)

Page 7: Lokacijski problemi - transportne mreze

7

Osnovne postavke teorije lokacije

Skladišta, robni centri, deponije za odlaganje opasnih materijala, deponije za odlaganje smeća, aerodromi, habovi, škole, garaže, autobuske stanice, stanice hitne pomoći, bolnice, bazeni, obdaništa, domovi zdravlja, vatrogasne brigade, restorani brze hrane i stanice za brzo otklanjanje naftnih mrlja

Page 8: Lokacijski problemi - transportne mreze

8

Klasifikacija lokacijskih problema

A. Broj objekata na mrežiNa transportnoj mreži treba locirati samo jedan objekat

Na transportnoj mreži treba locirati veći broj objekata

B. Dozvoljena mesta za lociranje objekataObjekte je moguće locirati u bilo kojoj tački posmatranog regiona (kontinualni lokacijski problem)

Objekte je moguće locirati samo u određenim, unapred definisanim tačkama (diskretni lokacijski problemi)

Page 9: Lokacijski problemi - transportne mreze

9

Klasifikacija lokacijskih problemaC. Vrsta objekta na mreži

Medijane (Potrebno je locirati jedan ili više objekata na mreži, tako da se minimizira prosečno rastojanje između objekata i korisnika usluga)

Centri (Potrebno je locirati jedan ili više objekata na mreži, tako da se minimizira rastojanje do najudaljenijeg korisnika)

Objekti sa prethodno definisanim perfomansama sistema (Potrebno je locirati jedan ili više objekata na mreži, tako da se zadovolje unapred definisani standardi u pogledu pređenih rastojanja, vremena putovanja, vremena čekanja na opslugu ili nekog drugog atributa. Ovaj tip problema sa naziva problemima zahtevanja)

Page 10: Lokacijski problemi - transportne mreze

10

Klasifikacija lokacijskih problema

D. Tip algoritma za rešavanje lokacijskih problema

• Egzaktni algoritmi• Heuristički algoritmi

E. Broj kriterijumskih funkcija na osnovu kojih se određuje lokacija objekata

• Postoji jedna kriterijumska funkcija• Postoji više kriterijumskih funkcija

(problemi višekriterijumske optimizacije)

Page 11: Lokacijski problemi - transportne mreze

11

Merenje rastojanja u lokacijskim problemima

• Euclidska rastojanja

• Manhattan rastojanja

Page 12: Lokacijski problemi - transportne mreze

12

Merenje rastojanja u lokacijskim problemima

y

x

Manhattan Distance

Euclidian Distance

Manhattan rastojanje i Euklidsko rastojanje

Page 13: Lokacijski problemi - transportne mreze

13

Merenje rastojanja u lokacijskim problemima

• Čvorovi j(xj, yj) i i(xi, yi):

• Manhattan rastojanje m(i, J) između čvora i(xi, yi)

i čvora j(xj, yj) je jednako

jiji yyxxJIm ,

Page 14: Lokacijski problemi - transportne mreze

14

Merenje rastojanja u lokacijskim problemima

Rešetkasta mreža

Page 15: Lokacijski problemi - transportne mreze

15

Merenje rastojanja u lokacijskim problemima

• Euklidsko rastojanje e(I, J):

• Manhattan rastojanje i Euklidsko rastojanje su specijalni slučajevi lp rastojanja

e I J x x y yi j i j, 2 2

l I J x x y yp i j

p

i j

p p,

1

Page 16: Lokacijski problemi - transportne mreze

16

Merenje rastojanja u lokacijskim problemima

P = 1:

P = 2:

Međugradska rastojanja u putnoj mreži su obično 10‑30% veća od odgovarajućihz Euklidskih rastojanja

m I J l I J, , 1

e I J l I J, , 2

Page 17: Lokacijski problemi - transportne mreze

17

Medijane

U slučaju problema medijane potrebno je locirati jedan ili više objekata na mreži‚ tako da se minimizira prosečno rastojanje (prosečno vreme putovanja, prosečni transportni troškovi) od objekta do korisnika ili od korisnika do objekta.

Problem medijane su naročito značajni za transportnu delatnost, s obzirom da se ova grupa problema javlja prilikom projektovanja različitih distributivnih sistema.

Problem p medijana prvi je formulisao Hakimi (1964).

Page 18: Lokacijski problemi - transportne mreze

18

Medijane

G = (N, A) - transportna mreža

N - skup čvorova mreže

ai - potražnja u čvoru i

dij – rastojanje između čvora i i čvora j

p - ukupan broj objekata koje treba locirati

Objekti mogu da budu locirani u bilo kome čvoru mreže

Page 19: Lokacijski problemi - transportne mreze

19

Medijane

Problem p medijana:

Minimizirati

otherwise,0

nodein locatedfacility in the served are node from clientswhen ,1 jix ji

n

i

n

jjijii xdaF

1 1

min

Page 20: Lokacijski problemi - transportne mreze

20

Medijane

pri ograničenjima:

nixn

jji ,,2,1,1

1

pxn

jjj

1

jinjixx jijj ;,,2,1,,

njix ji ,,2,1,,1,0

Page 21: Lokacijski problemi - transportne mreze

21

Medijane

Definisana kriterijumska funkcija odražava težnju da se minimizira ukupno pređeno rastojanje između objekata i korisnika.

Prvo ograničenje se odnosi na činjenicu da je svaki klijent (svaki čvor) opslužen od strane samo jednog objekta. Drugim ograničenjem se ukazuje da na mreži treba da postoji ukupno p objekata. Svaki klijent lociran u nekom od objekata dobija opslugu iz tog objekta. Ovo je iskazano kroz treće ograničenje.

Page 22: Lokacijski problemi - transportne mreze

22

Medijane

Hakimi (1964) je pokazao da postoji najmanje jedan skup p‑medijana u čvorovima mreže G, što znači da p optimalnih lokacija objekata u mreži mora da se nalazi isključivo u čvorovima mreže.

Ova činjenica u znatnoj meri olakšava proceduru iznalaženja p‑medijana, jer je potrebno ispitati samo lokacije koje se nalaze u čvorovima.

Page 23: Lokacijski problemi - transportne mreze

23

Medijane

Algoritam za generisanje skupa dopustivih rešenja

Algoritmi zasnovani na teoriji grafova

Heuristički algoritmi

Algoritmi zasnovani na matematičkom programiranju

Page 24: Lokacijski problemi - transportne mreze

24

Medijane

• Algoritam za generisanje skupa dopustivih rešenja podrazumeva ispitivanje svih mogućih rešenja lokacija p‑medijana, izračunavanje odgovarajućih vrednosti definisane kriterijumske funkcije i određivanja optimalnog rešenja.

• Ovakav pristup moguće primeniti jedino u slučaju mreža sa manjim brojem čvorova na kojima treba locirati manji broj objekata.

Page 25: Lokacijski problemi - transportne mreze

25

Algoritam za određivanje jedne medijane mreže

Jednostavan algoritam kojim se generiše skup dopustivih rešenja i određuje lokacija jedne medijane u slučaju neorijentisane mreže predložio je Hakimi (1965).

Algoritam se sastoji iz sledećih algoritamskih koraka:

Page 26: Lokacijski problemi - transportne mreze

26

Algoritam za određivanje jedne medijane mreže

KORAK 1: Izračunati dužine najkraćih puteva dij između svih parova čvorova (i, j) mreže G i prikazivati ih u matrici najkraćih puteva D (Čvorovi i predstavljaju moguće lokacije za medijanu, a čvorovi j predstavljaju lokacije klijenata koji zahtevaju opslugu).

Page 27: Lokacijski problemi - transportne mreze

27

Algoritam za određivanje jedne medijane mreže

KORAK 2. Pomnožiti j‑tu kolonu matrice najkraćih puteva sa

brojem zahteva za opslugom aj iz čvora j. Element ajdij matrice [ajdij]

predstavlja “rastojanje” koje prevale korisnici iz čvora j koji se opslužuju u čvoru i. Matricu [ajdij] označiti sa D.

Page 28: Lokacijski problemi - transportne mreze

28

Algoritam za određivanje jedne medijane mreže

KORAK 3: Izvršiti sumiranje duž svake vrste i matrice D. Izraz

predstavlja ukupno “rastojanje” koje prevale korisnici u slučaju kada je oblekat lociran u čvoru

i.

KORAK 4: Čvor čijoj vrsti odgovara najmanje ukupno “rastojanje” koje prevaljuju korisnici predstavlja lokaciju za medijanu.

a dj i jj

n

1

Page 29: Lokacijski problemi - transportne mreze

29

Algoritam za određivanje jedne medijane mreže

Primer

Transportna mreža na kojoj treba odrediti lokaciju jedne medijane

Page 30: Lokacijski problemi - transportne mreze

30

Algoritam za određivanje jedne medijane mreže

Čvorovi transportne mreže su označeni respektivno sa A, B, C, .., H. Dnevni zahtevi za opslugom dati su u zagradama pored čvorova. Takođe su označene i dužine svih grana u mreži.

Problem koji treba da rešimo sastoji se u sledećem: Gde locirati objekat u kome se pruža određena opsluga, tako da ukupno rastojanje koje prevale korisnici usluga do objekta bude minimalno (Korisnici usluga se nalaze u čvorovima).

Na osnovu Hakimi‑jeve teoreme (1964) možemo da zaključimo da postoji 8 mesta‑kandidata za lociranje objekta. To su čvorovi A, B, C, .., H.

Page 31: Lokacijski problemi - transportne mreze

31

Algoritam za određivanje jedne medijane mreže

Matrica najkraćih rastojanja:

02734486

20626475

76049647

32405253

469503105

44623072

874510705

65735250

H

G

F

E

D

C

B

A

d

HGFEDCBA

ji

Page 32: Lokacijski problemi - transportne mreze

32

Algoritam za određivanje jedne medijane mreže

U sledećem koraku izračunajmo izraze ajdij, tako što ćemo svaku kolonu matrice najkraćih rastojanja pomnožiti sa brojem zahteva za opslugom u čvoru j.

Page 33: Lokacijski problemi - transportne mreze

33

Algoritam za određivanje jedne medijane mreže

0602800608003204800600

1000024004012003204200500

350018008018004802400700

1500601600010001603000300

2000180360010002406000500

200012024004060004200200

4000210160010020005600500

3000150280060100016030000

H

G

F

E

D

C

B

A

da

HGFEDCBA

jij

Page 34: Lokacijski problemi - transportne mreze

34

Algoritam za određivanje jedne medijane mreže

Sumiranjem po vrstama matrice [ajdij] dobijaju se ukupna rastojanja koja bi prešli korisnici usluga, ukoliko bi objekat bio smešten u pojedinim čvorovima duž čijih vrsta se vrši sumiranje.

Objekat treba locirati u onom čvoru duž čije vrste je dobijen najmanji zbir po izvršenom sumiranju.

Page 35: Lokacijski problemi - transportne mreze

35

Algoritam za određivanje jedne medijane mreže

Lokacija objekta je u čvoru

Broj ostvarenih putničkih

kilometara

Lokacija objekta je u čvoru

Broj ostvarenih putničkih kilometara

A 10170 E 7620

B 8970 F 9140

C 9760 G 9660

D 12620 H 9440

Brojevi ostvarenih putničkih kilometara

Page 36: Lokacijski problemi - transportne mreze

36

Algoritam za određivanje jedne medijane mreže

Objekat treba locirati u čvoru E

Lociranje objekta u čvoru E

Page 37: Lokacijski problemi - transportne mreze

37

Algoritam za određivanje jedne medijane orijentisane mreže

Izloženi algoritam za odeđivanje lokacije jedne medijane u slučaju neorijentisane mreže, može se u potpunosti primeniti i za određivanje lokacije ulazne, odnosno izlazne medijane.

Neophodno je jedino voditi računa o orijentaciji mreže, odnosno o dužinama najkraćih puteva između pojedinih parova čvorova.

Page 38: Lokacijski problemi - transportne mreze

38

Algoritam za određivanje jedne medijane orijentisane mreže

Orijentisana mreža u kojoj treba odrediti lokaciju jedne medijane

Page 39: Lokacijski problemi - transportne mreze

39

Algoritam za određivanje jedne medijane orijentisane mreže

Čvorovi: A, B, C, D, E

Matrica najkraćih rastojanja :

04367

40523

46054

62702

74510

E

D

C

B

A

d

EDCBA

ji

Page 40: Lokacijski problemi - transportne mreze

40

Algoritam za određivanje jedne medijane orijentisane mreže

Ukoliko ulazna medijana bude u čvoru A, ukupno rastojanje koje će preći korisnici iznosi:

5420740032046002800100

Page 41: Lokacijski problemi - transportne mreze

41

Algoritam za određivanje jedne medijane orijentisane mreže

Lokacija ulazne medijane je u čvoru

Broj ostvarenih putničkih kilometara

A 5420B 5540C 2160D 4240E 3660

Broj ostvarenih putničkih kilometara

Page 42: Lokacijski problemi - transportne mreze

42

Algoritam za određivanje jedne medijane orijentisane mreže

• Ulazna medijana treba da bude locirana u čvoru C

Loikacija ulazne medijane u čvoru C

Page 43: Lokacijski problemi - transportne mreze

43

7.6. Solving p median problem by generating set of feasible solution • Algorithms for generating the set of feasible

solutions consists of the following steps• Generate all possible feasible solutions• For every feasible solution calculate objective

function value• Identify the optimal solution• The total number of solutions in the case of n

nodes and p facilities equals

Page 44: Lokacijski problemi - transportne mreze

44

7.6. Solving p median problem by generating set of feasible solution

• n - the total number of nodes in the network (the total number of candidates for location of p medians)

• dij -the length of the shortest path between node i and node j

• dij = ajdij - “distance” traveled by users from node j when receiving service in node i

p

n

Page 45: Lokacijski problemi - transportne mreze

45

7.6. Solving p median problem by generating set of feasible solution• D - matrix whose elements are dij

• Xp = {vj1, vj2, ..., vjp}

• one of the possible subsets that contains p nodes• The following sum should be calculate for every

of the n C p subsets that contain p nodes:

n

jjjjjjj p

ddd1

,,,min 21

Page 46: Lokacijski problemi - transportne mreze

46

7.6. Solving p median problem by generating set of feasible solution• The subset with the smallest value of the sum

represents the set of nodes where p medians should be located

• Example: Identify the best locations for the two medians

Page 47: Lokacijski problemi - transportne mreze

47

7.6. Solving p median problem by generating set of feasible solution

Figure 7.7 A transportation network on which two facilities should be located

Page 48: Lokacijski problemi - transportne mreze

48

7.6. Solving p median problem by generating set of feasible solution• Nodes: A, B, C, D, E• Network contains 5 nodes• The total number of combinations for location of

two facilities equals

• Medians could be located in the following pairs of nodes

102

5

EDECDCEBDBCBEADACABA ,i,,,,,,,,,,,,,,,,,

Page 49: Lokacijski problemi - transportne mreze

49

7.6. Solving p median problem by generating set of feasible solution• Let us calculate the total distance traveled by the

users when facilities are located in the nodes A and B

• Users from the node A will be served in the node A. In the same way, users from the node B will be served in the node B

• The distance between the nodes C and A is smaller than the distance between the nodes C and B

Page 50: Lokacijski problemi - transportne mreze

50

7.6. Solving p median problem by generating set of feasible solution• Users from the node D will be served in the node

B• Users from the node E will also be served in the

node B• The total distance traveled by the users when

facilities are located in the nodes A and B equals

20408011120580710001000

Page 51: Lokacijski problemi - transportne mreze

51

7.6. Solving p median problem by generating set of feasible solution

Facility locations

The total distance

traveled by the users

Facility locations

The total distance

traveled by the users

(A, B) 2040 (B, D) 1660(A, C) 2190 (B, E) 1780(A, D) 1410 (C, D) 1630(A, E) 1830 (C, E) 2410(B, C) 1780 (D, E) 1730

Table 7.3 Different facility locations and the corresponding total distance traveled by the users

Page 52: Lokacijski problemi - transportne mreze

52

7.6. Solving p median problem by generating set of feasible solution• Medians should be located in the nodes A and D

Figure 7.8 Medians A and D and the nodes served by these medians

Page 53: Lokacijski problemi - transportne mreze

53

7.6. Solving p median problem by generating set of feasible solution• Example: Determine the locations of two medians

in the case of transportation network shown in the Figure 7.9. Nodes are denoted by A, B, C, .., H. Daily number of users, as well as link lengths are also shown in the figure.

Page 54: Lokacijski problemi - transportne mreze

54

7.6. Solving p median problem by generating set of feasible solution

Figure 7.9 Transportation network in which locations of two medians should be determined

Page 55: Lokacijski problemi - transportne mreze

55

7.6. Solving p median problem by generating set of feasible solution• In total, there are different

possibilities for locations of two medians28

2

8

Page 56: Lokacijski problemi - transportne mreze

56

7.6. Solving p median problem by generating set of feasible solution  Node pair The total

distance  Node pair The total

distance1. (A, B) 5970 15. (C, E) 69602. (A, C) 8160 16. (C, F) 55603. (A, D) 8170 17. (C, G) 86404. (A, E) 7380 18. (C, H) 75005. (A, F) 6770 19. (D, E) 66206. (A, G) 7600 20. (D, F) 54007. (A, H) 6880 21. (D, G) 83808. (B, C) 4560 22. (D, H) 84609. (B, D) 4620 23. (E, F) 5420

10. (B, E) 4620 24. (E, G) 710011. (B, F) 6530 25. (E, H) 592012. (B, G) 4660 26. (F, G) 546013. (B, H) 3340 27. (F, H) 424014. (C, D) 8960 28. (G, H) 8260

Table 7.4: The total distance traveled

Page 57: Lokacijski problemi - transportne mreze

57

7.6. Solving p median problem by generating set of feasible solution• The minimum total distance traveled will be

achieved when medians are located in the nodes B and H

Page 58: Lokacijski problemi - transportne mreze

58

7.6. Solving p median problem by generating set of feasible solution

Figure 7.10 Medians located in the nodes B and H

Page 59: Lokacijski problemi - transportne mreze

59

7.7. Heuristic algorithm for the p-medians problem

• Maranzana (1964):• Step 1: arbitrarily choose p nodes and locate

medians in these nodes• Step 2: every node in the network assign to

the closest median. In this way, the set of n nodes is divided into p subsets

• Step 3: for every created subset determine the location of single median. Replace with these medians, medians created in the step 1

Page 60: Lokacijski problemi - transportne mreze

60

7.7. Heuristic algorithm for the p-medians problem

• Step 4: Repeat steps 2 and 3, until set of medians is unchanged

• Experience gained in using this algorithm shows that sometimes the same solution can appear periodically. In such situation, the algorithm must stop when the same solution is generated for the second time

Page 61: Lokacijski problemi - transportne mreze

61

7.7. Heuristic algorithm for the p-medians problem

• Example: Using Maranzana’s heuristic algorithm determine the locations of two medians in the case of transportation network shown in the Figure 7.11. Nodes are denoted by A, B, C, .., H. Daily number of users, as well as link lengths are also shown in the figure.

Page 62: Lokacijski problemi - transportne mreze

62

7.7. Heuristic algorithm for the p-medians problem

Figure 7.11 Transportation network in which locations of two medians should be determined

Page 63: Lokacijski problemi - transportne mreze

63

7.7. Heuristic algorithm for the p-medians problem

• We arbitrarily choose nodes D and F , and we temporarily locate medians in these two nodes

• Median D serves nodes D, C, H, A and G, while median F serves nodes F, B and E

• Two subsets of nodes are generated

Page 64: Lokacijski problemi - transportne mreze

64

7.7. Heuristic algorithm for the p-medians problem

Figure 7.12: Two subsets of nodes and temporary median locations

Page 65: Lokacijski problemi - transportne mreze

65

7.7. Heuristic algorithm for the p-medians problem

• For every created subset we determine the location of single median

• In the case of the subset composed of the nodes F, B and E median should be located in the node B

• In the case of the subset composed of the nodes D, C, H, A and G median should be located in the node H

• Two medians are now temporarily located in the nodes B and H

Page 66: Lokacijski problemi - transportne mreze

66

7.7. Heuristic algorithm for the p-medians problem

Figure 7.13 Two subsets of nodes and new temporary median locations

Page 67: Lokacijski problemi - transportne mreze

67

7.7. Heuristic algorithm for the p-medians problem

• Two subsets of nodes are generated• For every created subset we determine the location

of single median.• Medians should be located in the nodes B and H. • Since, we again got the same solution, we

conclude that the medians should be located in the nodes B and H

Page 68: Lokacijski problemi - transportne mreze

68

7.7. Heuristic algorithm for the p-medians problem

Figure 7.14 Medians located in the nodes B and H

Page 69: Lokacijski problemi - transportne mreze

69

7.7. Heuristic algorithm for the p-medians problem

• Teitz and Bart (1968) proposed, and Larson and Odoni (1981) improved the following heuristic algorithm for p-medians problem

• The algorithm starts with finding the location of one median and a new median is found with each additional step. The algorithm is finished when all p medians have been found

• M - the set of nodes in which median are temporarily located

• m – the total number of nodes in the set M

Page 70: Lokacijski problemi - transportne mreze

70

7.7. Heuristic algorithm for the p-medians problem

• While searching for the p median location m will increase from 1 to p

• Step 1: Let m = 1. Find the location for one median. Let this median be located in node i. This means that M = {i}.

• Step 2: The next median is located in a node from the set N\M, so that it achieves the greatest improvement to the objective function. Now, increase m by 1 (m = m + 1).

Page 71: Lokacijski problemi - transportne mreze

71

7.7. Heuristic algorithm for the p-medians problem

• Step 3: We now try to improve the value of the objective function by systematically replacing one of the nodes in set M, by one of the nodes in set N\M every time an improvement takes place. When no more improvements can be made to the objective function, go to step 4.

• Step 4: If m = p the algorithm is finished. If not (m<p), go to Step 2

Page 72: Lokacijski problemi - transportne mreze

72

7.7. Heuristic algorithm for the p-medians problem

• Example: Use the described algorithm to find the 2 medians in the transportation network shown in Figure 7.15

Page 73: Lokacijski problemi - transportne mreze

73

7.7. Heuristic algorithm for the p-medians problem

Figure 7.15 Transportation network in which locations of two medians should be determined

Page 74: Lokacijski problemi - transportne mreze

74

7.7. Heuristic algorithm for the p-medians problem

• In the first step, we determine that the optimal location for one median is node E

• For this reason M = {E}. • In the second step we must compare the objective

function values for the cases when the medians are located in the following node pairs:

• Node pair (B, E) has the smallest objective function value (4620)

HEGEFEEDECEBEA ,i,,,,,,,,,,,,

Page 75: Lokacijski problemi - transportne mreze

75

7.7. Heuristic algorithm for the p-medians problem

• This means that now M = {B, E}• We now compare this solution with the following

solutions:

• Since the objective function value is 3340 for the solution (B, H) , this is now the new solution.

• This means that now M = {B, H}• We now compare this solution with the following

solutions

HBGBFBDBCBBA ,i,,,,,,,,,

HGHFHEHDHCHA ,i,,,,,,,,,

Page 76: Lokacijski problemi - transportne mreze

76

7.7. Heuristic algorithm for the p-medians problem

• After these comparisons, there are no improvements in the objective function. The solution (B, H) is compared to the following solutions

• No improvements can be made to the objective function after these comparisons, either

• Since m = 2 = p, we have completed the algorithm with the solution M = {B, H}.

GBFBEBDBCBBA ,i,,,,,,,,,

Page 77: Lokacijski problemi - transportne mreze

77

7.7. Heuristic algorithm for the p-medians problem

Figure 7.16 Medians located in nodes B and H

Page 78: Lokacijski problemi - transportne mreze

78

7.8. Determining transportation network centers

• When locating centers we strive to minimize the distance (travel time) to the farthest user

• Emergency facilities: Firehouses, Emergency medical service facilities, Police stations

• Shortest paths between all pairs of nodes must be calculated before applying a suitable algorithm for determining the center of a given transportation network

• G = (N, A) - transportation network

Page 79: Lokacijski problemi - transportne mreze

79

7.8. Determining transportation network centers

• x  € G - some point in the network (x can be located at any node or at any link)

• f(x) - the distance between point x and the node of network G which is farthest from point x

ixNi

dxf ,max

Page 80: Lokacijski problemi - transportne mreze

80

7.8. Determining transportation network centers

Figure 7.17 The shortest distance dx‚i between point x and the node i

Page 81: Lokacijski problemi - transportne mreze

81

7.8. Determining transportation network centers

• a  € A - link in the network G• Point xa on link a is called the local center of link

a if the following is true for every point x  €  a

• The distance between any link local center and its farthest node is less than or equal to the distance between any other point on the link and the farthest node from that point

xfxf a

Page 82: Lokacijski problemi - transportne mreze

82

7.8. Determining transportation network centers

• Node j(c) is called the node center of network G if the following is true for every node i € N

• The distance between the node center of network and its farthest node is less than or equal to the distance between any node in the network and its farthest node

  ifjf c )(

Page 83: Lokacijski problemi - transportne mreze

83

7.8. Determining transportation network centers

• Point x0 is called the absolute center of network G

if the following is true for every x  G:

• The distance between the absolute center and its farthest node is less than or equal to the distance between any point in the network and its farthest node

xfxf 0

Page 84: Lokacijski problemi - transportne mreze

84

7.9. Single Center Algorithm

• Step 1: find local center xa for every link in

the network G• Step 2: choose the local center with the

smallest value f(xa). This local center represents

the absolute center x0 of network G.

• Example: determine the node center and absolute center of the network shown in figure 7.18

Page 85: Lokacijski problemi - transportne mreze

85

7.9. Single Center Algorithm

Figure 7.18 Transportation network for which the node center and the absolute center has to be determined

Page 86: Lokacijski problemi - transportne mreze

86

7.9. Single Center Algorithm

• Link lengths are shown in the figure

• We find the lengths dij of the shortest paths

between all pairs of nodes

0243

2062

4604

3205

5450

5E

D

C

B

A

d

EDCBA

ji

7

7

7

7

Page 87: Lokacijski problemi - transportne mreze

87

7.9. Single Center Algorithm

• The node that has the minimum value of the maximum elements of its row is the optimal location for the center

• In our case node E is the optimal location for the center

• Let us consider link (A, B) whose length equals 5

Page 88: Lokacijski problemi - transportne mreze

88

7.9. Single Center Algorithm

Figure 7.19 Finding local center of the link (A, B)

Page 89: Lokacijski problemi - transportne mreze

89

7.9. Single Center Algorithm

• For all point x located on link (A, B) we draw function dx,i for i = A, B, C, D, E.

• For example, if we put x = 0 in A and x = 5 in B, then:

50, , xforxd Ax

50,5 , xforxd Bx

54for,12

40for,4 , xx

xxd Cx

Page 90: Lokacijski problemi - transportne mreze

90

7.9. Single Center Algorithm

• Function f(x) is drawn on Figure 7.19 with a thick line

• Node E is the absolute center since node E has the smallest f(xa) value (f(xa) = 5)

50,7 , xforxd Dx

55.1for,8

5.10for,5 , xx

xxd Ex

Page 91: Lokacijski problemi - transportne mreze

91

7.9. Single Center AlgorithmLink Function

f(x)Local Center

(A, B) f(xa) = 6 1 unit from A or 2 units from A

(A, E) f(xa) = 4.5 0.5 units from E

(A, C) f(xa) = 7 In A and C

(E, C) f(xa) = 5 In E

(B, E) f(xa) = 5 In E

(B, D) f(xa) = 6.5 1.5 units from B

(D, E) f(xa) = 5 In E

Table 7.5 Local centers

Page 92: Lokacijski problemi - transportne mreze

92

7.10.Requirements problems

• Requirements: • Achieve certain standard of performance (cost,

time, area covered, etc)• How many facilities do we need to achieve

defined standard of performance?• Where these facilities should be located?• Requirements problems could appear when

designing emergency services (Firehouses, Emergency medical service facilities, Police stations)

Page 93: Lokacijski problemi - transportne mreze

93

7.10.Requirements problems

• Examples:• 95% of rural calls for emergency medical service

should be reached within 30 minutes• 95% of urban calls for emergency medical service

should be reached within 10 minutes• Larson and Odoni: • Emergency Medical Service Coverage Algorithm• Bn = {b1, b2, ..., bn} - set of n nodes in the

network G in which demand is generated

Page 94: Lokacijski problemi - transportne mreze

94

7.10.Requirements problems

• Am = {a1, a2, ..., am} - set of m points in the network

G, that are candidates for location of emergency facilities

• d* - the maximum allowed “distance” between the facility located at aj  Am and the point bi  Bn that

should be served from the facility located at aj € Am

• If the distance between aj  Am and the bi  Bn is less

than d* , point aj “covers” point bi (d(aj, bi)  d* )

Page 95: Lokacijski problemi - transportne mreze

95

7.10.Requirements problems

• In the opposite case, point aj “does not cover”

point bi (d(aj, bi)>d*)

• The set covering problem consists in of finding the minimum number of points x*

, of points from the

set Am, needed to “cover” all points in the set Bn.

• Example:

• 8 demand nodes: A, B, C, D, E, F, G, H

• 6 potential locations: I, J, K, L, M, N

Page 96: Lokacijski problemi - transportne mreze

96

7.10.Requirements problems

• If the distance between potential location and demand point is less than or equal to 60, potential location covers demand point

• The shortest distance matrix [d(i, j)] :

Page 97: Lokacijski problemi - transportne mreze

97

7.10.Requirements problems

7429697529962742

3288913090888961

6044667657291429

7076467428778442

4642879627327175

207174586243299

,

objects

N

M

L

K

J

I

jid

HGFEDCBA

clients

Page 98: Lokacijski problemi - transportne mreze

98

7.10.Requirements problems

• Coverage matrix [p(i, j)]:

• where p(i, j) is element of the matrix [p(i, j)]

• Coverage matrix [p(i, j)]:

otherwise,0

60),(for,1,

jidjip

Page 99: Lokacijski problemi - transportne mreze

99

7.10.Requirements problems

01001011

10010000

11001111

00101001

11001100

10010111

,

objects

N

M

L

K

J

I

jip

HGFEDCBA

clients

Page 100: Lokacijski problemi - transportne mreze

100

7.10.Requirements problems

• Coverage matrix provides information about clients coverage by objects

• For example, point K covers points A, D, and F.• Set covering problem (Larson and Odoni (1981)):• Reduce the number of rows in coverage matrix

[p(i, j)] to the minimum possible number, so that the each column in the reduced matrix has at least single element equal to 1

Page 101: Lokacijski problemi - transportne mreze

101

7.10.Requirements problems

• Step 1: If thee are at least one column of the coverage matrix whose elements are equal to zero, stop. In this case there is no feasible solution. (In order to obtain feasible solution, we must increase the number of objects, and/or change “coverage distance” between the object and the client)

Page 102: Lokacijski problemi - transportne mreze

102

7.10.Requirements problems

• Step 2: Explore is there any column that have only one element that is not zero. Assume that nonzero element is in the row i* . The object must be located at the point that corresponds to the row i* .This point is included in the list of points that contain objects. Eliminate row i* and all columns having a 1 in row i* from the matrix

• Step 3: Eliminate row i if all its elements are less than or equal to the corresponding elements of another row i (p(i, j)<p(i, j) for j).

Page 103: Lokacijski problemi - transportne mreze

103

7.10.Requirements problems• Step 4: Eliminate column j if all its elements

are greater than or equal to the corresponding elements of another column j (p(i, j)  p(i, j) for j).

• Step 5: Repeat steps 2‑4 until: (a) the coverage matrix become completely empty; or (b) no row or column can be eliminated.

• The needed number of objects and their locations are determines when coverage matrix is completely empty.

• When no row or column can be eliminated it is necessary to apply some other algorithm

Page 104: Lokacijski problemi - transportne mreze

104

7.10.Requirements problems

• Example: Apply Matrix reduction algorithm for set covering in the following case:

0 1 0 0 1 0 1 1

1 0 0 1 0 0 0 0

1 1 0 0 1 1 1 1

0 0 1 0 1 0 0 1

1 1 0 0 1 1 0 0

1 0 0 1 0 1 1 1

,

objects

N

M

L

K

J

I

j i p

H G F E D C B A

clients

Page 105: Lokacijski problemi - transportne mreze

105

7.10.Requirements problems

• The distances between nodes are given in the previous example

• Step 1: Feasible solution exists, since all columns of the matrix [p(i, j)] contain at least one nonzero element

• Step2: Column F has one nonzero element (in row K). Object must be located in point K. Point K is included in the list of points that contain objects.

Page 106: Lokacijski problemi - transportne mreze

106

7.10.Requirements problems

• We eliminate row K and all columns having a 1 in row K* from the matrix (p(K, A) = p(K, D) = p(K, F) = 1). Reduced matrix reads

Page 107: Lokacijski problemi - transportne mreze

107

7.10.Requirements problems

01001

10100

11011

11010

10111

,

objects

N

M

L

J

I

jip

HGECB

clients

Page 108: Lokacijski problemi - transportne mreze

108

7.10.Requirements problems

• Step 3: We eliminate row J and row M. All elements in row J are less than or equal to the corresponding elements of row L. In the same way, all elements in row M are less than or equal to the corresponding elements of row I. Reduced matrix reads:

11011

10111,

objects

L

Ijip

HGECB

clients

Page 109: Lokacijski problemi - transportne mreze

109

7.10.Requirements problems

• Step 4: We eliminate column B and column C , since all elements in these columns are greater than or equal to the corresponding elements in the columns E and G respectively. Reduced matrix reads:

110

101,

objects

L

Ijip

HGE

clients

Page 110: Lokacijski problemi - transportne mreze

110

7.10.Requirements problems

• We eliminate column H (all elements in this columns are greater than or equal to the corresponding elements in the columns E and G). Reduced matrix reads:

10

01,

objects

L

Ijip

GE

clients

Page 111: Lokacijski problemi - transportne mreze

111

7.10.Requirements problems

• Columns E and G has one nonzero element (rows I and L). Objects must be located in points I and L.

• Points I and L are included in the list of points that contain objects. We eliminate rows I and L. Coverage matrix is empty.

• Minimum number of objects for covering points A, B, C, D, E, F, G, and H equals 3

• Objects should be located in the points K, I and L

Page 112: Lokacijski problemi - transportne mreze

112

7.10.Requirements problems

• The shortest distance matrix reads:

6044667657291429

7076467428778442

207174586243299

,

objects

L

K

I

jid

HGFEDCBA

clients

Page 113: Lokacijski problemi - transportne mreze

113

7.10.Requirements problems

• Every point is covered from the closest object .• The distance between any object and

corresponding demand point is less than or equal to 60.