color traveling salesman problem

English: Colored Traveling Salesman Problem

Summary:

The multiple traveling salesman problem is an important combinatorial optimization problem. It has been widely and successfully used in practical cases where multiple traveling salesmen (salespeople) share a common work space (city set). However, it cannot represent some application problems where multiple traveling salesmen not only have their own dedicated tasks but also share a set of tasks with each other. This work proposes a new MTSP for handling such situations, called the colored traveling salesman problem (CTSP). Two types of city groups are defined, a set of exclusive cities in each unique color that salespeople can access, and a shared set of cities in multiple colors that can be accessed by all salespeople. There is evidence that CTSP is NP-hard, with multi-point MTSP and multiple single traveling salesman problems being special cases. We propose a two-chromosome encoding genetic algorithm for CTSP and analyze the corresponding solution space. Then, the genetic algorithm is improved by combining greedy, hill climbing (HC) and simulated annealing (SA) operations to obtain better performance. Through experiments, the limitations of the exact solution method are revealed, and the performance of the proposed genetic algorithm is compared. The results show that SAGA can achieve the best solution quality, while HCGA should be the choice with a good trade-off between solution quality and calculation time


introduction

The multiple TSP problem is generalized from the Traveling Salesman Problem (TSP) and is a well-known combinatorial optimization problem [1]. It aims to determine a lowest-total-cost sequence in which multiple salespeople visit each city once within a given group and ultimately return to their hometowns. MTSP and TSP appear in a variety of applications that need to solve scheduling, planning, routing and/or sequencing problems. Applications of TSP to machine scheduling and sequencing and vehicle routing are reported in [15]. They also appear in the fields of circuit wiring [17] and statistical data analysis, including ranking and clustering objects, such as gene ranking in [32] and protein clustering in [19]. Due to recent advances in multi-objective optimization algorithms, for example, multi-objective evolutionary algorithms using decomposition and ant colonies [20], decomposition-based memetic algorithms [21], snowdrift game optimization [46], physarum optimization [26], it can Significantly promote the application of multi-objective TSP, a technique called multi-objective multi-population co-evolution [48], Gaussian classifier-based evolution strategies [50], particle swarm optimization [51]-[56] and fragment-based search to improve evolutionary algorithms [25]. The paper [4] provides a good summary of the application of MTSP. For example, Gorenstein [14] reported on the printing schedule of a multi-edition journal. Carter and Ragsdale [5] highlighted its application in preprint interstitial advertising scheduling. Applications in crew scheduling [22], [40], [49], interview scheduling [13], labor balancing [28] and hot rolling scheduling [41] are reported. Autonomous robot or vehicle motion planning [3], [33], [47] represents an important application area of ​​MTSP. Sariel Talay et al. [35] and Toth and Vigo [42] studied a vehicle routing problem. Cheong and White [7] studied how to dynamically determine the TSP trip based on real-time traffic congestion data. MTSP has recently been utilized to plan the access sequence of areas required by UAVs in [9]. The results show that it significantly reduces the expected total travel cost for realistic-sized pickups in congested urban environments.

Essentially, MTSP is an abstraction of a real problem where multiple executives (traveling salesmen) are involved and share a common workspace (city set). In other words, every salesperson has access to every city in MTSP. However, in some application problems, not all execution individuals have the same workspace. Take the scheduling of a typical multimachine engineering system (MES) shown in Figure 1 as an example. The workspaces of individual machines are not identical but partially overlap each other. Therefore, each machine not only has to perform operations independently in its own dedicated workspace, but also performs all tasks together with other machines in overlapping workspaces.

Due to partial overlap of work spaces, MTSP cannot be used to model scheduling problems in manufacturing execution systems. However, the basic elements of such a problem, namely goals, individual machines, and tasks, can still be matched to MTSP's goals, salespeople, and cities, respectively. Unfortunately, the counterpart of dedicated and shared workspaces in MES for different task groups cannot be found in MTSP. By abstracting these scheduling problems, we propose a new MTSP with different colored city sets, called Colored TSP (CTSP). This is a common problem that originates from, but is not limited to, scheduling problems in multi-machine systems. Therefore, it deserves considerable research both theoretically and practically.

Like TSP and MTSP, CTSP is NP-hard. Additionally, restricted access makes its solution more difficult and time-consuming compared to MTSP. Many appropriately sized MTSP instances can be solved by using some precise methods such as the cutting plane method, the branch and cut method, and the well-known branch and bound procedure. Gavish and Srikanth [11] proposed a branch-and-bound algorithm for solving large-scale symmetric MTSP instances. The results show that the size of the non-Euclidean and Euclidean problems can be up to 500 cities and 10 salesmen, and 100 cities and ten salesmen respectively.

