I'm trying to write my own code to find the shortest route but I'm lost on how or where to start. Does anyone have any idea how the FindShortestTour function works? What type of algorithm or structure should I have in my code?
Thanks
THANKS FOR ALL THE HELP. I figured it out.
tour = FindShortestTour[GeoPosition[{12.3, 76.6}],
GeoPosition[{13.21, 75.99}], GeoPosition[{9.61, 77.15}],
GeoPosition[{10.08, 77.0597}], GeoPosition[{15.33, 76.46}],
GeoPosition[{12.62, 80.1994}], GeoPosition[{26.35, 92.67}],
GeoPosition[{11.58, 75.59}]][[2]]
This is the error I get:
FindShortestTour::nonopt: Options expected (instead of GeoPosition[{11.58,75.59}]) beyond position 1 in FindShortestTour[GeoPosition[{12.3,76.6}],GeoPosition[{13.21,75.99}],GeoPosition[{9.61,77.15}],GeoPosition[{10.08,77.0597}],GeoPosition[{15.33,76.46}],GeoPosition[{12.62,80.1994}],GeoPosition[{26.35,92.67}],GeoPosition[{11.58,75.59}]]. An option must be a rule or a list of rules. >>
NEW INFO- these are my 50 points
{Entity["City", {"Bombay", "Maharashtra", "India"}],
Entity["City", {"Bengaluru", "Karnataka", "India"}],
Entity["City", {"Agra", "UttarPradesh", "India"}],
Entity["City", {"Aurangabad", "Maharashtra", "India"}],
Entity["City", {"Khajuraho", "MadhyaPradesh", "India"}],
Entity["City", {"Jammu", "JammuAndKashmir", "India"}],
Entity["City", {"Mormugao", "Goa", "India"}],
Entity["City", {"Jaipur", "Rajasthan", "India"}],
Entity["City", {"Udaipur", "Rajasthan", "India"}],
Entity["City", {"Jaisalmer", "Rajasthan", "India"}],
Entity["City", {"Leh", "JammuAndKashmir", "India"}],
Entity["City", {"Manali", "HimachalPradesh", "India"}],
Entity["City", {"Shimla", "HimachalPradesh", "India"}],
Entity["City", {"Gangtok", "Sikkim", "India"}],
Entity["City", {"Darjiling", "WestBengal", "India"}],
Entity["City", {"Kanyakumari", "TamilNadu", "India"}],
Entity["City", {"Haridwar", "Uttaranchal", "India"}],
Entity["City", {"NainiTal", "Uttaranchal", "India"}],
Entity["City", {"NewDelhi", "Delhi", "India"}],
Entity["City", {"DehraDun", "Uttaranchal", "India"}],
Entity["City", {"Amritsar", "Punjab", "India"}],
Entity["City", {"FatehpurSikri", "UttarPradesh", "India"}],
Entity["City", {"Hyderabad", "Telangana", "India"}],
Entity["City", {"Mangaluru", "Karnataka", "India"}],
Entity["City", {"Shillong", "Meghalaya", "India"}],
Entity["City", {"Visakhapatnam", "AndhraPradesh", "India"}],
Entity["City", {"Kedarnath", "Uttaranchal", "India"}],
Entity["City", {"Tirupati", "AndhraPradesh", "India"}],
Entity["City", {"Kodaikanal", "TamilNadu", "India"}],
Entity["City", {"Calcutta", "WestBengal", "India"}],
Entity["City", {"Matheran", "Maharashtra", "India"}],
Entity["City", {"Varanasi", "UttarPradesh", "India"}],
Entity["City", {"Mahabaleshwar", "Maharashtra", "India"}],
Entity["City", {"BodhGaya", "Bihar", "India"}],
Entity["City", {"Lucknow", "UttarPradesh", "India"}],
Entity["City", {"Madurai", "TamilNadu", "India"}],
Entity["City", {"Jabalpur", "MadhyaPradesh", "India"}],
Entity["City", {"MountAbu", "Rajasthan", "India"}],
Entity["City", {"Ramnagar", "Uttaranchal", "India"}],
Entity["City", {"Ootacamund", "TamilNadu", "India"}],
Entity["City", {"Thiruvananthapuram", "Kerala", "India"}],
Entity["City", {"Madras", "TamilNadu", "India"}],
GeoPosition[{12.3, 76.6}], GeoPosition[{13.21, 75.99}],
GeoPosition[{9.61, 77.15}], GeoPosition[{10.08, 77.0597}],
GeoPosition[{15.33, 76.46}], GeoPosition[{12.62, 80.1994}],
GeoPosition[{26.35, 92.67}], GeoPosition[{11.58, 75.59}]