tsp neighbourhood reduction with...

25
TSP Neighbourhood reduction with POPMUSIC Éric D. Taillard Barcelona, 6. July 2017 Éric D. Taillard TSP Neighbourhood reduction with POPMUSIC Barcelona, 6. July 2017 1 / 25

Upload: others

Post on 15-Feb-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

TSP Neighbourhood reduction with POPMUSIC

Éric D. Taillard

Barcelona, 6. July 2017

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 1 / 25

Introduction

Tavelling Salesman Problem : State of the Art

Exact algorithmConcorde TSP solver (Applegate, Bixby, Chvátal, Cook, 2003)Optimum known for 2D Euclidean instances with ≈ 100k cities

Approximation algorithmLocal search with Lin & Kernighan neighbourhood (1973)+ k-opt moves (k = 5 =⇒ O(n4.·) algorithmic complexity)+ neighbourhood reduction (keep ≈ 5 edges for each vertex)+ iterated with kick moves (double bridge)One of the best heuristic implementation due to K. Helsgaun (LKH,2009, 2014, 2016)Solutions below 0.0. . . % over optimum for all problem of the literature(TSPLIB format, up to 107 cities

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 2 / 25

Introduction

LKH (version 2.0.7) Speed, exploiting Euclidean propertyComputational time of LKH. Uniform (E) and clustered (C) DIMACSinstances. Delaunay triangulation + 4 quadrant-nearest neighbours ascandidate edge list. 60 trials, single run.

104

103

102

ClusteredUniform

Problem size

Time[s]

101

105

104

O(n1.37)

O(n1.21)

106

100

103 105 106 107

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 3 / 25

Introduction

LKH QualityQuality of solutions produces by LKH on uniform (E) and clustered (C)DIMACS instances. 60 Trials, 1 Run

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

ClusteredUniform

%Excess

104103 105 106 107

Problem size

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 4 / 25

Introduction

LKH General instances

Standard preprocessing: 1-tree computation, Subgradient optimizationUniform (E) and clustered (C) DIMACS instances60 trials, a single run

103

104

105

106

102

10

1

10−1

O(n2.12)

O(n1.34)

Tim

e[s]

Problem Size

1-Tree Preprocessing

LKH 60 Trials

103 104 105 106

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 5 / 25

Introduction

Potential problem with standard (1-tree) LKH preprocessing

5-opt moves are evaluated =⇒ O(n4.·) algorithmic complexityPreprocessing is absolutely necessary for limiting neighbourhood size

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 6 / 25

Introduction

Tour merging

Generate several different tours with random components, keep only theedges of these tours

Known to be efficient (implemented e.g. in Concorde)Improvement by Blazinskas and Misevicius (2012)

Start with a random tour3-opt neighbourhood with 40 nearest neighbour (10 in each quadrant)Repeat 60 to 230 times (automatic, adaptive)

Efficient (< O(n2)) implementations only for Euclidean instances

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 7 / 25

Fast solution building

Goal of the presentation

Propose a general method extracting interesting edgesThe computational complexity should be lower than O(n2)

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 8 / 25

Fast solution building

Efficient solution building

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 9 / 25

Fast solution building

Obtaining a feasible solution for large instances

1: Select a sample S of a cities, randomly, uniformly, among the n cities;Build a LK-optimal tour Ts on S ;T = Ts

2: for each city c /∈ S (in arbitrary order) do3: cs = argmin(d(s, c)), (s ∈ S);4: Insert c just after cs in T ;5: end for6: for each city c ∈ Ts do7: Let nc be the number of cities inserted at previous step after c and

after the city next to c in Ts ;8: Optimize in T a sub-path of nc cities starting from c with a 2-opt

local search9: end for

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 10 / 25

Fast solution building

Empirical complexity of the algorithm

Basic implementation of LK: O(a2.78)

Basic implementation of 2-opt: O((2na )

2.29)

a ∼ nh

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 10

0.5

1

1.5

2

2.5

3

2.78 · h

h + 1

2.29 − 1.29 · h

h

With a = 1.5n0.56, the empirical complexity is in O(n1.57)Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 11 / 25

Fast solution building

POPMUSIC improvement of a TSP solution

Optimize every sub-paths of r cities with LK local searchPut city i in a stack U, if a sub-path of r cities starting from i canpotentially be improved with LKStop when the stack is emptyWith r = 50, solutions so obtained are 5.7% to 12.8% above optimumon DIMACS (E and C) instances

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 12 / 25

Fast solution building

Identifying sub-path to improve

Fixed

Fixed Modified Unchanged

Unchanged

U status not affected

Path of r cities improved, /∈ U after

Nextpath

of r citiesto optim

ize

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 13 / 25

Fast solution building

POPMUSIC solution (dark) and optimum solution (light)

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 14 / 25

Neighbourhood reduction

Method for TSP neighbourhood reduction

Get 20 different solutions with fast algorithm + POPMUSIC (randomsamples S)Union of these 20 solutions are high quality candidate edges for LKH

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 15 / 25

Computational results

Computational results for DIMACS uniform (E) instances

Size Best known Computational Time (i7 930) %ExcessSub-graph Total LKH Proposed LKH

103 23101545.4 2.981 3.921 1.701 0.036 0.016103.5 40519926 9.406 17.54 16.4 0.062 0.022104 71865826 29.7 92.2 226 0.11 0.05104 72031630 29.9 82.3 225 0.08 0.03104 71822483 29.6 87.0 237 0.12 0.03104.5 127282138 95.3 427 2396 0.19 0.06104.5 126647285 95.2 470 2427 0.83 0.73105 224330692 325 1850 26860 0.88 0.76105 225654639 326 1805 27446 0.24 0.11105.5 401301206 1234 7821 262090 0.26 0.15106 713187688 5250 31061 — 0.27 —106.5 1267318198 27770 129866 — 0.28 —107 2253088000 208195 611402 — 0.28 —

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 16 / 25

Computational results

Computational results for DIMACS clustered (C) instances

Size Best known Computational Time (i7 930) %ExcessSub-graph Total LKH Proposed LKH

103 11174460.5 3.24 4.18 4.13 0.11 0.10103.5 19147233.6 10.5 20.3 15.1 0.68 1.50104 33001034 33.1 85.4 68 0.72 3.31104 33186248 33.4 76.8 73.6 0.86 1.42104 33155424 33.2 71.1 73.9 0.25 0.42104.5 59545390 108 230 469 0.49 3.57104.5 59293266 107 264 455 0.79 2.29105 104617752 368 975 3457 1.16 4.56105 105390777 368 947 3467 0.85 7.47105.5 186870839 1372 3495 32018 0.98 9.44

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 17 / 25

Conclusion

Conclusions and future work

Recursive implementation of TSP solution building in O(n log(n))Faster sub-path optimization procedure in POPMUSIC (3-opt withlimited neighbourhood)Promising preliminary experiments

109 cities TSPSolution at less than 13% above predicted optimumLess than 80 minutes on a standard PC (1 core)Nearest neighbour would take 150 years on the same machine forgetting a solution more than 20% above optimum

Method competitive on 2D Euclidean instances, even if not exploitingthe problem structureExperiments on different types of instancesIncorporating POPMUSIC in LKH is on progress

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 18 / 25

Additional results

Average vertex degree, toroidal 2,3,4D, regular grid 5D

5

6

7

8

9

10

11

12

13

Problem size

Averagedegree

102 103 104 105 107106

Toroidal 2D

Toroidal 3D

Toroidal 4D

Regular 5D grid

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 19 / 25

Additional results

Computational time, Regular grid 5D

103 104 105 107106

Problem size

LKH 60 trials

Proposed method

Com

puta

tiona

ltim

e[s

] 104

103

102

101

10

10−1

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 20 / 25

Additional results

Computational time, Toroidal distances 2D, 3D, 4D

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 21 / 25

Additional results

Solution quality Toroidal distances 2D, 3D, 4D

Toroidal 2D

Toroidal 3D

Toroidal 4D

0.685

0.69

0.695

0.7

0.705

0.71

0.715

0.72

0.725

0.73

0.735

Normalized

leng

th(/n(D

−1)

/D)

102 103 104 105 107106

Problem size

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 22 / 25

Additional results

Vertex degree as a function of number of POPMUSICsolutions

0 10 20 30 40 50 60 70 80 90 100Number of solutions

Vertexdegree

0

10

20

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 23 / 25

Additional results

Missing edges in sub-graph relative to optimum solution

0 10 20 30 40 50 60 70 80 90 1000

10

20

30

40

50

Number of solutions generated

Num

berof

edgesmissing

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 24 / 25

Additional results

Vertex degree for DIMACS instances, 20 POPMUSICsolutions

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 160

0.05

0.1

0.15

0.2

0.25

0.3

C100k.0C316k.0E100k.0E316k.0E1M.0E3M.0E10M.0

Vertex degree

Propo

rtion

Éric D. Taillard TSP Neighbourhood reduction with POPMUSICBarcelona, 6. July 2017 25 / 25