Travelling Salesman Problem - A Genetic Algorithm Approach

GUI which provides a genetic algorithm based solution for solving the NP Travelling Salesman Problem
다운로드 수: 2.3K
업데이트 날짜: 2015/12/11

라이선스 보기

This Graphic User Interface (GUI) is intended to solve the famous NP-problem known as Travelling Salesman Problem (TSP) using a common Artificial Intelligence method: a Genetic Algorithm (GA).

Execute ‘main.m’ for running the main GUI program. As shown in the thumbnail, the program allows the user to configure every single parameter of the GA.

First of all, it is necessary to set the cities to travel on the map. The GUI offers three different options: a circled position, a random position or a custom one. If ‘circled’ or ‘random’ are selected, it is necessary to set the number of cities. In contrast, if ‘custom’ is selected, a new figure will rise up for introducing each city position with the mouse.

Once the city map is created, it is time to set the optimal parameters for solving the problem. Those parameters are the population size, the maximum number of generations, the mutation and crossover likelihoods, if elitism is wanted or not and the type of likelihood variation (i.e., whether it is necessary to vary the likelihood with a linear tendency or it is better to maintain the values as constants).

Finally, pressing the ‘run’ button, the algorithm will start. In this case, fitness is the inverse of the distance, because the algorithm is trying to find the shortest route (i.e., chromosome) that connects all the cities (i.e., minimizing the traveled distance). The GUI presents 4 different graphs: distance matrix (bottom left), best local route in the current generation (upper left), best local route found until the moment (upper right) and fitness monitoring (bottom right). In addition, the AG can be stopped at any time.

인용 양식

Víctor Martínez-Cagigal (2024). Travelling Salesman Problem - A Genetic Algorithm Approach (https://www.mathworks.com/matlabcentral/fileexchange/54420-travelling-salesman-problem-a-genetic-algorithm-approach), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2013a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

Comments added in 'pop_selection' and 'main' functions.
Grammar error.