These days, you get out a computing device, open Google Maps or equivalent ... undirected graph, requiring the algorithm to take into account the cost of each edge as well as the total cost ...