Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One bug in finding the shortest pathes #10

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 9 comments
Open

One bug in finding the shortest pathes #10

GoogleCodeExporter opened this issue Mar 14, 2015 · 9 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. run the program as normal
2. using a complete directed graph(just as the testing file test_17)
3. set the path number more than 3

What is the expected output? What do you see instead?
the program throw an exception

What version of the product are you using? On what operating system?
using MS visual studio 2005 with MS XP2 system

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 29 Apr 2009 at 1:55

@GoogleCodeExporter
Copy link
Author

Could you please give more details about the running case? Like, which package 
are
you using? What is the starting/ending point? ......

Original comment by [email protected] on 29 Apr 2009 at 7:16

@GoogleCodeExporter
Copy link
Author

Hi, 
Thank you so much for your reply.
I used the latest version of your codes, KShortestPath_1.0.3 and tested the 
program 
using the test file you provided, the test_17.  The starting point is 0, and 
terminal is 5, K>=2. 

I have also tested it using another 4 nodes complete graph, setting the same 
cost 
for each of the links , like 1, and when I set starting point as 0, terminal as 
3, 
and K>=3, the same error happens.

For the same test file , sometimes, it may run correctly for a certain pair of 
nodes, but for some other pairs of nodes, the error happens.
Attached is the error and I have found that the possible error happens at the 
function "m_candidatePathsSet.insert(new CQYDirectedPath(new_node_id, 
cost_new_path, 
new_path));" in the file "QYKShortestPaths.cpp".

Could you please test it and tell me how to correct it? 

Original comment by [email protected] on 30 Apr 2009 at 1:12

Attachments:

@GoogleCodeExporter
Copy link
Author

Surprisingly, I didn't get any problem when I checked the program in my 
machine. I am
using VC6.0, and running the program in WinXP. From the screen-dump, it seems 
that
the problem may be related to the compiler you are using now. Not sure what 
caused
this exception. 

Original comment by [email protected] on 30 Apr 2009 at 2:01

@GoogleCodeExporter
Copy link
Author

I am using MS visual stdio 2005 with windows XP sp3. Have you checked the file 
test_17 with starting point 0 and end point at 5, and K>=3. I do not know why 
when I 
debug it, the exception happens.

Original comment by [email protected] on 30 Apr 2009 at 2:08

@GoogleCodeExporter
Copy link
Author

Any suggestions for how to avoid the exception, please?
Thank you so much!

Original comment by [email protected] on 30 Apr 2009 at 2:21

@GoogleCodeExporter
Copy link
Author

I can confirm that there is NOT a bug. I am using MS Visual Studio 2003 on 
Windows XP
SP3. The attached image shows the program to be working as expected.

Original comment by [email protected] on 19 May 2009 at 9:54

Attachments:

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

thank you, timothyahahn, I still have the exception problem as the attached 
image 
shows and I found the problem was with the definition of Comparator. When more 
than 
one paths have the same cost and the same length, my complier begin to 
complain. I 
have solved the problem by adding the pathID as a parameter. 

Original comment by [email protected] on 20 May 2009 at 2:34

Attachments:

@GoogleCodeExporter
Copy link
Author

I was able to replicate the bug using the VS 2005 compiler, but it seems that 
both the 
VS 2003 and VS 2008 compilers work fine. Maybe you should post your revised 
code to 
this forum for others who might be using VS 2005.

Original comment by [email protected] on 24 Jul 2009 at 8:23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant