Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSP with matrix docs correct? #123

Closed
dkastl opened this issue Jun 14, 2013 · 1 comment
Closed

TSP with matrix docs correct? #123

dkastl opened this issue Jun 14, 2013 · 1 comment
Assignees
Milestone

Comments

@dkastl
Copy link
Member

dkastl commented Jun 14, 2013

In the travel sales person problem an example is provided, I having problems understanding it

The example route network is posted as http://docs.pgrouting.org/dev/doc/src/developer/sampledata.html#sampledata

I have assume the distance between red node 1 and red node 3 is 2, ie the unit distance 1 +1 which I make to be 2

given that

I think the route matrix should be

    1 2 3 4
======
1 | 0 1 2 3
2 | 1 0 1 2
3 | 2 1 0 1
4 | 3 2 1 0

distance 1 to 4 is 1+1 +1 ==3
distance 2 to 4 is 1+1       ==2
distance 3 to 4 is 1
etc

But the give value is (please see http://docs.pgrouting.org/dev/src/tsp/doc/index.html)

    1 2 3 4
1  {0,1,2,3},
2  {1,0,3,2},
3  {2,3,0,4},
4  {3,2,4,0}

I just don't understand how the distance between 3 and 4 can be the value 4, ditto he values between 2 and 3

@dkastl
Copy link
Member Author

dkastl commented Jun 18, 2013

I have created a new example using points from the sample data. but still it takes some time to read the matrix.
(docs will be rebuild in the next days)

@dkastl dkastl closed this as completed Jun 18, 2013
@dkastl dkastl removed the 2.0 label Mar 23, 2015
thisisashukla pushed a commit that referenced this issue May 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant