May 2017
Beginner to intermediate
328 pages
7h 17m
English
The last pgRouting algorithm that we are about to have a look at is the traveling sales person algorithm. Its purpose is to answer the following question: Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?
pgRouting offers two variants of a TSP function:
Let's calculate the points order for a couple of locations from our Vienna dataset:
select * ...
Read now
Unlock full access