Timeline for FindShortestTour to solve Traveling Salesman Problem
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 20, 2015 at 19:13 | comment | added | Michael Seifert |
Your problem is that you have a mix of Entity objects and GeoPosition objects in your list. So run the above code with cities containing only the Entity objects; this turns them into GeoPositions. Then Join that list with the last 8 GeoPositions. This should give you something that you can feed into FindShortestTour. Finally, you'll need to plot GeoPath[locs[[tour]]] , rather than GeoPath[cities[[tour]]] .
|
|
Apr 20, 2015 at 14:24 | comment | added | Sarah | Yes this is what I want to do. However, I already have my 50 cities picked out. I have them in these forms: Entity["City", {"NewDelhi", "Delhi", "India"}] GeoPosition[{15.33, 76.46} I'm just not sure how to make FindShortestTour to recognize all the cities | |
Apr 17, 2015 at 19:26 | history | edited | Greg Hurst | CC BY-SA 3.0 |
added 58 characters in body
|
Apr 17, 2015 at 18:49 | history | answered | Greg Hurst | CC BY-SA 3.0 |