Computer tools for solving the traveling salesman problem


Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License

The task of the traveling salesman, which is to find the shortest or least costly circular route, is one of the most common optimization problems that need to be solved in various fields of practice. The article analyzes and demonstrates various methods for solving this problem using a specific example: heuristic (the nearest neighbor method, the most profitable neighbor method), metaheuristic (evolutionary algorithm), methods of mathematical programming. In addition to classic exact methods (which are difficult to use for large-scale tasks based on existing software) and heuristic methods, the article suggests using the innovative features of the commercially available MS Excel software using a meta-heuristic base. To find the optimal solution using exact methods, the Excel (Solver) software package was used, as well as the specialized GAMS software package. Comparison of different approaches to solving the traveling salesman problem using a practical example showed that the use of traditional heuristic approaches (the nearest neighbor method or the most profitable neighbor method) is not difficult from a computational point of view, but does not provide solutions that would be acceptable in modern conditions. The use of MS Excel for solving the problem using the methods of mathematical programming and metaheuristics enabled us to obtain an optimal solution, which led to the conclusion that modern tools are an appropriate addition to solving the traveling salesman problem while maintaining the quality of the solution.

view full abstract hide full abstract
    • Figure 1. An example of solving the traveling salesman problem using the nearest neighbor algorithm
    • Figure 2. An example of solving the TSP problem using the most profitable neighbor algorithm
    • Figure 3. Filled form of restrictive conditions for TSP
    • Figure 4. General route sequence
    • Figure 5. Program code in the GAMS software system for TSP solving
    • Figure 6. Initial Settings for Configuring Solutions
    • Table 1. Distance matrix D
    • Table 2. Frequency matrix E
    • Table 3. Source data and auxiliary calculation results in MS Excel
    • Table 4. Restrictive conditions
    • Table 5. Initial data and the results of solving the traveling salesman problem
    • Table 6. Results of solving the traveling salesman problem by various considered methods
    • Conceptualization
      Juraj Pekár, Jaroslav Kultan
    • Methodology
      Juraj Pekár
    • Supervision
      Juraj Pekár, Ivan Brezina
    • Formal Analysis
      Ivan Brezina, Iryna Ushakova
    • Investigation
      Ivan Brezina, Jaroslav Kultan
    • Software
      Jaroslav Kultan
    • Writing – original draft
      Jaroslav Kultan, Oleksandr Dorokhov
    • Validation
      Iryna Ushakova
    • Writing – review & editing
      Iryna Ushakova, Oleksandr Dorokhov
    • Project administration
      Oleksandr Dorokhov