Heuristic methods have been shown to solve large MTSPs faster and more efficiently than exact methods, possibly at the expense of solution optimality. Therefore, they are suitable for solving situations in which a satisfactory solution is sufficient. Several artificial neural network methods extended from the TSP method have also been proposed in [18], [31], [38] and [43] to solve MTSP.

Genetic algorithms (GA) [45] represent another direction . Zhang et al. [49] and Tang et al. [41] used genetic algorithms to solve MTSP caused by hot rolling scheduling. It is converted into a single TSP and solved with a modified genetic algorithm. Carter and Ragsdale [6] proposed a new two-part chromosome and correlation operator for MTSP. Computational tests show that their method produces a smaller search space and, in many cases, produces better solutions than those with just one or two chromosomes.

Ghafurian and Javadian [12], Ryan et al. [33] and Song et al. [39] developed ant colony, tabu search and simulated annealing (SA) algorithms to solve MTSP. Shim et al. [36] proposed a distributed mixture estimation algorithm with decomposition to solve multi-objective MSTP. Sodge et al. [37] compared various evolutionary computing algorithms for solving MTSP, including neighborhood attractor schemes, “shrink wrap” algorithms, particle swarm optimization, Monte Carlo algorithms, genetic algorithms, and evolutionary strategies.

Li et al. [23] called CTSP MTSP* and proposed a GA solution. However, CTSP is not formulated in a mathematically rigorous way. The main contributions of this paper are: 1) giving a formal definition of CTSP and revealing the differences between CTSP, MTSP and the combination of MTSP and TSP by comparing their solution space sizes; 2) developing three GAs to effectively solve CTSP; and 3) experimentally compare the performance of three GAs and the exact solution via LINGO. The comparison results are extensive and can be used to help engineers select the appropriate algorithm for a specific CTSP application.

Next, Section 2 defines and formulates CTSP. Section 3 reviews GA and proposes three improved GAs. Section 4 conducts experiments and performance comparisons of the proposed algorithms. The paper is concluded in Section V.


2. Definition of CTSP


A.CTSP definition

Suppose a CTSP has m salesmen and n cities, where m<n and n, m∈Z={1, 2, 3,…}. It can be formulated on a complete directed graph G = (Ş, E), where the vertex set Ş = {0, 1, 2…, n−1} numbers the cities; and (i, j) ∈ E is edges, each of which is associated with a weight ω ij representing the access cost (e.g., distance) between two cities i and j. Ş is divided into m+1 disjoint non-empty sets, namely shared city set U and mutually exclusive city set Vi , ∀i∈ Zm={1,2,…,m} . Vertex di∈U  \cup V i represents the warehouse divided and returned by the salesperson. We assign color i to salesperson i. ∀a∈Vi, its color is i, and only salesperson i can access it. ∀a∈U, its color set is (a)⊆Z m, where |(a)|>1, if i∈(a), salesperson i can access a. The goal of CTSP is to determine m Hamiltonian cycles on G with the minimum total travel cost. Here, all vertices of each mutually exclusive set must be visited once by the designated salesperson, and any node of the shared set must be visited once by the salesperson.

In CTSP, the composition of the shared city set U can be various. The most common one is that U is shared by all m salespeople, that is, ∀a∈U, color(a)=Zm. An example is shown in Figure 2. The vertices in the V1−V3 area represent the exclusive cities of salespersons 1–3 respectively. U is the only shared city among all salespeople. Salesperson i has access to Vi  \cup U.

When di=0∈U, ∀i∈Zm and ∀a∈U, c(a)=Zm, the integer programming model of CTSP is as follows. If the k-th salesman passes edge (i, j), the binary variable x_{ijk}= 1, i \neqj, i, j∈Ş, and k∈Zm,; otherwise x_{ijk}= 0. you_{i}is the number of nodes visited by the k-th salesperson during his journey from the warehouse to node i. The objective function of the problem is:

Subject to the following restrictions: First, each salesperson starts from city 0 (warehouse) and returns, that is:

as well as:

Salesperson k cannot visit the exclusive cities of other salespersons starting from his own exclusive city, and salespersons other than salesperson k are also prohibited from accessing the latter's exclusive cities.

Salesperson l ( l \neq k ) can neither start from salesperson k's exclusive city nor return to k's exclusive city.

Except for city 0, each city must be visited exactly once by a salesperson:

