Publisher review:Traveling Salesman Problem solves the TSP by implementing a GA Finds a (near) optimal solution to the Traveling Salesman Problem (TSP) by setting up a Genetic Algorithm (GA) to search for the shortest path (least distance needed to travel to each city exactly once)Variable inputs: NUM_CITIES or CITIES and/or several optional input parametersNUM_CITIES is an integer representing the number of citiesCITIES is an Nx2 matrix representing XY coordinates for N user specified citiesOptions include ...'-NOPLOT', which turns off the GA progress plot'-RESULTS', which turns on some plots at the end of the GA'POPSIZE',VAL, sets the GA population size to be VAL'MRATE',VAL, sets the mutation rate to VAL'NUMITER',VAL, sets the number of GA iterations to VALOutputs:SORTED_CITIES is the CITIES matrix sorted by the best routeBEST_ROUTE is a 1xN vector representing the input city order,SHORTEST_DISTANCE is the distance between all of the cities along the best routeExample usage:>> [sorted_cities, best_route, distance] = tsp_ga(40, 'popsize',80, 'numiter',250, '-results'); % Solves the TSP for 40 randomly generated cities with a population size of 80 and 250 iterations, as well as plotting the results.Notes:1. Input error checking included2. Inputs can be specified in any order, so long as the parameter pairs are specified as a 'parameter', value Requirements: ยท MATLAB Release: R2006b
Traveling Salesman Problem is a Matlab script for Miscellaneous scripts design by Joseph Kirk.
It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
Operating system:Windows / Linux / Mac OS / BSD / Solaris