google distancematrix api - Distance Matrix of 7,000 points - Stack Overflow

admin2025-04-18  2

I need to optimize routes to visit 7,000 points (~700 routes).

Should I calculate a Distance Matrix of size 7000 X 7000 = 49,000,000 options? That means I would receive a Google invoice of ~0.005*49M = $245,000.

I need to optimize routes to visit 7,000 points (~700 routes).

Should I calculate a Distance Matrix of size 7000 X 7000 = 49,000,000 options? That means I would receive a Google invoice of ~0.005*49M = $245,000.

Share Improve this question edited Jan 29 at 14:59 Adriaan 18.2k7 gold badges44 silver badges86 bronze badges asked Jan 29 at 14:54 ZetesIL DevZetesIL Dev 11 bronze badge 1
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Bot Commented Jan 31 at 6:24
Add a comment  | 

1 Answer 1

Reset to default 1

No, you shouldn't do that. Not only because of the monetary cost, but because it's a well-known NP-hard optimisation problem, that of the traveling salesman. You should instead use an optimisation algorithm to find a "good enough" solution, rather than to brute force all the possible routes.

转载请注明原文地址:http://anycun.com/QandA/1744958730a90039.html