[pgrouting-users] TSP weridness in development version of postgres matrix TSP
Dave Potts
dave.potts at pinan.co.uk
Tue Jun 25 03:55:38 PDT 2013
According to the web page
http://docs.pgrouting.org/dev/src/tsp/doc/index.html
The first parmeter 'start' in the distance matrix version, is the
starting node, so in the following examples, I assume that the first
entry in the results set would be the same as the 'start' parmeter. It
'works' fine in Example1 and Example2, but Example3 and Example4 start
off from node 1 and 0, I was assuming that they would be starting off
from node 2 and 3.
Is there any reason for this?
Dave.
==============================================
Example1
tsp=# SELECT seq, id FROM
pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',0);
seq | id
-----+----
0 | 0
1 | 1
2 | 3
3 | 2
(4 rows)
Example2
tsp=# SELECT seq, id FROM
pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',1);
seq | id
-----+----
0 | 1
1 | 3
2 | 2
3 | 0
(4 rows)
Example3
tsp=# SELECT seq, id FROM
pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',2);
seq | id
-----+----
0 | 1
1 | 3
2 | 2
3 | 0
(4 rows)
Example4
tsp=# SELECT seq, id FROM
pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',3);
seq | id
-----+----
0 | 0
1 | 1
2 | 3
3 | 2
(4 rows)
More information about the Pgrouting-users
mailing list