A salesperson may visit a shared city, and if so a pair of entries and exits is required

The formation of any unconnected sub-route between nodes in Ş\{0} is prohibited by the following equation combined with (10)

Theorem 1: CTSP is NP-hard.

Evidence: According to its definition, CTSP is modified from MTSP by dividing its cities into multiple exclusive city sets and a shared city set, with additional attainable limits set by (4)-(7). Let each V i, i∈Z m contain only one city, and remove city 0 from U. This model becomes a model of multi-stage MTSP. On the other hand, when U={0}, the model becomes one model for multiple single TSPs with the same warehouse 0. TSP and MTSP have been proven to be NP-hard [5], [6]. As U or V i are restored, the time complexity of the model does not change due to its operation. Therefore, CTSP is NP-hard.

Looking at the evidence, we get the following results.

Corollary 1: Multipoint MTSP and multiple single TSPs are special cases of CTSP.

Consider a combination of a TSP and an MTSP (consisting of several individual TSPs), each TSP in an exclusive city set, and an MTSP in a common city set (given the same multiple salespeople). Can CTSP be converted to such a combination for solution? The answer is no. The former requires multiple salespeople to visit all shared cities after visiting all exclusive cities or vice versa. In CTSP, salespeople visit different cities in any order, including exclusive cities and shared cities. Therefore, the solution space size of CTSP is different from this combination and MSTP for the same problem size due to additional urban access restrictions (reachability).

Clustering TSP [8], [10], [27] and generalized TSP [16] are two variants of TSP. Both are defined on the same graph G as TSP. The former aims to determine the minimum cost Hamiltonian cycle on G, where the vertices of any cluster are continuous, while the latter aims to find the minimum cost cycle, where exactly one vertex occurs in each cluster. To the authors' knowledge, there is no work that generalizes them to multiple salespeople. CTSP is different from them because it has multiple salespeople and different shared and exclusive city clusters.

3. GA for CTSP

A. Two-chromosome representation and solution space analysis

Due to the combinatorial complexity of CTSP, it is necessary to use heuristics to solve sizable problems. GA represents a heuristic method that many researchers have applied to TSP and MTSP [5], [6], [30] . Li et al. [23] developed a basic genetic algorithm to solve CTSP. Existing single-chromosome and two-part chromosome coding schemes used in [6] are not suitable for CTSP due to their urban access requirements. We represent the solution of the CTSP modeled in Section 2 as a decimal-coded double chromosome, the city and salesman chromosomes, with individual length n−1. Warehouse 0 for all salespeople is not encoded in the chromosome but is added to the final solution to satisfy (2) and (3). The first chromosome has an arrangement of n−1 cities, while the second chromosome assigns a salesperson to each shared and exclusive city at the corresponding position of the first chromosome, following (4)–(7) and (10) ) represents the city salesperson matching relationship. According to (8) and (9), given any generation, a city can appear only once in a person. Solution encoding prevents the formation of subtours, as (10) and (11) do

Figure 3 shows an example of CTSP encoding for n=10 and m=3. Genes 1 and 2 in the city chromosome are the exclusive city of salesperson 1, genes 3 and 4 of salesperson 2, and genes 5 and 6 of salesperson 3. It represents the city salesperson matching relationship that must be met. Shared cities are genes 7-10 and can be assigned to any salesperson. Cities 2, 8, 7 and 1 (in order) are visited by salesperson 1. Similarly, Salesperson 2 visits cities 10, 4, and 3 (in that order), and Salesperson 3 visits cities 9, 5, and 6 (in that order).

Given a CTSP with m salesmen and n cities, the number of exclusive cities for salesman i is ni, and the number of shared cities is n0, \sum_{i=0}^{m}n_{i}=n.


Theorem 2: The solution space size of CTSP with dichromatic coding is n!m^{n_{0}}.

Proof: For a city chromosome with n cities, whether it is an exclusive city or a shared city, there are n! arrangement. Given the arrangement of cities, due to the city-salesperson matching relationships (4)-(9): first, for any exclusive city, only one is assigned to the designated salesperson; second, for each of the n0 shared cities, There are m assigned to all sales staff. So for any permutation of cities, salespeople have 1^{n-n_{0}}*m^{n_{0}}=m^{n_{0}}permutations. One solution to CTSP is a combination of city chromosomes and salesman chromosomes. Therefore, the size of the solution space of CTSP, that is, the permutations and combinations of double chromosomes, must be n!m^{n_{0}}.


