P.lappas Genetics TSP
description
Transcript of P.lappas Genetics TSP
-
2
-
(Travelling Salesman Problem, TSP)
;
3
-
Leonhard Euler (1736)
Konigsberg
puzzle
( Kaliningrad ) Pregel
, A B, , C D 7
4
-
, ;
5
-
Sir William Rowan Hamilton (1856)
,
(Around the World)
John Thomas Graves (1806-1870)
20
30
6
-
, , , , , , , , , , , , , , , , , ,
/ , ,
7
-
Asymmetric TSP (aTSP)
1
2
5
3
4
6
i j (i,j)
i j
cij
cji
= ,
= 1,2,3,4,5,6
= 1,2 , 2,3 , 2,4 , 2,5 , 3,6 , 4,3 , 4,5 , 5,1 , 5,3 , 6,1 , 6,4
, =
8
-
Symmetric TSP (sTSP)
1 2
4
6
3
7
i j {i,j}
i j cij = cij
= ,
= 1,2,3,4,5,6,7
= 1,2 , 1,4 , 1,5 , 2,3 , 2,4 , 2,6 , 3,4 , 3,6 , 3,7 , 4,5
= , =
+
{j,i}
5
9
-
aTSP
10
1
2
5
3
4
6
1-2-3-6-4-5-1: Hamiltonian Cycle Tour
2-5-3: Path (Directed)
1-2-5-1: Cycle Subtour
TSP Hamiltonian Cycle
-
aTSP
11
min ( , )
(1)
s.t.
{:( , )}
= 1, = 1, , (2)
{ :( , )}
= 1, = 1, , (3)
= 0 1 , = , : , , (4)
1, = 2,3, , 1 5
-
TSP
12
Xcord Ycord
1 X1 Y1
2 X2 Y2
...
n Xn Yn
= ( )2 + ( )2
Ycord
Xcord
1
4 2
5 6
3
n
-
TSP
13
n-1
n-2
n-3
2
,
(n-1)!
-
TSP
14
(n-1)!/2 Hamiltonian
Hamiltonian
Hamiltonian
5 12
10 181440
20
100
1000
. .
NP-hard
-
TSP
15
1954 Dantzing, Fulkerson, Johnson 49
1971 Held, Karp 57
1971 Held, Karp 64
1975 Camerini, Fratta, Maffioli 67
1975 Miliotis 80
1977 Grotchel 120
1980 Padberg, Hong 318
1987 Padberg, Rinaldi 532
1987 Grotchel, Holland 666
1992 Applegate, Bixby, Cook, Chvatal 3038
1993 Applegate, Bixby, Cook, Chvatal 4461
1998 Applegate, Bixby, Cook, Chvatal 13500
2001 Applegate, Bixby, Cook, Chvatal 15112
2004 Applegate, Bixby, Cook, Chvatal 24978
-
16
-
(Metaheuristics)
17
(Genetic Algorithm, GA)
(Ant Colony Optimization, ACO)
(Tabu Search, TS)
(Simulated Annealing, SA)
(Greedy Randomized Adaptive Search Procedure, GRASP)
-
(Metaheuristics)
18
(GA)
(MA)
(ACO)
(SA)
(TS)
(GRASP)
(ILS)
(GLS)
(VNS)
-
Heuristics vs. Metaheuristics
19
Heuristics
Metaheuristics
-
(Genetic Algorithms)
20
Holland (60)
(survival of the fittest)
-
(Genetic Algorithms)
21
(Individuals)
(Generation)
( (parents)) (crossover)
(mutation)
( (offsprings))
-
(Genetic Algorithms)
22
(fitness function)
(Chromosome) (Genome)
( )
(Gene)
( )
-
(Genetic Algorithms)
23
(Encoding)
(Path Representation)
x = [x1 x2 xn]
x1 x2 xn
xi: ( )
Nearest-Neighbor Initialization
-
Nearest Neighbor ()
24
=
3293
358
11
2546
98410
3116
10
Tour 1 (Solution 1):
1 3 4 2 5 1
Total Cost = 2 + 4 + 8 + 11 + 3 = 28
Tour 2 (Solution 2):
213452
Total Cost = 3 + 2 + 4 + 10 + 11 = 30
-
(Genetic Algorithms)
25
(Roulette-wheel Selection)
Individual 1
Fitness = 10
Individual 2
Fitness = 20
Individual 3
Fitness = 30
Individual 4
Fitness = 40
20
10
30
40
-
(Genetic Algorithms)
26
() 2
4
Individual 1: 10%
Individual 2: 20%
Individual 3: 30%
Individual 4: 40%
-
(Genetic Algorithms)
27
{P1 P2}, {P3 P4} {C1 C2}, {C3 C4}
,
-
(Genetic Algorithms)
28
(Crossover ) Partially Matched Crossover (PMX; Goldberg and Lingle, 1985)
Order Crossover (OX; Davis, 1985)
Cycle Crossover (CX; Oliver et al., 1987)
Order-based Crossover (OBX; Syswerda, 1991)
Inver-over Crossover (Tao and Michalewicz, 1998)
(Mutation) Inversion (Beyer and Schwefel, 2002)
Insertion (Beyer and Schwefel, 2002)
Displacement (Michalewitz, 1996)
Reciprocal Exchange (Banzhaf, 1990)
-
Partially Matched Crossover (PMX)
29
(single-point crossover)
P1 = [ 2 3 4 5 6 1 ]
P2 = [ 3 2 6 1 4 5 ]
c1 = [ 2 3 4 1 4 5 ]
c2 = [ 3 2 6 5 6 1 ]
c1 4, c2 6,
c1 = [ 2 3 6 1 4 5 ]
c2 = [ 3 2 6 5 4 1 ]
-
Order Crossover (OX)
30
P1 = [ 9 2 3 8 4 5 6 1 7 ]
P2 = [ 4 5 2 1 8 7 6 9 3 ]
subtour P1
[ 8 4 5 6 ]
c1 = [ - - - 8 4 5 6 - - ]
c1 1,2,3,7,9 P2 {2,1,7,9,3}
c1 = [ 2 1 7 8 4 5 6 9 3 ]
subtour P2
[ 1 8 7 6 ]
c2 = [ - - - 1 8 7 6 - - ]
c2 2,3,4,5,9 P1 {9,2,3,4,5}
c2 = [ 9 2 3 1 8 7 6 4 5 ]
-
TSP Mutation
31
Inversion (randomly)
x = 1 5 4 7 6 2 3
xm = 1 6 7 4 5 2 3
Insertion (randomly)
i k
i=4, k=2
x = 1 5 4 7 6 2 3
xm = 1 7 5 4 6 2 3
-
32
()
-
TSP -
33
TSP DATA Best Known Solution GA (runs)
berlin52.tsp 7542 7809, 7954, 7862, 7895, 7667, 7937 8095, 7913, 8009, 8439, 8088, 8063 8063, 7950, 7938, 8189, 8173, 7989 8374, 7862
gr96.tsp 55209 60884, 60403, 61370, 63110, 59017
lin105.tsp 14379 15472, 14918, 16384
ch130.tsp 6110 7926, 7977, 7303
ulysses22.tsp 7013 7181, 7013, 7195, 7100, 7013, 7114
ulysses16.tsp 6859 6870, 6859, 6870, 6870, 6859
-
.