In the delivery of a package, goods, and conducting business, location is a crucial factor to manage. A common issue is the late arrival of packages because delivery couriers cannot find the fastest or most efficient route. This study aims to apply a genetic algorithm to optimize the traveling salesman problem (TSP) for the distribution of goods to 20 Indomaret outlets in the Dago area of Bandung City. TSP is a classic optimization problem that seeks to find the shortest route that visits each city once and returns to the origin city. The genetic algorithm, as a population-based search and optimization method, is used due to its capability to find near-optimal solutions for complex and large problems. This algorithm leverages natural selection mechanisms such as selection, crossover, and mutation to develop solutions from one generation to the next. Initial parameters were set with a population of 100 and a maximum of 500 generations to increase the variety of solutions without taking too much time. The fitness value was obtained by taking the negative of the total distance traveled, and after the iteration process, an optimal result with a fitness value of -0.10 was achieved. It only took 50 seconds to run 500 generations for selecting the distribution route of 20 Indomaret outlets.
Copyrights © 2024