Theorem 3: The solution space size of CTSP with the same size and dual-chromosome encoding is smaller than that of MTSP, but larger than the solution space of the combination of MTSP and TSP.

Proof: As shown in [6], the solution size of MTSP with two-chromosome encoding is n! rice. CTSP n! solution space size! mn 0 is less than n! rice. The combination of TSP and MTSP means that each salesperson's visit to an exclusive city set is treated as several independent TSPs, and all salesperson's visits to a shared city set are treated as one MTSP. The solution is to combine the results of both parts. For TSP i, its city arrangement is ni! . Consider m TSPs as a total number, and its arrangement is m! For the MTSP part with n0 shared cities, the arrangement is n0! mn 0. Therefore, the solution space size of the combination of TSP and MTSP is permutation (πm1(ni!)×m!)×(n0!mn0). It is smaller than n! mn 0. Therefore, the conclusion holds.

This makes CTSP inherently different from MSTP and the combination of TSP and MTSP due to the size of their solution spaces in terms of the same problem size and urban access constraints . Any salesperson can access any city in the MSTP city set, while any salesperson can access their own exclusive city and the shared city for any order in CTSP. Unlike the combination of TSP and MTSP, CTSP does not require that all shared cities must be visited after all his exclusive cities or vice versa.


B. Basic GA

Li et al. [23] used a combination of roulette method and elite strategy as the selection operation. They compared the composition of three pairs of crossover and mutation operators, and the results showed that the combination of urban crossover and mutation (CCM) had the best performance. The urban crossover operation is an improved partial matching crossover operation . Figures 4 and 5 show the crossover process of a single crossover between a double chromosome and a city chromosome.

First, two fragments with the same range are randomly selected from two urban individuals of a given parent, and then the two fragments are swapped, resulting in two new individuals. Second, replace the redundant genes outside the two urban chromosome segments with genes that conform to the gene exchange relationship between the two segments, until no redundant genes remain. Finally, check that each captive city is assigned to the correct salesperson and correct incorrect assignments, if any. An example of urban intersection is shown in Figure 4 . In step 1, the gray crossover segments are selected into the two urban chromosomes, and then their genes at the same position are exchanged one by one. The exchange relationships are 8-3, 9-8, 5-2, 4-7, 7-1 and 1-10. The exchange will produce two new individuals, as shown in step 2. After this exchange relationship, redundant genes outside the two segments are gradually replaced until no redundant genes are found. For example, according to the exchange relationship 8-3, the repeated gene 3 located at the last second position of the left city chromosome should be replaced by 8. However, after the replacement, the new gene 8 is still duplicated and must be replaced again by gene 9 according to the exchange relationship 9-8. The resulting exclusive cities 5, 3, 7, 1, and 6 in the left chromosome and cities 2, 5, and 4 in the right chromosome were assigned to the wrong salesperson. Step 4 reassigns them to the correct salesperson and generates two viable candidates.

The urban mutation process of double chromosomes includes two steps, that is, first, select a pair of genes in the urban chromosome for exchange; second, if necessary, correct the two corresponding genes in the salesman chromosome according to the urban salesman matching relationship. In Figure 5, genes 8 and 7 were selected and exchanged. They are shared cities and can be assigned to any salesperson. Therefore, the city salesperson matching relationship is satisfied and the mutation ends.

The fitness function is used to reflect how to achieve the CTSP goal. The larger the fitness value, the better, but the lower the total cost, the better. Therefore, we take the reciprocal of the total cost f of solving x as the fitness function.

The basic genetic algorithm process includes selection, CCM and fitness calculation. Li et al. [23] pointed out that genetic algorithms evolve slowly and can easily fall into local optima.


C. Greedy initialized GA (GAG)

The decision made by the greedy algorithm at each step may not reach the global optimum, but reach the local optimum. However, it can quickly achieve a satisfactory solution because it avoids expending huge efforts to exhaust all possibilities to find the best solution. We use it to optimize the individuals in the initial population randomly generated in the first step of the genetic algorithm. A high-quality initial population can accelerate the population evolution of the genetic algorithm to quickly reach a satisfactory solution. We name this improved algorithm the genetic algorithm with greedy initialization, in short, it is the genetic algorithm (GAG).

Regarding CTSP, city access is subject to nearby requirements. That is, the salesperson in the current city chooses the next closest city to it. It can optimize the solution through reordering. For example, as shown in Figure 6, the randomly generated medical visit sequence is 0→ 2.→ 5.→ 3.→ 1.→ 4.→ and the sum of distances is 25+50+50+45+45+25=240. Can be optimized to 0→ 3.→ 4.→ 5.→ 1.→ 2.→ 0 by using greedy algorithm. The new distance from the sun is 22+25+27+35+25+25=159, which is much smaller than the original one. Note that in some cases the edge weights may not be distances, such as traffic flow [44], which should then be converted to appropriate distance values.

