FubarDevelopment / QuickGraph

Fork of https://quickgraph.codeplex.com/
Microsoft Public License
9 stars 2 forks source link

CP-13111: HoffmanPavleyRankedShortestPathAlgorithm #71

Closed fubar-coder closed 6 years ago

fubar-coder commented 6 years ago

From unknown CodePlex user on Saturday, 25 April 2009 02:02:11

Hi Jonathan,   This repro should do :     int    

    ii = 0;

 

      BidirectionalGraph<int, TaggedEdge<int, int>> mvGraph2 = new BidirectionalGraph<int, TaggedEdge<int, int>>();

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(0, 1, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(1, 2, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(2, 3, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(3, 4, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(4, 5, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(5, 0, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(1, 5, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(5, 1, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(2, 5, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(1, 0, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(2, 1, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(3, 2, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(4, 3, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(5, 4, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(0, 5, ii++));

  mvGraph2.AddVerticesAndEdge(       new TaggedEdge<int, int>(5, 2, ii++));

 

      HoffmanPavleyRankedShortestPathAlgorithm<int, TaggedEdge<int, int>> test1 = new HoffmanPavleyRankedShortestPathAlgorithm<int, TaggedEdge<int, int>>(mvGraph2, E => 1.0);

  test1.ShortestPathCount = 5;       //int.MaxValue;

        test1.Compute(5, 2);     Thanks for the support!     Have a nice weekend, Frank

fubar-coder commented 6 years ago

Form unknown CodePlex user on Wednesday, 29 April 2009 11:21:35

Hi Jonathan,

Sorry for the late reply, but very busy at work, no time left in the evening to do some verification. But I have run a test now and yes it is OK.

Thanks for taking care of this problem!

Best regards, Frank

fubar-coder commented 6 years ago

Form unknown CodePlex user on Wednesday, 29 April 2009 12:07:18

Hi Jonathan,

Maybe I'm missing the point here, but in the example you can see at http:\users.telenet.be\loccommander\images\SingleRoute.png , when the ShortestPathCount is set to 5, 10, or bigger, only 1 route is found I would expect when I set it to 5 the 5 shortest between start point and end point are calculated when there are at least 5. But in the example there are certainly more than 1.

Best regards, Frank

fubar-coder commented 6 years ago

Form unknown CodePlex user on Wednesday, 29 April 2009 20:47:39

fixed the problem when path with loops were added to the queue

** Closed by pelikhan 4/25/2009 9:46 PM

fubar-coder commented 6 years ago

Form unknown CodePlex user on Tuesday, 26 May 2009 11:41:05

Hi Jonathan,

What kind of arguments needed to be added now to the constructor?

HoffmanPavleyRankedShortestPathAlgorithm<int, TaggedEdge<int, MRBaseObject>> test1 = new HoffmanPavleyRankedShortestPathAlgorithm<int, TaggedEdge<int, MRBaseObject>>(graph, ??? ); it seems E => 1.0 is no longer supported?

Thanks,

Frank

fubar-coder commented 6 years ago

Form unknown CodePlex user on Tuesday, 09 June 2009 23:39:09