[pgrouting-dev] Problems with TSP

Dave Potts dave.potts at pinan.co.uk
Sun Jun 23 02:19:45 PDT 2013


Just looked at the write up for the tsp, ok the answer will be in the 
range 0-(X-1) where X is the number of points provided, the returned 
index starts of at zero in set as one as found in postgres arrays.  But 
I do not understand the remark id, 'index into the matrix'  the matrix 
is a two dimension so I I don't understand how the index is desgined to 
work!


On 23/06/13 10:04, Dave Potts wrote:
> I having some problems with the tsp
>
> I have a matrix {{0,31,22,42},{31,0,90,2},{22,90,0,27},{42,2,27,0}}, 
> starting at node 2,  I get the answer
> seq | id
> -----+----
>    0 |  2
>    1 |  3
>    2 |  1
>    3 |  0
> (4 rows)
> using the matrix
>
>  {{0,22,42,31},{22,0,27,90},{42,27,0,2},{31,90,2,0}} starting at node 
> 4  I get the answer
> seq | id
> -----+----
>    0 |  0
>    1 |  1
>    2 |  2
>    3 |  3
> The matrix is topological identicial, I start off at the same 
> topological node, so I was expecting the same answer, also I was 
> expecting all nodes to be in the result set ie nodes 1,2,3 and 4, for 
> some strange reason I get 0.
>
> Is there some mistake in my data?
>
> regards
>
>
> Dave.
>
>
>
>
>
> _______________________________________________
> 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/20130623/09bf174f/attachment.html>


More information about the pgrouting-dev mailing list