A NOVEL DISCRETE RAT SWARM OPTIMIZATION (DRSO) ALGORITHM FOR SOLVING THE TRAVELING SALESMAN PROBLEM

: Metaheuristics are often used to find solutions to real and complex problems. These algorithms can solve optimization problems and provide solutions close to the global optimum in an acceptable and reasonable time. In this paper, we will present a new bio-inspired metaheuristic based on the natural chasing and attacking behaviors of rats in nature, called a Rat swarm optimizer. Which has given good results in solving several continuous optimization problems, and adapted it to solve a discrete, NP-hard, and classical optimization problem that is the traveling salesman problem (TSP) while respecting the natural behavior of rats. To test the efficiency of the adaptation of our proposal, we applied the adapted rat swarm optimization (RSO) algorithm to some reference instances of TSPLIB. The obtained results show the performance of the proposed method in solving the traveling salesman problem (TSP). design design


Introduction
The traveling salesman problem (TSP) (Pintea et al., 2017) This is an NP-Hard (Tanaev et al., 1994) problem in combinatorial optimization, in which the traveling salesman wishes to visit a certain number of cities, starting and ending its route with the same city of departure, visiting these cities only once, making the shortest possible route. This is an important problem in theoretical computer science and operations research. TSP has several applications, even in its purest formulation, such as astronomy, logistics, transportation, and telecommunications. the resolution of this problem in a reasonable execution time led the researchers to propose an approximation algorithm such as heuristics, such as simulated annealing (SA) (Johnson et al., 1989), Taboo search (TS) (Glover, 1989), local search (Korupolu et al., 2000), etc. and metaheuristics such as Ant Colony ( Wang et al., 2012), genetic algorithm (GA) ( Rybickova et al., 2012), Particle Swarm Optimization (PSO) (Wang et al., 2003), Hybrid methods: A novel hybrid penguins search optimization algorithm , discrete optimization of the search for penguins , New discrete hybrid PSO (Bouzidi & Riffi, 2014), Particle Swarm Optimization with Simulated Annealing (Fang et al., 2007), Discrete cat swarm optimization (Bouzidi & Riffi ,2013), Elephants Herding Optimization (EHO) (Hossam et al., 2018), Ant colony optimization (ACO) (Bao, 2015), Artificial bee colony (ABC) (Gündüz et al., 2015), Discrete social spıder (Baş & Ülker, 2021), etc.
In general, the most commonly used heuristics are based on nature, animal behavior, and artificial intelligence. These algorithms have several advantages over other heuristics: they can contain information about the entire search space and are very easy to implement. These algorithms have fewer parameters, which means they require less memory than other metaheuristics (Dhiman et al., 2022). These algorithms can explore the right balance between search spaces by traversing the entire operation space to find the optimal value. These advantages are a huge motivation to adopt a new Bio-Inspire-based metaheuristic algorithm (called RSO), which has been recently developed to solve continuous optimization problems such as the pressure vessel problem, and the gearbox design problem. Welded beam design problem, Tension/compression spring design problem, Rod support design problem, Bearing design problem.
The results are much better than the seven best-known meta-heuristics and are robust (Dhiman et al., 2020).
The objective of this work is to adapt the Rat swarm Optimization (RSO) algorithm, introduced in 2020 by Gaurav Dhiman, to solve the traveling salesman problem (TSP) a classical discrete optimization problem, very well known for its complexity and very useful in several domains. A new fitness function based on the Euclidean distance is proposed to deal with the discontinuity, which has been neglected in other algorithms.
This adaptation consists in reconstructing again this method by introducing new mathematical operators and by modifying just the values of the parameters of the method. Without touching the definition of the proposed rat behavior.
The organization of this research is as follows: In Sect. 2, a presentation of the traveling salesman problem; In Sect. 3, a presentation of the RSO algorithm introduced to solve continued optimization problems. In Sect. 4, the adaptation of the RSO Optimization Algorithm to solve the traveling salesman problem. In Sect. 5, the results of tests using TSPLIB instances. Finally, comes the conclusion in the last section.

