[pgrouting-users] TSP - the same source and destination point

Dave Potts dave.potts at pinan.co.uk
Tue Mar 6 03:47:07 EST 2012


I had come accros this problem as well.

If you do not include the source/target in the list of nodes, you get a
core dump in the server process.
Stephen Woodbridge wrote:
> On 3/5/2012 1:43 PM, Dariusz Górski wrote:
>> 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."
>
> Ok, that is not good. Please write a bug ticket for this and a separate
> bug for the fact that it does not create a loop.
>
> In the short term you can work around the loop problem knowing that you
> do not have a closed loop and issuing a separate request from the last
> point to the start point, but this should not be required in my opinion.
>
>> 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.
>
> Please write this up as another bug. Hopefully if we have tickets on
> this stuff we can clean up a lot of these issues in the next release
> when ever that happens.
>
> Thanks,
>    -Steve
>
>> 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
>>>
>>
>> _______________________________________________
>> 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