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

Dariusz Górski darekgorski at o2.pl
Mon Mar 5 16:20:20 EST 2012


Steve, thank you for your help.

I've created issues with mentioned bugs on GitHub.

W dniu 2012-03-05 19:52, Stephen Woodbridge pisze:
> 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.
>
Looking at the results of TSP function,I do not think that order of 
visited points is correct to make of them a closed loop. In my opinion 
TSP solver does not assume that the source_id for the start is also the end.
I hope that someone will be able to solve this problem.

Best regards,
Darek
>> 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
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20120305/2ab54ee1/attachment-0001.html


More information about the Pgrouting-users mailing list