Skip to main content
Hi,

 

I have a network and a set of points I would like to visit. Is there a way to find the Shortest Path between the points? So the shortest path to visit all the points?

 

I know of the shortestpathfinder, but that transformer only determines the shortest path between two points...

 

 

Greetz,

 

Arno
Hi Amo,

 

 

If you are using FME 2013, try these steps:

 

1) Create a line connecting those points in the order of visiting (PointConnector).

 

2) Split the line into individual segments (Chopper: Mode = By Vertex, Maximum Vertices = 2).

 

3) Find shortest paths using the segments as FROM-TO (ShortestPathFinder).

 

  Takashi
HI Takashi,

 

Thankx for the quick reponse. The problem is that I would like to calculate the order of the points to visit in an optimal route. So I can't create the line you suggest in 1)

 

 

Arno
Hi Arno,

 

 

When the visiting order is undefined, it will be the famous "Travelling salesman problem".

 

http://en.wikipedia.org/wiki/Travelling_salesman_problem

 

Only if the number of points is limited, you can find the exact shortest path after calculating shortest paths of all the possible visiting orders.

 

Otherwise, you will have to implement an approximation algorithm being described in the link or other technical papers. It's too difficult to me...

 

 

Takashi

Reply