pgRouting / pgrouting

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

Adding support for non continuous number ranges, and Symmetric distances to the current traveling salesman problem #167

Open dapotts opened 10 years ago

dapotts commented 10 years ago

The files in the gist dapotts / atspmat.sql add support for

  1. Non continuous number ranges in the pgr_tsp. Usage is select seq,id from pgr_mktspret('select source,target,cost from edge5' ,xx); where xx is any node, which does have to be in the range 1-N
  2. A function for checking if your distance matrix is valid pgr_checktsparray, takes an distance matrix and check that there are enough values, only zeros are in the leading diagnonal, The value i,j is the same as j,i
  3. A method for resolving the Asymmetric salesman problem. Process a a distance matrix where the cost of A-B is not the same as B-A
woodbri commented 10 years ago

Here is a link to Dave's gist: https://gist.github.com/dapotts/6133259 I think some variation of this should be considered from 2.1

dkastl commented 10 years ago

This is nice! Thanks @dapotts ! I think it's good to collect additional functions first as Gists and we can then see what makes sense to include to core pgRouting. Maybe different cases can be unified and generalized then.

"matching.sql" was exactly a case, where some functions were useful for many but they often were too specific and now sometimes users ask where the functions are they used before.