Kb24
May 31st, 2009, 02:50 AM
Hi i'm new here.. Got a little coding problem..
I'm creating an excel macro to determine shortest route between a number of nodes using Floyd's algorithm..
I had no problem calculating and displaying the distance,
but I can't get the path Matrix to give correct result..
From the network pic below, the correct path for T1 to T2 is supposed to be :
T7-T8-T3-T4
But my program gives me T8 - T4..
So i need help fixing the path algorithm in Xls file here :
http://ifile.it/j8dc1a9/floyd_no_cycle.xls
I hope anyone familiar with this algorithm could help me, I'm stuck at this problem for weeks.. :(
Thanks in advance.
I'm creating an excel macro to determine shortest route between a number of nodes using Floyd's algorithm..
I had no problem calculating and displaying the distance,
but I can't get the path Matrix to give correct result..
From the network pic below, the correct path for T1 to T2 is supposed to be :
T7-T8-T3-T4
But my program gives me T8 - T4..
So i need help fixing the path algorithm in Xls file here :
http://ifile.it/j8dc1a9/floyd_no_cycle.xls
I hope anyone familiar with this algorithm could help me, I'm stuck at this problem for weeks.. :(
Thanks in advance.