The generation process of the initial population in GAG is as follows.

Step 1: Determine whether the number of individuals in the current initial population is equal to the set number N. If so, please exit.

Step 2: Randomly generate a city sequence, assign exclusive cities to designated salespeople, and randomly assign shared cities to all salespeople. The resulting sequence is named individual a.

Step 3: Reorder a’s city sequence by the shortest distance criterion to minimize the access cost and obtain individual a′.

Step 4: Detect whether a' already exists in the population. If it is, return to step 2; otherwise, insert it into the population and return to step 1.


D. Hill-Climbing GA (HCGA)

The hill climbing algorithm utilizes neighborhood search techniques to search in a single direction like hill climbing to improve the quality of the solution [24] . Starting from an existing node, it generates a new solution using a neighborhood point selection method and compares it with the values ​​of existing nodes. If the former is larger, replace the latter with the former; otherwise, return the latter and set it to the maximum value. Repeat the process of climbing up until you reach the highest point. This algorithm has strong local search capabilities and is a commonly used method for local optimal search.

As a global search algorithm, the mentioned GAG does not use personal information to guide the search except for personal fitness. Its convergence performance is limited. The hill climbing algorithm has strong local search capabilities, and its search is guided based on the quality of individuals. In order to improve the local search capability of the genetic algorithm, the best individuals of each generation can be selected through hill climbing operations. Specifically, if a better individual is obtained through hill climbing, it will replace the original individual; note that HCGA also uses a greedy algorithm to optimize the initial population.

The choice of neighborhood points greatly affects the hill-climbing algorithm, and this work uses two-point exchange. Given a CTSP with m (≥2) salesmen, 2M genes should be selected by this selection strategy. After each gene exchange, fitness must be recalculated. The ramp operation consists of the following steps.

Step 1: Determine whether the i-th salesperson performing the current exchange is the m-th salesperson, that is, i=m. If so, please exit.

Step 2: Select the two city genes assigned to the i-th salesperson from the city chromosome of a. Exchange them and obtain individual a′.

Step 3: Determine whether the fitness value of a′ is greater than the fitness value of a′. If so, let a=a′; otherwise, keep a.

Step 4: Set i=i+1, and then return to step 1. The main procedure of HCGA is shown in Figure 7.

Figure 7: HCGA flow chart based on basic GA. The first step is the greedy operation of group initialization, and the fourth step is the climbing operation.


E. CORN

SA (Simulated Annealing) is a general probabilistic metaheuristic algorithm for global optimization problems that locates a good approximation to the global optimum of a given function in a large search space [2]. In particular, during the search it not only accepted a better solution, but also a worse solution with a probability that slowly approached zero by following the Metropolis criterion. It can jump out of the local optimal area and ensure its convergence performance. SA can be used to improve the convergence of the above GAG.

The solution and optimal solution of CTSP are in turn similar to the state of each particle in SA and the lowest energy state of the particle. The objective function of CTSP to achieve the shortest path corresponds to the SA energy function. By setting appropriate initial temperatures and following some designed cooling schedule, SA can resolve CTSP.

SA and GA can be combined in two common ways, namely performing SA on: 1) every individual and 2) the best individual in the GA population before and after selection, crossover and mutation, respectively. The former takes too much time due to the large population size and long chromosomes. Instead, this work adopts the latter.

The SAGA program is shown below.

Step 1: Set the initial temperature t0, and generate the initial population of GA, P(0) at the initial epoch l=0.

Step 2: If the termination condition of GA is met, go to step 7; otherwise, calculate the fitness of each individual in the population P(l), and select, cross and mutate the individuals according to the obtained fitness value to obtain new The population P1.

Step 3: Select the best individual in P1 as the initial solution x 0 of SA. Let the current temperature t 0 and the current cooling number k=0.

Step 4: If the iteration step size is reached at each temperature, go to step 5. Otherwise, randomly select a feasible neighborhood x′ from the neighborhood of the current solution x, and use the Metropolis criterion to determine whether to accept it. That is, calculate f=f(x′)−f(x), if f≤0, then x=x′; otherwise, if exp(−f/tk)>r, where r is through the pair (0, 1) To obtain random numbers obtained by sampling from a uniform distribution, repeat step 4.

