{"id":27617871,"url":"https://github.com/thomasgassmann/maps-list-tsp","last_synced_at":"2025-04-23T04:57:21.617Z","repository":{"id":289143898,"uuid":"970108694","full_name":"thomasgassmann/maps-list-tsp","owner":"thomasgassmann","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-22T15:30:55.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T04:57:18.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomasgassmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-21T13:39:51.000Z","updated_at":"2025-04-22T15:30:58.000Z","dependencies_parsed_at":"2025-04-22T04:05:34.094Z","dependency_job_id":null,"html_url":"https://github.com/thomasgassmann/maps-list-tsp","commit_stats":null,"previous_names":["thomasgassmann/maps-list-tsp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasgassmann%2Fmaps-list-tsp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasgassmann%2Fmaps-list-tsp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasgassmann%2Fmaps-list-tsp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomasgassmann%2Fmaps-list-tsp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomasgassmann","download_url":"https://codeload.github.com/thomasgassmann/maps-list-tsp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372942,"owners_count":21419722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-23T04:57:21.089Z","updated_at":"2025-04-23T04:57:21.611Z","avatar_url":"https://github.com/thomasgassmann.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Google Maps TSP Solver\n\n## How to use\n\nYou will need a Google API key with the following APIs enabled:\n\n- Places API\n- Geocoding API\n- Distance Matrix API\n\nThen use the API key to run the TSP on the csv file:\n\n```bash\ncargo run --release -- --csv maps/example.csv --api-key \u003cyour-api-key\u003e --start \"Panda Noodle Bar\" --end \"Arches National Park Visitor Center\"\n```\n\nYou can use `--mode distance` to calculate the TSP on distance values. The default (`--mode time`) minimizes time.\n\nYou can also specify the algorithm to be used via the `--algorithm` flag. The default is `held-karp`. You have the following options:\n\n- Held Karp (`held-karp`): time: $O(n^2 2^n)$, space: $O(2^n)$\n- Brute Force (`brute-force`): time $O(n!)$, space: $O(n^2)$, parallelized\n\nNote that the number of API requests scales quadratically with the number of nodes in the csv!\n\n## Getting a csv file or your list\n\nTo get the CSV file of your saved places, you will need to use Google Takeout (select \"Saved\").\n\n## Example output\n\n```text\nRunning algorithm: held-karp\n\nOptimal Path:\n-------------\n1. Panda Noodle Bar\n2. Silverton\n3. Park Avenue Trailhead\n4. La Sal Mountains Viewpoint\n5. Courthouse Towers Viewpoint and Trailhead\n6. Balanced Rock Trailhead\n7. Upper Delicate Arch Viewpoint Trail\n8. Devil's Garden Trail\n9. Fiery Furnace Viewpoint\n10. Salt Valley Overlook\n11. Panorama Point\n12. Double Arch Viewpoint and Trail\n13. Arches National Park Visitor Center\n\nSegment Distances:\n------------------\nPanda Noodle Bar -\u003e Silverton: 1148 minutes\nSilverton -\u003e Park Avenue Trailhead: 231 minutes\nPark Avenue Trailhead -\u003e La Sal Mountains Viewpoint: 2 minutes\nLa Sal Mountains Viewpoint -\u003e Courthouse Towers Viewpoint and Trailhead: 3 minutes\nCourthouse Towers Viewpoint and Trailhead -\u003e Balanced Rock Trailhead: 9 minutes\nBalanced Rock Trailhead -\u003e Upper Delicate Arch Viewpoint Trail: 9 minutes\nUpper Delicate Arch Viewpoint Trail -\u003e Devil's Garden Trail: 15 minutes\nDevil's Garden Trail -\u003e Fiery Furnace Viewpoint: 8 minutes\nFiery Furnace Viewpoint -\u003e Salt Valley Overlook: 3 minutes\nSalt Valley Overlook -\u003e Panorama Point: 7 minutes\nPanorama Point -\u003e Double Arch Viewpoint and Trail: 6 minutes\nDouble Arch Viewpoint and Trail -\u003e Arches National Park Visitor Center: 19 minutes\n\nOptimal distance from \"Panda Noodle Bar\" to \"Arches National Park Visitor Center\": 1460 minutes\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasgassmann%2Fmaps-list-tsp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomasgassmann%2Fmaps-list-tsp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomasgassmann%2Fmaps-list-tsp/lists"}