[pgrouting-users] TSP - the same source and destination point
Dariusz Górski
darekgorski at o2.pl
Mon Mar 5 13:43:49 EST 2012
If I do not include the start node in the list of stops, I'll get an error:
" The connection to the server was lost. Attempting reset: Failed."
I'm using Ubuntu Server 11.10, PostgreSQL 9.1.3, Postgis 1.5.3,
pgrouting 1.05 with patch
https://github.com/sanak/pgrouting/commit/6ec1672f79f7070c60fb6095342d7d0b55cf2659
Inside TSP warappers I've changed "tsp_test" to " ' ||
quote_ident(geom_table) || ' " in order to get them to work.
Darek
W dniu 2012-03-05 19:03, Stephen Woodbridge pisze:
> What happens if you do not include the the start node in the list of
> stops? For example:
>
> SELECT * FROM tsp_dijkstra('ways','552,169,784,1567,314',272);
>
> I have not used this function in pgRouting so I don't know what to
> expect.
>
> -Steve
>
> On 3/5/2012 12:56 PM, Dariusz Górski wrote:
>> W dniu 2012-03-05 15:15, Stephen Woodbridge pisze:
>>> On 3/5/2012 6:00 AM, Dariusz Gorski wrote:
>>>> Hello List,
>>>>
>>>> First of all I'd like to say thanks to the pgrouting Team for this
>>>> great project.
>>>>
>>>> I've build pgrouting with patch:
>>>> https://github.com/pgRouting/pgrouting/pull/49
>>>>
>>>> It works fine, but only in case when source and destination are
>>>> different points.
>>>>
>>>> My aim is to solve TSP problem, when start and end point are the same.
>>>>
>>>> Any help would be appreciated.
>>>
>>> The patch was for specifying a separate end point. But according to
>>> the thread on the link above, just leave off the last parameter and it
>>> should work as before. where you give it a list of ids that you want
>>> it to visit and the source_id for the start which is also the end.
>>>
>>> -Steve
>>> _______________________________________________
>>> Pgrouting-users mailing list
>>> Pgrouting-users at lists.osgeo.org
>>> <mailto:Pgrouting-users at lists.osgeo.org>
>>> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>>>
>> Steve, thanks for your reply.
>> I've tried it before, but even when I use standard TSP functions,
>> e.g. SELECT * FROM tsp_dijkstra('ways','552,272,169,784,1567,314',272);
>> I don't get the loops (attached image).
>> This is the reason why I thought that in TSP functions only starting
>> point is fixed, but endpoint calculates TSP solver.
>> According to your hint, where source = destination, I would expect to
>> receive loop.
>> In my case it does not work in this way.
>> What am I doing wrong or what am I missing?
>>
>> Darek
>>
>>
>> _______________________________________________
>> Pgrouting-users mailing list
>> Pgrouting-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
More information about the Pgrouting-users
mailing list