[pgrouting-users] suspected bug in TSP distance matrix pgRouting RC1 released

Dave Potts dave.potts at pinan.co.uk
Fri Jul 19 03:45:57 PDT 2013

I have been trying to do some work which requires the tsp, some of my 
values have values of 0.1 in the dataset, I keep getting odd results.

So I tried a well known example from the  pgr _tsp distance page and it 
work as expected.

I then repeated the same example but reduced all of the distance by a 
factor off 10 and got an error.  Unless I have make a mistake in my 
understanding of the manual page, I think we might a problem where

-- version used
select pgr_version();
-- Use a example get a result set
SELECT seq, id FROM 
  seq | id
    0 |  1
    1 |  2
    2 |  3
    3 |  0
(4 rows)
-- repeat for reduce everything by  scale factor of 10  ie 1.0 becomes 
0.1 etc

SELECT seq, id FROM 

ERROR:  Error TSP fail to findEulerianPath, check your distance matrix 
is valid.

As far as I understand it my matrix has 0's on the leading diangonal  
and [a,b] == [b,a]


More information about the Pgrouting-users mailing list