Step 5: Assume k=k+1, tk=α·tk, where α is the cooling coefficient. Prove whether the termination conditions of SA are met. If not, go to step 4.

Step 6: Replace the original individuals in P1 with the individuals obtained by SA to obtain a new population P2. Letl=l+1, P(l)=P2. Go to step 2

Step 7: Output the results.

The flow chart of SAGA is similar to that shown in Figure 7, where SA needs to be used to replace the hill climbing operation.


4. Experiments and results

Experiments were conducted to compare the performance of the proposed algorithm in solving CTSP. First, LINGO software serves as a comprehensive tool for integer programming and is used to accurately solve a given integer programming model. A set of experiments illustrates the shortcomings of LINGO's exact solution. Then, through case studies, it is possible to observe the specific evolution and solution process of the tested algorithms and subsequently analyze their convergence speed and solution quality. Finally, using several CTSP cases of different sizes, a comprehensive statistical analysis and comparison of their solution quality and computational time is performed.


A. Comparison between LINGO and GA

In Table I, ten CTSP cases are designed, in which all city data are from the dataset eil51 in the TSP collection TSPLIB, cited at http://people.sc.fsu.edu/~jburkardt/datasets/tsp/tsp. html. The specific delineation of shared and exclusive city sets is included in the online supplementary file. The computer used was a Dell Inspiron 620s running Windows 7 (32-bit) with an Intel Corei3 CPU, 2 GB of RAM, and a frequency of 3.30 GHz. The results are shown in Table I.

The optimal route corresponding to the seventh solution is shown in Figure 8. But the latter three situations cannot be resolved within two days. The setup for salespeople to shuttle between their exclusive cities and shared cities is shown in Figure 8. Note that it is not possible to obtain such a solution by combining TSP and MTSP.

The salesperson's restriction on exclusive city access makes the solution more difficult and time-consuming compared to MTSP. When the size of CTSP is small, for example, n<41, LINGO can solve the problem quickly. However, as n and m increase, the time consumption increases dramatically. For example, given two cases of n=31, when m=2, the time consumed is only 94 seconds, while when m=3, it increases to 15 minutes. This is mainly due to the sharp increase in the number of constraints, i.e., as shown in the fourth column of Table I, m=2 has 1937 constraints, while m=3 has 3067 constraints. This results in a significant increase in computation time. For the two cases of m=3, for n=21, 31 and 41, the time consumed is 26s, 94s and 6.4h respectively. The number of variables and constraints grows exponentially. As the scale of CTSP further increases, its accurate solution becomes increasingly difficult. For example, starting with n=41 and m=4, the solution cannot be obtained with LINGO in two days.

Next, we confirm whether GA is faster and more efficient than exact methods in solving CTSP. We set the parameters, namely the size of the population to 30, the crossover probability to 0.7, and the mutation probability to 0.1. Each algorithm is run ten times, with a maximum epoch of 2000. Set the parameters related to the SA operation, namely the initial temperature is 100, the total cooling time is 60, the step size at each temperature is 30, and the annealing coefficient is 0.9.

Table II lists the results of the 10 cases and 4 GAs in Table I. As case size increases, the time taken by GA increases much more slowly than LINGO. For example, for the case of three salespeople and increasing cities, the time consumption of GA increases by no more than 40 seconds, while the time consumption of LINGO increases by ten times or more. For the 31-city case, as the number of salespeople increases, the time they spend on LINGO increases by about 10 times and 6 times, but the time on GA fluctuates very little, less than 8 seconds.

The genetic algorithm can always obtain a solution, but it is not necessarily the optimal solution. According to Table II, under the termination condition of 2000 epochs, the solutions using HCGA and SAGA are close to the available exact solutions using LINGO. SAGA achieved the best solution quality with average, maximum and minimum errors of 3.54, 9.8 and 0.56km respectively. GA is suitable for solving situations where (because the optimal solution is too costly) but (where a high-quality solution would be sufficient).


B.GA Situation Study

The CTSP of n=51 and m=4 is shown in Figure 10, where U is the shared city set and V 1−V 4 are the exclusive city sets (visit areas) of salespersons 1−4 respectively. The same computer mentioned previously was used. Next, four algorithms, GA, GAG, HCGA and SAGA, are applied to solve the problem and their performances are compared. Based on our experience, the termination condition of the algorithms is changed to 10 minutes to ensure fairness between them, while their other parameters remain unchanged. The results are shown in Table III.

