I am trying to run the shortest_path function on various nodes on a graph.

I am using a starting vertex, and returning all vertices within a certain threshold distance. The edges are weighted by a distance metric.

My dilemma is that it works as intended except for some nodes. All I can think of is that the problematic edges have an edge that exceeds the threshold distance, in which case it is returning only one edge, instead of all edges that are less than the threshold distance.

Is it possible that once the algorithm reaches an edge that exceeds the cutoff distance, that it stops then-and-there, instead of searching the remaining vertices?

I am attaching my python file and the graph file that I’m testing this on.

- The file prints information about two test vertices to the console, one of a working vertex (A) and the other of a vertex (B) that doesn’t work as anticipated. (I can’t see anything suspiciously different between them.)

- It also plots three copies of the graph:

A) filtered graph of vertex (A);

B) filtered graph of vertex (B);

C) non-filtered copy of the entire graph showing index numbers and weights

Thanks.

Plaza.xml.gz (5.48 KB)

shortestDistanceTest.py (2.35 KB)