Traveling salesman problem (TSP) is one of the optimization problems to find the shortest route, where each city is only allowed to visit exactly once. The search for the shortest route can be completed by several algorithms, one of which is the genetic algorithm. Genetic algorithm is an optimization algorithm that works by imitating the evolutionary process in nature. During the evolution process, individuals with the best fitness may undergo changes that result in a decrease in fitness. Therefore, in order to keep individuals with the best fitness from becoming extinct during the evolutionary process, it is necessary to make copies of these individuals which is called elitism. There are three models of elitism, namely, Model 1: the best individuals are copied as many as m replacing the worst m individuals, Model 2: the best m individuals replace the worst m individuals, and Model 3: the best m individuals replace the worst m individuals selected randomly from 100%-m worst individual. The values of the m parameters are 10%, 20%, 30%, and 40%. The tests were carried out with elitism and without elitism on different populations and cities. The test results show that Model 2 with m = 10% and population = 20 is the ideal parameter in solving TSP.
Copyrights © 2022