pgRouting / pgrouting

Repository contains pgRouting library. Development branch is "develop", stable branch is "master"
https://pgrouting.org
GNU General Public License v2.0
1.14k stars 364 forks source link

Support pick n shortests routes in Cost Matrix #2509

Open latot opened 1 year ago

latot commented 1 year ago

Hi all!

Problem Actually, the Cost Matrix functions does not support pick the n shortests routes, the only option is go down one level and use for example one to multi.

Improvement Add a param to be able to choose the n min paths!

Alternatives Is possible, to run this collect all the n routes using the n to multi functions, but there is some tricky things about it, actually for bidirectional case, calc the route from a to b, is the same as b to a, due to this, the matrix cost can handle better performance, while if we run one by one the one to multi this improvement is not done.

Thx!