[pgrouting-dev] New TSP API

Daniel Kastl daniel at georepublic.de
Sun May 19 06:35:06 PDT 2013


On Sun, May 19, 2013 at 10:16 PM, Stephen Woodbridge <
woodbri at swoodbridge.com> wrote:

> Hi Dave, et al,
>
> One of the stumbling blocks I have have had with creating a new API for
> TSP is how we should pass the distance matrix. So I have been thinking of
> something like this:
>
> select * from pgr_tsp(matrix <type>, num integer, start integer);
>

Hi Steve,

What is "num integer" supposed to be?


>
> The matrix type could be text for a SQL query that would return num rows
> of num float8 or it could be float8[][] that is [num][num] elements. And I
> support with a little extra work I could support both of these.
>

I would prefer some "regular" SQL query (if there is no strong argument
against.

What about this:

SELECT * FROM pgr_tsp( 'SELECT id, start, end, cost FROM distances, origin
int [, destination int])

... which would return the matrix in an optimized order.
I think it would be nice to be able to set origin and destination point.
But destination could be optional.

Daniel








>
> I'm not interested in computing the distance matrix because I will not be
> able to do it "right" for any given use case and it limits how people can
> use the function.
>
> Thoughts?
>
> -Steve
> ______________________________**_________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/pgrouting-dev<http://lists.osgeo.org/mailman/listinfo/pgrouting-dev>
>



-- 
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20130519/29d3a720/attachment-0001.html>


More information about the pgrouting-dev mailing list