Wasn't it igloo who wrote:

>An interesting programming problem to optimise without coming foul of 
>too many calls too fast on the Google servers :-)

The TSP needs the road distances between every node, but solving the CPP 
only needs knowledge the distances between nodes where an odd number of 
roads meet (so that you can choose which ones to travel along twice). 
For all other purposes, the solution doesn't rely on the length of the 
roads, because the Postman has to travel along every road in his patch, 
however long it is.

However, since the CPP is solvable in polynomial time, it is possible 
that you might well be working with many more nodes than would be 
practical for the TSP. So the same sort of GDirections strategy might 
apply: if there are lots of odd nodes to scan, first measure the 
distances with GLatLng.distanceFrom(), and only get the GDirections() 
road distance for a few pairs of nodes that have short straight-line 
distances.

-- 
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to