The Travelling Salesman Problem
The traveling salesman problem (TSP) is one of the oldest and most studied combinatorial optimization problems. This problem aims to find the shortest circuit which allows him to visit a certain number of cities and pass once and only once per city and return to his starting point, at a lower cost, by covering the shortest distance possible. The distances between cities are known. We must find the path that minimizes the distance traveled.

The importance of resolving TSP:
The traveling salesman problem consists of determining whether it is possible to travel through n cities in such a way that the sum of the distances traveled in each city is the least costly. Solving the traveling salesman problem is usually very timeconsuming. Therefore, new strategies must be found for the solvers. The Trade Traveler Problem (TSP) essentially aims to find the shortest route through a set of points to minimize the cumulative cost of travel overall routes. Since a solution must determine the number of cities, it cannot always successfully solve large-scale problems. As such, TSP is one of the NP-complete tasks, which means that although there are efficient algorithms, none of them are sure to stop in a finite time. This makes solving TSP more difficult, more important, and more motivating.

RSO Algorithm
Gaurav Dhiman introduced the Rat Swarm Optimizer (RSO) (Dhiman et al., 2020) in 2020 to solve continuous optimization problems. The RSO algorithm is inspired by the chasing and attacking behaviors of rats. Rats are long-tailed and medium-sized rodents, socially intelligent by nature and they are territorial animals that live in groups of two males and females, they participate in various activities.
such as jumping, running, and tumbling. And boxing. But they are very aggressive, which in many cases results in the death of some animals. This aggressive behavior when hunting and fighting with prey gave rise to this algorithm. The hunting and fighting behaviors of the rats are mathematically modeled to design the RSO algorithm and perform the optimization.

Rats behavior modeling
This subsection describes the behavior of rats, chasing and fighting. Then the proposed RSO algorithm is outlined.

Chasing the prey
In general, rats are social animals that hunt prey in groups due to their agonistic social behavior. To define this behavior mathematically, we assume that the best researcher knows the location of the prey. Other search agents can update their positions against the best search agent obtained so far. To model this mechanism the following equations are proposed: Where ⃗X represents the positions of rats and X is the best optimal solution. A and C are calculated as follows: Where x in [0 , 1, 2…Max-iteration]. Therefore, R and C are random numbers between [1, 5] and [0, 2], respectively. Parameters A and C are responsible for better exploration and exploitation during iterations.

Fighting with prey
The process of fighting rats with prey is mathematically defined by the following equation: Where +1 defines the newly updated position of the rat. It saves the best solution and updates the positions of other search agents against the best search agent. The adjusted values of parameters A and C guarantee good exploration and exploitation. The RSO algorithm will record the optimal solution with the fewest operators.
Step 2: Choose the initial parameters of RSO: A, C, and R.
Step 3: Now, calculate the fitness value of each search agent.
Step 4: The best search agent is then explored in the given search space.
Step 5: Update the positions of search agents using Eq(1).
Step 6: Check whether any search agent goes beyond the boundary limit of a search space and then amend it.
Step 7: Again, calculate the updated search agent fitness value and update the vector Xbest if there is a better solution than the previous optimal solution.
Step 8: Stop the algorithm if the stopping criteria are satisfied. Otherwise, return to Step 5.
Step 9: Return the best obtained optimal solution. END

Use RSO to Solve the TSP
This section presents the adaptation of the RSO method to solve a TSP. The adaptation of RSO consists in redefining the algebraic operators of the algorithm and the structures and stages of this algorithm

Adapted Discrete RSO to Solve the TSP
The RSO method proposed by Dhiman et al. (2020) was defined to solve continuous optimization problems, so it cannot be applied to solve discrete combinatorial optimization problems, since in continuous optimization a number represents the solution, on the other hand in combinatorial optimization, the solution is represented by an order which can be modeled as a vector or a sequence of numbers. To adapt the RSO to solve the problems of discrete combinatorial optimization, it is necessary to adapt the operations and the operators while respecting the real behavior of the Rats:

