I have a city roads data base witch is returning different values from this ‘selects’.
select sum(cost) from pgr_Dijkstra(‘SELECT id, source, target, cost, reverse_cost FROM ruas’, 3423, 3839, true, true);
select sum(cost) from pgr_kdijkstraPath(‘SELECT id, source, target, cost, reverse_cost FROM ruas’, 3423, array[3839], true, true);
select sum(cost) from pgr_ksp(‘SELECT id, source, target, cost, reverse_cost FROM ruas’, 3423, 3839, 1, true);
Manually I have seen that the pgr_Dijkstra has the correct path.
And the others has passed from edges who is not the shortest path.
Is it an alghorithm error?
…
Omar Fernando Pessôa
http://www.opessoa.com
Desenvolvedor de sistemas
Programador C# e C++