1) Convergence speed: In order to compare their convergence speeds, we plotted the individual optimal convergence processes they obtained, as shown in Figure 9. The total distance traveled by the best initial individual in GA is approximately 1,200 kilometers. Through greedy operations, the quality of the initial populations in GAG, HCGA and SAGA is greatly improved. For the same time termination conditions, they converge faster than basic GA. The four GAs terminate at the 15000th, 8500th, 9600th and 6200th epoch respectively. However, the actual evolution of the latter three GAs is completed earlier at the 8000th, 850th and 5000th epochs respectively. Basic GA converges very slowly, and evolution does not seem to end in about 15,000 lifetimes. This is obviously much more time consuming than the others.

Furthermore, SAGA is the best among them, while HCGA is better than GAG in terms of convergence speed. Without hill climbing operations, due to its weakness in local search, GAG takes about 2000 epochs to evolve to the result of a total trip of 550 km; while SAGA and HCGA only take about 150 and 300 epochs to achieve the same or better results. After the evolution of HCGA ends at the 8500th epoch, with a total journey length of approximately 520km, SAGA can continue to evolve until around the 5000th epoch, with a total journey length of approximately 500km.

2) Solution quality: From Figure 9, we find that both GA and GAG have difficulty reaching the optimal results at the 15000th and 8500th epochs, and the total trip lengths are approximately 540 and 550 respectively. It is obvious that after reaching the same result of GAG, HCGA can continue to converge to a better solution, as shown in Figure 9, due to the powerful local search capability of the hill climbing operation. But around 9500 epochs, it stopped. It may get stuck in a local optimum.

The average stroke length of ten SAGA experiments is 501.42. Compared with GA, GAG and HCGA, it achieves stroke reduction of 37, 49 and 21 units respectively. This shows that the SA operation can improve the convergence performance of the genetic algorithm and the possibility of escaping from the local optimum. The optimal solution using SAGA has a total stroke length of 496.70, as shown in Figure 10.

In summary: 1) Due to the introduction of SA operation in the genetic algorithm, the convergence speed of SAGA is the highest among the three considered genetic algorithms; 2) SAGA can get rid of the local optimum more easily and produce better results among the four algorithms. Good solution.


C. Group experiment of genetic algorithm

1) Experimental settings: We designed three groups of 11 experimental cases to conduct a comprehensive analysis of the performance of the algorithm. The three groups of CTSP are assigned city sizes in sequence, which are 51, 76 and 101 respectively. All city data come from the datasets eil51, eil76 and eil101 in TSPLIB, and the shared city sets and various exclusive city sets are grouped according to Table IV. City distribution is shown in the online supplementary file. Table IV is designed and optimized with reference to the Taguchi method. Among them, the different sets of exclusive cities in each case are divided as evenly as possible, and the proportion of shared cities among all cities fluctuates between 0.2 and 0.5. This prevents a CTSP from becoming an MTSP or multiple separate TSPs. These three groups include various typical cases.

The four proposed algorithms are applied to solve these situations. For fairness in solution quality comparisons, the solutions of each algorithm are allowed to fully develop. Therefore, the maximum epoch for all GAs is set to 10000. As the number of cities increases, the initial population size of GA should increase accordingly. The initial crowd size for each case was set to 40 people. The crossover rate and mutation rate of the four algorithms are set to the same 0.9 and 0.1 respectively. For HCGA, the number of hill climbing is set to 50, while for SAGA, the initial temperature is set to 100, the number of annealings is 50, the number of iterations at each temperature is 30, and the cooling coefficient is 0.9.

2) Solution quality: Table 5 gives the results of the group experiments designed in Table 4. Each case was run ten times by using each algorithm. Table V records the statistics of the best, worst and average solutions for ten samples in each case and the corresponding time consumption. By observing Table V, we find that regardless of the best, worst and average solutions, the quality of the solutions obtained by GA is the worst in all cases. The reason behind this is that its convergence speed is slow and it is easy to fall into local optimality, as shown in the figure. The remaining algorithms, GAG, HCGA and SAGA achieve better solution quality.

By using greedy operations, the initial population of GA becomes better. However, the biggest flaw of genetic algorithms still exists in genetic algorithms, that is, it is easy to fall into local optimality. Since HCGA introduces hill climbing operations to enhance GAG's local search capabilities, it almost outperforms GAG in every best and average result. However, for the 101-city case, the solution quality of the former is worse than that of the latter. The reason is that an increase in the number of cases is more likely to lead to challenging problems of hill climbing, such as convergence to local maxima, ridges, and alleys. SAGA achieved almost the best results of them all. The reason is that SA itself is a global algorithm that can get rid of local optimality, while the hill-climbing algorithm is only a local algorithm. Furthermore, the growth of SAGA's best solutions is most stable as case size increases.

