Skip to main content

Hello!

I am currently running a shortestpathfinder to calculate fastest routes along a road network. I am having difficulty creating a from-to line that does not have overlapping points. Currently the LineBuilder has great overlap generating a not very well optimised route through shortestpathfinder. This is similar to the Travelling Salesman, if the salesman were to visit every point on the network.

Any idea on how to better generate the from-to line to have less duplication?

 

The image shows the messy LineBuilder.

I'm afraid that I don't understand your requirement exactly, but if you need to create a From-To line connecting all the nodes belonging to a network, try using the TopologyBuilder.

  1. Send the network lines to the TopologyBuilder.
  2. Connect the LineBuilder to the Node port of the TopologyBuilder.

Resulting line from the LineBuilder should be a polyline that connects all the nodes in the network, passing through each node just once.

If there are two or more independent networks, firstly add network ID to the lines with the NetworkTopologyCalculator, then set the network ID to the Group By parameter in both the TopologyBuilder and the LineBuilder.


Hi @daviesben33 Your ShortestPathFinder is already optimized to reorder all points in the From-To line. Is that not working?