Generate the initial Rats population
Choose the initial parameters of RSO Calculate the fitness value of each search agent Update the positions of the other search agent using equation (3) Calculate the fitness value of the new search agent Update the agent of search if is a better solution than the previous one

Experimental results:
The implementation of the RSO optimization algorithm adapted to solve the TSP was carried out on the programming language C ++, and the simulations were carried out on a personal computer equipped with a CORE i7-3540 M CPU at 3.00 GHz, 8 GB of RAM, and Windows 10 (64 bits). Table 1 shows the results of the executions of this algorithm on several different reference instances of TSPLIB.
The parameters were set as follows: the number of rats was set at 100, the number of iterations varied between 6000 and 8000 depending on each instance, C is a random variable between 0 and 1, and R and X remain the same as in the original algorithm.
A novel discrete Rat Swarm optimization (DRSO) algorithm for solving the traveling…

293
The table displays the following information:  Inst: name of the benchmark instance in the TSPLIB library.  Nb.node: number of nodes.  Opt: the best-known solution for the instance.  BestR: the best solution found by the algorithm after ten different executions.  WorstR: the worst solution found by the algorithm after ten different executions.  Average: the average of ten different executions of the algorithm  Time: displays the average time in seconds of ten different executions of the algorithm  Err: (%) is the percentage relative error  PDbest(%): the percentage deviation of the best solution length from the optimal

Comparison and discussion:
In this part, we will try to compare the results of the application of the RSO with the results of other more known metaheuristics. The results of ACO (ant colony optimization) were taken from (Bao, 2015), the results of ABC (artificial bee colony) (Gündüz et al., 2015), and the results of HA (Wang et al., 2011).

Discussion
The following examples show a comparison of the objective function values of the proposed method with other existing metaheuristics for the Oliver30, Eil51, Berlin52, St70, Eil76, Kroa100, and Eil101 instances of TSPLIB.
The results in Table 2 confirm that the RSO algorithm can solve multiple TSPLIB instances in a very reasonable runtime. To prove the robustness of the algorithm, Table 1 compares the average solution proposed by the RSO algorithm with other methods applied to solve the TSP using TSPLIB. The table also compares the execution time obtained by the algorithm with the other bio-inspired algorithm that solves TSP.
According to the results in Table 2 and Figures 2, 3, 4, and 5, the results obtained by the RSO algorithm are good compared to the other methods and this is evident from the RSO curve that is lower than the other methods. This can be justified by the simplicity of RSO and its parameters, which can guarantee a much faster convergence than other algorithms. In some cases, this algorithm gave results close to the optimum without reaching it, is it because this algorithm is guided by a single search agent which is the best global search agent, and after several iterations, all the agents and solutions converge towards this optimum. To solve this limitation and to make this optimizer more robust, we will consider adding other improvements or hybridization heuristics.

Conclusion
In this paper, we first presented an adaptation of the RSO algorithm proposed by Dhiman et al (2020) without hybridization to solve the symmetric PSD. This adaptation achieved good performance compared to several metaheuristics.
Discrete rat swarm optimization (DRSO) is one of the most intelligent and powerful algorithms. This algorithm can be used to solve any optimization problem, including the traveling salesman problem (TSP). This algorithm has great potential to become a very powerful optimization technique. In DRSO, each rat is a simple entity capable of moving in one dimension to find the best path in its environment. Each rat can visit a point in its neighborhood or search for a new point in a radius area around the current point.
The algorithm has been tested on a set of benchmark instances of TSPLIB. Its performance exceeds that of recent methods used to solve TSP, such as ACO, ABC, HA, and DSSA. Moreover, the robustness and speed of the RSO algorithm encourage its use to solve other combinatorial optimization problems.
In the future, we will try to improve this algorithm to obtain better results than the majority of methods and we aim to extend the algorithm to apply it to various application domains and solve any discrete optimization problem such as network optimization, scheduling, transportation problems, vehicle routing problem, electronic manufacturing units, etc.
Several improvements have been made to the algorithm to solve the quadratic assignment problem, a new problem as important as the TSP, designed to minimize the overall cost of building and operating a facility.