3) Time consumption:

We attempt to analyze the time consumption of GA based on the experimental results given in Table V. The time consumption of all algorithms increases with the size of the city. For example, as the number of cities increases from 51 to 101, basic GA and SAGA consume average times of 471 to 836 seconds and 1086 to 2365 seconds respectively. At the same time, different growth rates of the time consumption of the algorithm can be observed from the results. SAGA has the largest growth, followed by HCGA, GAG and basic GA. This shows that the introduction of greedy, hill climbing and SA operations will lead to more computation time, and the larger the size of the case, the longer the computation time.

For the same size, the order of time consumption from minimum to maximum is GA, GAG and HCGA, and SAGA. For example, to solve the situation of 101 cities and 4 salespeople, GA consumes 938 s, GAG 1284 s, mountain climbing 1829 s, and SAGA 2168 s. This indicates that the introduction of greedy initialization or hill climbing consumes extra time. Therefore, GAG requires more computing time than GA for the same case size. HCGA takes more time than GAG to reach the same termination period. SAGA utilizes both the greedy initialization strategy and SA, which is more complex than hill climbing. Therefore, it is more time-consuming than HCGA.

In the case of the same number of cities, the time consumption of the algorithm is not consistent with the growth of sales staff. For example, in the case of 101 cities, the time consumed by all GAs does not just increase or decrease. This shows that for an algorithm, its time consumption to solve CTSP may be affected by many factors, including the number of salespeople, the division of shared city sets and exclusive city sets. The relationship between computing time and these factors is complex. The current experiments are difficult to analyze and we intend to consider this in the future.


D. Summary and discussion

CTSP is suitable for application problems where multiple traveling individuals deal not only with their own dedicated tasks but also with a shared set of tasks that allows one of them to perform. For example, the scheduling of a multiple machine system containing a radially arranged single machine whose workspaces share a common part can be solved by formulating as CTSP. The scheduling of MES as shown in Figure 1 can be converted into the typical situation of CTSP with two sales personnel.

Before formulating the problem, tasks to be performed by multiple machines (such as points, lines, and curves in plane or space) should be divided and distributed according to some process requirements. Then, the assigned tasks should be abstracted as vertices of the graph. The vertices and individual machines are ultimately modeled as cities and salespeople in CTSP respectively. Specifically, each set of exclusive (shared) jobs is represented as a set of exclusive (shared) cities. The scheduling goal is to search for a job sequence for each machine such that the total job execution cost of all machines is minimized. It can be formulated by the objective function of the corresponding CTSP, with an appropriate definition of the access cost.

According to the above experimental results, if only the solution quality is considered, SAGA is the best choice to solve the CTSP of real size; while if a good solution needs to be obtained in a relatively short time, HCGA is recommended. To the best of the author's knowledge, the largest MTSP solved by Gavish and Srikanth [11] has 500 cities. Due to CTSP's restrictions on city accessibility and city zoning on sales force, it requires more time and memory than MTSP for the same problem size, so we defer these large-scale cases to future research.


V.Conclusion

In this paper, we propose a new MTSP, called CTSP, where different salespeople have exclusive sets of cities and share a common set of cities. It stems from applications where multiple individuals work together in different but partially overlapping workspaces. This article presents this new problem in a mathematically rigorous way. We propose three genetic algorithms, namely greedy initialization genetic algorithm, hill climbing genetic algorithm and simulated annealing genetic algorithm, which are improved on the basis of the basic genetic algorithm. The space size of the solution is deduced using the two-chromosome code . The differences between CTSP, MTSP and the combination of MTSP and TSPs were analyzed. Through comparison with four genetic algorithms, the ability and limitations of the LINGO software to accurately solve the CTSP method are revealed. Through experiments, the performance of genetic algorithms in terms of evolution rate, solution quality and time consumption was comprehensively compared. The results show that SAGA can obtain the best solution, while HCGA can obtain high-quality solutions in a relatively short time. Future work aims to handle large CTSPs that cannot be handled by existing methods and their application in MES optimization operations. It is highly desirable to quickly evaluate the lower bound of the optimal solution of CTSP, which can be used as an indicator to evaluate and compare different intelligent optimization methods [20], [21], [25], [26], [46], [48], The solution quality of [50]-[62]. Fast methods [64]–[72] can be used for this purpose.

Guess you like

Origin blog.csdn.net/qq_45874683/article/details/129846762