A bit long shot here, since I did not find too much documentation on the HoffmanPavleyRankedShortestPathAlgorithm in QuickGraph, so I assume that many people do not use it, but I have a few questions returning the correct results with a ranked least-path algorithm and wondering if anyone then found the same problem.
I fill out a BiDirectional plot with 1900 vertices and 20,000 edges, and I set a plot to return 150 paths. He does this, but he does not return several paths that might be expected, namely the one that should occupy the top 20 shortest paths. My expectation of the system is that if I asked for 150 paths, it would return 150 shortest paths in order.
Now, when I force it to return more than 1000 paths, the expected path appears. Has anyone encountered such a problem before and could improve the way the chart is created? I cannot force the system to return 1000 paths because it takes too much time to process.
Here is the relevant code: Setting the schedule:
BidirectionalGraph<string, TaggedEdge<string, int>> pathGraph = new BidirectionalGraph<string, TaggedEdge<string, int>>(); ... add vertices and edges
Algorithm setup:
HoffmanPavleyRankedShortestPathAlgorithm<string, TaggedEdge<string, int>> hoffmanAlgorithm = new HoffmanPavleyRankedShortestPathAlgorithm<string, TaggedEdge<string, int>>(pathGraph, E => 1.0); try { hoffmanAlgorithm.ShortestPathCount = 150; hoffmanAlgorithm.SetRootVertex(startPoint.ToString()); hoffmanAlgorithm.Compute(startPoint.ToString(), endPoint.ToString()); foreach (IEnumerable<TaggedEdge<string, int>> path in hoffmanAlgorithm.ComputedShortestPaths) {
As I said, I'm not too sure about getting an answer here, but I thought I'd try anyway. The QuickGraph discussion forum on CodePlex no longer works, or I'll try there.
Many thanks