a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment
wasoxygen  ·  3441 days ago  ·  link  ·    ·  parent  ·  post: The Traveling Tesla Salesman

    I can't prove that this shape is longer

Oh wait, it's trivial.

The shortest distance between two Tesla Supercharger stations is a straight line.

To make this more realistic, we could have the distance_on_earth function call the Google Maps Directions API instead of calculating a great circle route.

For example, directions from the Auburn, Alabama (32.627837, -85.445105) to the Greenville superstation (31.855989, -86.635765) show a distance of 102 miles. "distance" : {

                    "text" : "102 mi",
                    "value" : 163692
                 },
                 "duration" : {
                    "text" : "1 hour 30 mins",
                    "value" : 5415
                 }
We could allow the Tesla salesman to avoid "any combination of tolls, highways and ferries," or even find the shortest path by walking to all the superstations.