4 ms·
It's been a while since I looked into this myself, but I used to do a lot of GIS work and have a lot of experience with the tools for doing this kind of analysi
by heynickc 11y ago
It's been a while since I looked into this myself, but I used to do a lot of GIS work and have a lot of experience with the tools for doing this kind of analysis. Doing a quick search around for a general purpose algorithm for the "traveling salesman problem" - I came across this: http://www-sre.wu-wien.ac.at/ersa/ersaconfs/ersa03/cdrom/papers/433.pdf http://www-sre.wu-wien.ac.at/ersa/ersaconfs/ersa03/cdrom/pap...
In my experience, the most important part of doing network analysis is to have a "topology model" for your road network data. It contains the information necessary to model turns, drive-time, traffic signals, etc.
Anyway, I used to know the 1000 ft view of the math behind this stuff but not anymore. If, however, you're trying to build it into an application - there are solutions like pgRouting https://github.com/pgRouting/pgrouting https://github.com/pgRouting/pgrouting which utilizes PostGIS (PostgreSQL), ESRI's Network Analyst ($$), and Google Maps Directions API. These all leverage some underlying topology data like Open Street Map to do routing and figure out the subsequent times/schedule to get from point to point to point...
Hope this helps!
- tmaly 11y agoThanks, I have no real experience in this. I was hoping there was some general purpose library available to do this. I would even be ok to just consider straight line distances without regard to traffic etc.
- heynickc 11y agoGotcha. You might also be able to search around Mapbox's Github repos https://github.com/mapbox https://github.com/mapbox for a good library, or at least some good examples.