[pgrouting-dev] Building some tools to work with TSP

Helder Alves helderalvespt at gmail.com
Thu Dec 12 11:07:54 PST 2013


I've already compiled that version... ;-)

Can you please check the query below?

select * from pgr_trsp(
    'select id, source, target, cost, reverse_cost from ways',
    pgr_pointstovids(

 pgr_texttopoints('-8.6406,40.65374;-8.6637,40.64008;-8.6923,40.63095;-8.7411,40.63105',
4326),
       'ways'),     -- array of vids
    false,  -- directed graph?
    false  -- has_reverse_cost?
    );

This is the result I get from the query:

seq;id1;id2;cost
1;-1;0;0
2;-1;0;0
3;-1;0;0

If I run a standalone pointstovids query, these are the vids I get:
"{228347,228369,98306,146098}"

I must tell you that the geometry between 228347 and 146098 is just fine
and routable, and to go from a vid to the other you have to go though
228369 and 98306.

Do you have any idea of what is going on here?

Thanks! :-)


--
Helder Alves
+351912384076


On Thu, Dec 12, 2013 at 6:28 PM, Stephen Woodbridge <woodbri at swoodbridge.com
> wrote:

> On 12/12/2013 12:49 PM, Helder Alves wrote:
>
>> Hi Steve,
>>
>> Where did you put pgr_trsptsp in the source tree?
>>
>
> I don't think I did anything like that. IIRC, the discussion was to use
> pgr_vidsToDMatrix() that uses kdijkstra to compute the distance matrix,
> then use TSP to get the ordered list of points then call trsp with an array
> of locations to get point to point routes with via points. Read
> src/trsp/doc/index.rst in the develop branch.
>
> You might be thinking about:
> https://github.com/pgRouting/pgrouting/tree/develop/src/kdijkstra
>
>  Where I Added a new version of pgr_vidsToDMatrix written in C that is 3X
> fast…
>
> -Steve
>
>  I can't find it...
>>
>> Thanks!
>>
>> --
>> Helder Alves
>>
>>
>>
>> _______________________________________________
>> pgrouting-dev mailing list
>> pgrouting-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>>
>>
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20131212/bf650782/attachment.html>


More information about the pgrouting-dev mailing list