1 Introduction

Combinatorial optimization problem is a kind of optimization problem. Optimization problems can be divided into two categories: one is continuous variable problems, the other is discrete variable problems. Problems with discrete variables are called combinatorial. In the case of continuous variables, it is generally a set of real numbers, or a function; In combinatorial problems, an object is found from an infinite or countable infinite set—typically an integer, a set, a permutation, or a graph. In general, these two types of problems have quite different characteristics, and the methods of solving them are quite different. Metaheuristic algorithms have been widely studied in recent years because of their advantages in multi-modal, large-scale, and highly constrained problems.

The traveling salesman problem (TSP) is a classical combinatorial optimization problem [1]. Many practical problems can be modeled as TSP, such as route planning [2], production scheduling [3], and emergency management [4]. In recent years, there are many scholars have made continuous exploration on solving TSP in two-dimensional space. There are some precise algorithms and heuristic algorithms that can effectively solve TSP. Gouveia, Leitner, and Ruthmair used a branch cutting algorithm [5]. Kinable, Smeulders, Delcour, and Spieksma used an accurate algorithm [6]. Asadpour et al. used Approximation Algorithm [7]. Both Genetic Algorithm [8] and Memetic Algorithm [9] are applied to asymmetric traveling salesman problem. Algorithms to solve the TSP problem also include Evolutionary Algorithm [10], Artificial Bee Colony Algorithm [11], Ant Colony Algorithm [12], Water Cycle Algorithm [13], Discrete Bat Algorithm [14], Random-key Cuckoo Search [15], Black Hole Algorithm [16], Discrete Comprehensive Learning Particle Swarm Optimization Algorithm [17], Simulated Annealing Algorithm [18], Fruit-fly Optimization Algorithm [19], and so on.

However, the classic TSP cannot be modeled in some special cases. For example, suppose that a company has multiple salespeople living in different cities, and the company expects them to visit the city no less than a certain number of times to meet their minimum wage [20]. Therefore, the MTSP is introduced on the basis of the current problem [21]. ACO has been widely used in the research field of MTSP and achieved good results. In particular, Ghafurian and Javadian [22] designed an ant-based system to solve the MTSP problem at a fixed destination. Yousefkhoshbakht et al. [23] solved the MTSP problem by mixing the insertion, switching, and 2-opt operators with ant colony algorithm. Changdar et al. [24] proposed a genetic ACO algorithm for solving MTSP. However, it is difficult to optimize the parameters of ant colony optimization system because of the large number of inherent parameters. This further leads to its disadvantages such as slow computation speed and easy local convergence. When more complex problems are solved, unacceptable performance occurs. Other metaheuristic algorithms have been proposed to solve MTSP. Malmborg [25] proposed a genetic algorithm based on two chromosomes. Carter and Ragsdale [26] designed a genetic algorithm for the two-part chromosome technique. Venkatesh et al. [27] mixed artificial bee colony algorithm with weed invasion algorithm. Chen et al. [28] proposed an improved two-part Wolf pack search algorithm. Zhou et al. [29] proposed a improved PSO to solve MTSP.

Compared to the standard TSP, the spherical space TSP is more practical. In recent years, many scholars have studied TSP in three-dimensional space. Literature [30] solves 3D-TSP with multi-dimensional city location. Literature [31] adopts genetic algorithm to solve the TSP problem on the sphere. Literature [32] describes the distance distribution between random points on a sphere. The ant colony algorithm [33], firefly algorithm [34], an improved flower pollination algorithm based on greedy strategy [35], and the discrete improved cuckoo algorithm [36] are used to solve STSP. As we know, the surface of the earth on which we live is very close to a sphere. In many fields of study, such as chemistry, biology, and physics, structures such as atoms, molecules, and proteins are represented by spheres. Therefore, the solution of spherical MTSP can be directly applied to micro and macro systems such as path planning, robot path planning, picking, and placing parts. Therefore, it is of great significance to study spherical MTSP problem.

AEFA is a physics-based optimization algorithm designed by Yadav et al. in 2019 to solve continuous optimization problems. Its main characteristics include less optimization parameters, rapid convergence in the process of optimization, high accuracy, and low complexity of the algorithm [37]. Since its inception, AEFA has been widely used in continuous optimization problems [38], practical engineering problems [39], image matching problems [40], multi-objective optimization [41], nine parameters triode PV model best estimate [42], cancer detection [43], white blood cells [44], the optimal purchasing problem [45], feature classification [46], assembly line balancing problem [47], and wind turbines active loss in distribution network and the distribution of the voltage deviation problems [48] made a wide range of applications. In this paper, an improved AEFA is proposed. The greedy state transition strategy is introduced on the basis of AEFA, and the improved algorithm is used to solve SMTSP. Similar to STSP, the city coordinates of the SMTSP are extended to the surface of a sphere, and the coordinates of the points and the minimum spherical distance between the points are known. The improved AEFA is used to solve SMTSP. Experiments show that the proposed algorithm is feasible and effective in solving SMTSP.

The rest of this paper is organized as follows: “Spherical Geometry and Definition of the Problem” gives a brief introduction to spherical geometry and the definition of the problem. “Related Works” introduces the related work, including solution encoding and decoding, greedy state transfer strategy, AEFA, and GSTAEFA. In “Experimental Setup and Discussion of Results,” the simulation experiment and numerical results are analyzed. Finally, “Conclusions and Further Works” gives summary and future prospects.

2 Spherical Geometry and Definition of the Problem

Figure 1 shows a sphere. The radius r of the sphere is the distance from the point on the sphere to the center. In three-dimensional space, the coordinates of each point on the sphere need to satisfy the relationship as shown in Eq. (1):

$$ x^{2} + y^{2} + z^{2} = r^{2}, $$
(1)
Fig. 1
figure 1

Sphere

where r is the distance from a point on the sphere to the center, and it is the radius of the sphere, (x, y, z) are the coordinates of the points on the sphere in the three dimensions [34] (Fig. 2).

Fig. 2
figure 2

Latitude and longitude on the sphere

2.1 Representation of Points on a Sphere

Points on a sphere can be represented in cartesian coordinates so that the shortest distance between two points on the sphere can be calculated using vector methods. The Cartesian vector point function can represent that point [35]:

$$ P(u) = (x(u,v),y(u,v),z(u,v)). $$
(2)

In general, the standard equation for a sphere can be expressed in parametric form, and a spherical coordinate equation can be expressed with two parameters u and v between 0 and 1. A sphere of radius r with its center at the (0,0,0) can be expressed as [36]

$$ x(u,v) = r \cdot \cos (2\pi u) \cdot \sin (\pi v) $$
(3)
$$ y(u,v) = r \cdot \sin (2\pi u) \cdot \sin (\pi v) $$
(4)
$$ z(u,v) = r \cdot \cos (\pi v), $$
(5)

where the two parameters u and v represent the longitude and latitude lines, respectively. In this paper, we use a sphere with radius 1 for simulation. Therefore, it is easy to calculate the length of the path between two cities (Fig. 3).

Fig. 3
figure 3

The u and v of different cities

2.2 Shortest Path Between Two Cities on Sphere

On the surface of the earth, a geodesic is the curve that shows the shortest distance between two cities. The point at which the tangent plane through the center intersects the earth forms a great circle. The length of the shortest line between two points on the sphere is the length of the lower arc between two points in the great circle that passes through them [34]. In Fig. 4, there are two cities City1 and City2, in order to obtain the shortest distance between them. Take the scalar product of two vectors [34]:

$$ \vec{v}_{1} \cdot \vec{v}_{2} = \left| {\vec{v}_{1} } \right|\left| {\vec{v}_{2} } \right|\cos (\theta ). $$
(6)
Fig. 4
figure 4

The minimum distance between two cities

The smaller angle between v1 and v2 is θ. Scalar values are computed as follows [34]:

$$ \vec{v}_{1} \cdot \vec{v}_{2} = x_{1} x_{2} + y_{1} y_{2} + z_{1} z_{2}. $$
(7)

The formula for the shortest distance between City1 and City2 on the sphere is [31]

$$ \hat{d}_{{City_{1} ,City_{2} }} = r\theta. $$
(8)

Combining formulas (6) to (8), the distance formula is deduced as follows [31]:

$$ \hat{d}_{{City_{1} ,City_{2} }} = r\;{\text{arc}} \, cos\left( {\frac{{x_{1} x_{2} + y_{1} y_{2} + z_{1} z_{2} }}{{r^{2} }}} \right). $$
(9)

2.3 Definition of the Problem

In MTSP, there are multiple traveling agents visiting different cities, and each city can only be visited once and only by one person. Given a set of n cities that a salesperson will visit, TSP looks for the shortest possible trip for the salesperson, which visits each city only once. MTSP can be briefly described as follows: Give an undirected graph G = (V, A), It consists of a set of vertices V and a set of arcs A, where m represents the total number of salespeople. The objective function is to divide V into m nonempty subsets \(\{ S_{i} \} {}_{i = 1}^{m}\) and calculate the minimum cost sum of all sets. Then the objective function value of MTSP can be obtained [49] as follows:

$$ Minimize\;\sum\nolimits_{i = 1}^{m} {\left( {x_{{n^{i} ,1}}^{i} + \sum\nolimits_{j = 1}^{{n^{i} - 1}} {x_{j,j + 1}^{i} } } \right)}, $$
(10)

where the first sum represents the path through m salespeople, and the second sum represents the cycle of all the cities visited by the ith salesperson (the index of the first city visited by the ith salesperson is 1, and the index of the last city is \(n^{i}\)); \(x_{j,j + 1}^{i}\) represents the distance between the city \(j\) visited by the ith salesperson and \(j + 1\); \(x_{{n^{i} ,1}}^{i}\) represents the distance between the last city visited by the ith salesperson and the first city; \(n^{i}\) value should not be less than the minimum number of cities specified by each salesperson [49].

3 Related Works

3.1 Motivation

At present, for many practical application problems such as TSP problem, MST problem, MTSP problem, people cannot effectively obtain the optimal solution in a reasonable time range. Therefore, metaheuristic optimization algorithms are being applied by more and more researchers from various fields to obtain satisfactory solutions such as hybrid PSO–GA algorithm for constrained optimization problems [61], a hybrid GSA–GA algorithm for constrained optimization problems [59], GA–GSA hybrid algorithm for optimizing the performance of industrial systems using uncertain data [60], and a hybrid ITLHHO algorithm for solving numerical and engineering optimization problems [62]. This paper mainly studies the improvement of artificial electric field algorithm and its application in practical optimization problems. The motive of the improvement is to improve the mining capacity and exploration capacity of the original algorithm, respectively, so as to further improve the overall optimization ability of the algorithm. Artificial electric field algorithm is a new intelligent optimization algorithm based on physical laws proposed in 2019, so its improvement and application is relatively small. Therefore, the purpose of improving the algorithm is to solve the practical optimization problem on one hand, on the other hand, to verify the optimization ability of the artificial electric field algorithm, overcome the shortcomings of the original algorithm, so as to broaden the application scope of the artificial electric field algorithm in practical life.

3.2 Solution Encoding and Decoding

Sequence coding is the simplest and most efficient way to express MTSP solutions, using a series of numbers to represent each solution. There are two common approaches to using the sequential encoding approach to represent an MTSP solution. One uses a path sequence and a breakpoint sequence, and the other uses a path sequence and a city number sequence. Here, we adopt the real encoding method, which is suitable for most continuous algorithms to solve the MTSP problem. The following example shows how the real-coded approach represents an MTSP solution. For example, suppose two salespeople have to visit 10 cities.

We use a single sequence coding scheme to represent a feasible solution. Compared with double sequence coding, the calculation is simpler and the processing is more convenient. [0.54 0.41 0.32 0.64 0.55 0.15 0.88 0.74 0.27 0.69 0.56] can be described as a feasible solution. After sorting it from small to large, the corresponding sequence is [6 9 3 2 1 5 11 4 10 8 7], and number 11 is the breakpoint. The sequence can be divided into two paths, which are [6 9 3 2 1 5 6] and [4 10 8 7 4] (Fig. 5).

Fig. 5
figure 5

Encoding and decoding processes

3.3 Greedy State Transition Strategy

The state transition algorithm (STA) [50], a new heuristic search algorithm proposed by Zhou et al. [51], has outstanding performance in solving optimization problems and is widely used in many practical problems [52]. In this paper, we introduce three kinds of state transfer operators, and combine them to propose a state transfer strategy. The three operators are Swap, Reverse, and Insert of three basic transformations.

Greedy strategies always do what is best for the moment. In other words, instead of considering global optimality, the algorithm gets a local optimal solution in a certain sense. In the state transition strategy, we do not consider globally. After any operator produces a new solution, if the result is better, we accept the local change, so that the algorithm will keep getting closer to the global optimal solution. The MTSP problem is a combinatorial optimization problem, and the solution form is a sequence. Every state transfer will generate a feasible solution. Greedy thought is introduced, assuming that an optimal sequence can be obtained without considering the time complexity.

Swap Operator: Pick two positions i and j at random from the initial solution, and the corresponding values of i and j are exchanged.

$$ xnew = Swap\;(x_{i,j} ), $$
(11)

where xnew is the immediate solution of x generated, i and j are two different positional indexes in x, respectively. Swap (xi,j) swaps the values of the positions corresponding to i and j (Fig. 6).

Fig. 6
figure 6

Swap operator

Reverse Operator: Pick two positions i and j at random from the initial solution, and then reverse the values between i and j.

$$ xnew = {\text{Re}} verse\;(x_{i,j} ), $$
(12)

where xnew is the immediate solution of x generated, and i and j are two different positional indexes in x, respectively. Reverse (xi,j) indicates the reverse order of all values from i to j (Fig. 7).

Fig. 7
figure 7

Reverse operator

Insert Operator: Two positions i and j are randomly selected from the initial solution, and the corresponding value for position i is inserted after position j.

$$ xnew = Insert\;(x_{i,j} ), $$
(13)

where xnew is the immediate solution of x generated, and i and j are two different positional indexes in x, respectively. Insert (xi,j) means that the value corresponding to position i is inserted after position j (Fig. 8).

Fig. 8
figure 8

Insert operator

Figure 9 shows the proposed greedy state transition algorithm.

Fig. 9
figure 9

Proposed greedy state transition algorithm

3.4 The Principle of AEFA

In AEFA systems, the individual is described as a point particle that moves under electrostatic attraction. AEFA is based on Coulomb's law [37]. The initialization of an individual in AEFA is shown in Eq. (14).

$$ X_{i} (t) = (X_{i}^{1} ,X_{i}^{2} , \ldots ,X_{i}^{D} )\;\;\;\;i = 1, \, 2, \ldots ,N\;and\;d = 1,\, \, 2, \ldots ,D $$
(14)

where N represents the total number of individuals, that is, the total number of charged particles in the system, and D represents the dimension of the problem. In the algorithm, it is necessary to obtain the individual optimal particle in each iteration process as shown in Eq. (15).

$$ P_{i}^{d} (t + 1) = \left\{ {\begin{array}{*{20}c} {X_{i}^{d} (t + 1)} \\ {P_{i}^{d} (t)} \\ \end{array} } \right.\;\;\begin{array}{*{20}c} {{\text{if}}\;f(X_{i} (t + 1)) \le f(P_{i}^{{}} (t))} \\ {{\text{if}}\;f(X_{i} (t + 1)) > f(P_{i}^{{}} (t))} \\ \end{array}. $$
(15)

In the process of iteration t, the force of any individual J acting on particle I is expressed by Eq. (16).

$$ F_{ij}^{d} (t) = K(t)\frac{{Q_{i} (t) \cdot Q_{j} (t) \cdot (P_{j}^{d} (t) - X_{i}^{d} (t))}}{{R_{ij} (t) + \varepsilon }}, $$
(16)

where \(Q_{i} (t)\;and\;Q_{j} (t)\) are the amount of charge in different individuals. K is Coulomb's constant, ε is used to prevent the denominator from being 0, and R is the Euclidian distance between two individuals. Formulas 17 and 18 give the calculation method of R.

$$ R_{ij} (t) = \left\| {X_{i} (t),X_{j} (t)} \right\|_{2}, $$
(17)
$$ K(t) = K_{0} \cdot e^{{\left( { - \alpha \frac{iter}{{\max iter}}} \right)}}, $$
(18)

where parameters α and K0 are two important parameters to balance the exploration and development capabilities of the algorithm.

The resultant force of particle i in the iterative process is shown in Formula (19).

$$ F_{i}^{d} (t) = \sum\limits_{j = 1,j \ne i}^{N} {rand \cdot F_{ij}^{d} (t)}, $$
(19)

where rand is a random number in the range of [0, 1] that conforms to the uniform distribution. Then the resultant force can be calculated through the above equation, and the electric field strength E of the current particle can be calculated next.

$$ E_{i}^{d} (t) = \frac{{F_{i}^{d} (t)}}{{Q_{i} (t)}}. $$
(20)

The current individual acceleration is deduced by calculating the power plant strength and the resultant force.

$$ a_{i}^{d} (t) = \frac{{Q_{i} (t) \cdot E_{i}^{d} (t)}}{{M_{i} (t)}} $$
(21)

Combined with Newton's law of motion, given the current velocity and acceleration of the individual, calculate the velocity and position at the next moment.

$$ V_{i}^{d} (t + 1) = rand \cdot V_{i}^{d} (t) + a_{i}^{d} (t), $$
(22)
$$ X_{i}^{d} (t + 1) = X_{i}^{d} (t) + V_{i}^{d} (t + 1). $$
(23)

After mastering the above principles of AEFA, we can describe AEFA in the form of pseudocode, as shown in the figure below (Fig. 10):

Fig. 10
figure 10

AEFA

Figure 11 is the flowchart of AEFA. The algorithm of AEFA is simple in logic and easy to implement, with less parameter to be optimized.

Fig. 11
figure 11

AEFA flowchart

3.5 Artificial Electric Field Algorithm Based on Greedy State Transition

Although AEFA has many advantages, it still needs to be improved. For example, the algorithm can be improved to speed up convergence and reduce the probability of falling into local solutions. Therefore, we add the greedy state transition strategy in this paper to improve its performance after combining with the original algorithm. The local search mechanism improves the ability of AEFA to search deeper in the solution space to obtain better solutions. In the optimization process of AEFA, the optimal individuals in each generation are selected for local search using GST strategy to obtain better individuals. After each GST operation, a second-best solution is obtained, which is returned to AEFA and the next search begins. Figure 12 is the pseudocode for GSTAEFA, and Fig. 13 is the flowchart of GSTAEFA.

Fig. 12
figure 12

GSTAEFA

Fig. 13
figure 13

GSTAEFA flowchart

3.6 GSTAEFA Complexity Analysis

The complexity of any optimization algorithm is mainly derived from the algorithm itself and the evaluation of the objective function. In our algorithm, the complexity mainly comes from the following parts: the maximum number of iterations T, the number of electrons N, the dimension D of the problem to be solved, and local search strategy GST run times t. Therefore, the time complexity of AEFA, GST, and GSTAEFA can be estimated. AEFA: O(t × N × D), GST: O(t × it × D), and GSTAEFA: O(t × (N × d + it × D)).

4 Experimental Setup and Discussion of Results

We chose a more suitable hardware environment for the simulation of the algorithm, and maintained the principle of fairness in evaluating the algorithm performance. All the comparison algorithms were run on the same machine. The software environment was MATLAB (R 2018a), and the hardware environment was Intel Core i3-6100 processor and 8 GB memory. The experimental results were compared with algorithms that have been applied to solve related problems, including ABC, FPA, GA, FA, SA and other latest metaheruristic algorithms, including AEFA, GBO, and SMA.

4.1 Test Problems

Since the problem in this study is new, some test questions are needed to evaluate the proposed metaheuristic algorithm. For this purpose, seven size test questions were considered from the data collected in the relevant article [34]. The number of cities in each question is 25, 50, 100, 150, 200, 300, and 400. Finally, in order to improve the persuasiveness of the algorithm, we increased the number to 500 cities to test the performance of the algorithm.

4.2 Experiment Setting

In the experimental process, to ensure fairness, the number of individuals of all the comparison algorithms was set to 30, and the algorithm controls the end of the algorithm according to the value of Iterations, and its value is 1000. To carry out the final experiment on the test problem, some problems are considered to obtain better solutions, and a fair comparative study is also provided for the algorithm. Each algorithm uses standard parameters. To reduce the randomness of the algorithm, each algorithm was run 30 times for each test problem. The minimum value, maximum value, average value, and standard deviation of the obtained objective function were compared, and Friedman rank sum test and P value test were performed on the results of all algorithms.

GSTAEFA: NP = 30, Coulomb’s constant K0 is 500, the number of local searches is 100.

AEFA: NP = 30, Coulomb’s constant K0 is 500 [37].

SA: the number of local searches is 100 [18].

GA: NP = 30, pc is 0.8, pm is 0.8 [31].

FA: NP = 30, alpha is 0.8, beta is 0.8, mutation is 0.8, mutation damping ratio is 0.8 [53].

ABC: NP = 30, (Employed bees + Onlooker bees), Food number = NP/2, acceleration coefficient reduces exponentially from 2 to 0 [11].

SMA: NP = 30, parameter z is 0.003 [55].

GBO: NP = 30, β is 0.2 to 1.2, Probability Parameter is 0.5 [56].

FPA: NP = 30, the transfer probability of global and local pollination of flowers was 0.8 [54].

4.3 Analysis and Comparison of Experimental Results

Next, we explore how the number of cities affects the solution and compare the test results of nine algorithms. The complexity of the problem is mainly determined by the number of cities, the more cities, the more difficult to solve. Each algorithm runs 30 times independently for different numbers of cities. Table 1 shows the test values of all algorithms at different points on the sphere, where “City” represents the number of cities.

Table 1 The results of different algorithms

As shown in Table 1, GSTAEFA was significantly superior to other algorithms. In all cases, GSTAEFA obtained the highest accuracy of the results, and at the same time, the average value in all cases was also the best. In the case of fewer cities, the results obtained by different algorithms are very close, but GSTAEFA has the best stability. It can be analyzed from the results that when the number of points on the sphere increases, the searching ability of other algorithms will be greatly reduced, and when the number of cities is 200, 300, 400, and 500, the stability of SA, GA, and ABC is better than that of GSTAEFA, while the results of GSTAEFA algorithm are 52.1173, 91.4491, 133.3439, and 178.2932, respectively. Development performance is optimal.

Figures 14, 15, 16, 17, 18, 19, 20, and 21 show a line plot of the 30 times result optimal values. When the dimension of the problem is low, the results of the algorithm proposed by us are not different from other algorithms, but the accuracy of the results is always higher than other algorithms. With the continuous increase of the number of cities, the accuracy of GSTAEFA algorithm gradually opened a gap with other algorithms. In the variance diagram and scatter diagram shown in Figs. 22, 23, 24, 25, 26, 27, 28, and 29, it can be seen that GSTAEFA has good stability, and the results of each time are around the range of the variance diagram. It can be seen from the scatter diagram that the points of AEFA and FA are relatively discrete and have poor stability.

Fig. 14
figure 14

Results from 30 separate runs

Fig. 15
figure 15

Results from 30 separate runs

Fig. 16
figure 16

Results from 30 separate runs

Fig. 17
figure 17

Results from 30 separate runs

Fig. 18
figure 18

Results from 30 separate runs

Fig. 19
figure 19

Results from 30 separate runs

Fig. 20
figure 20

Results from 30 separate runs

Fig. 21
figure 21

Results from 30 separate runs

Fig. 22
figure 22

Variance value and variance divergence

Fig. 23
figure 23

Variance value and variance divergence

Fig. 24
figure 24

Variance value and variance divergence

Fig. 25
figure 25

Variance value and variance divergence

Fig. 26
figure 26

Variance value and variance divergence

Fig. 27
figure 27

Variance value and variance divergence

Fig. 28
figure 28

Variance value and variance divergence

Fig. 29
figure 29

Variance value and variance divergence

To visually demonstrate the power of all algorithms when solving SMTSP, we use the convergence curve shown in Figs. 30, 31, 32, 33, 34, 35, 36, and 37. Before the execution of the algorithm is finished, the results of other algorithms have been stabilized in a local solution range. The convergence effect of SA was similar to that of GSTAEFA, but the convergence speed and accuracy of SA were lower than that of GSTAEFA. Although the optimal solution procedure may not be given, we can conclude that on most data sets, GSTAEFA can obtain the best results and converge faster than the compared algorithm.

Fig. 30
figure 30

Convergence diagram of all test algorithms

Fig. 31
figure 31

Convergence diagram of all test algorithms

Fig. 32
figure 32

Convergence diagram of all test algorithms

Fig. 33
figure 33

Convergence diagram of all test algorithms

Fig. 34
figure 34

Convergence diagram of all test algorithms

Fig. 35
figure 35

Convergence diagram of all test algorithms

Fig. 36
figure 36

Convergence diagram of all test algorithms

Fig. 37
figure 37

Convergence diagram of all test algorithms

Figures 38, 39, 40, 41, 42, 43, 44, and 45 intuitively show the optimal path searched by GSTAEFA. All cities and routes can be seen simultaneously in transparent mode. It should be noted that the routes shown in the figure are all approximately globally optimal, especially in large-scale problems.

Fig. 38
figure 38

The optimal planning of 5 salesmen in 25 cities

Fig. 39
figure 39

The optimal planning of 5 salesmen in 50 cities

Fig. 40
figure 40

The optimal planning of 5 salesmen in 100 cities

Fig. 41
figure 41

The optimal planning of 5 salesmen in 150 cities

Fig. 42
figure 42

The optimal planning of 5 salesmen in 200 cities

Fig. 43
figure 43

The optimal planning of 5 salesmen in 300 cities

Fig. 44
figure 44

The optimal planning of 5 salesmen in 400 cities

Fig. 45
figure 45

The optimal planning of 5 salesmen in 500 cities

We present a bar chart of five path lengths with different number of cities, as shown in Figs. 46, 47, 48, 49, 50, 51, 52, and 53. It can be seen that the path length of each salesperson is smaller than other algorithms, so the sum of all paths must be better than other algorithms. So far, our proposed algorithm has a great advantage in finding the optimal solution, regardless of the size of the city.

Fig. 46
figure 46

Path lengths for different salesmen

Fig. 47
figure 47

Path lengths for different salesmen

Fig. 48
figure 48

Path lengths for different salesmen

Fig. 49
figure 49

Path lengths for different salesmen

Fig. 50
figure 50

Path lengths for different salesmen

Fig. 51
figure 51

Path lengths for different salesmen

Fig. 52
figure 52

Path lengths for different salesmen

Fig. 53
figure 53

Path lengths for different salesmen

As shown in Figs. 54, 55, 56, 57, 58, 59, 60, and 61, we show a bar chart of CPU elapsed time for different algorithms. In the case of lower dimension, the running time of GSTAEFA is relatively large, but the convergence accuracy is the highest. And as the problem dimension increases, GSTAEFA's time performance becomes more and more outstanding.

Fig. 54
figure 54

CPU time of different algorithms

Fig. 55
figure 55

CPU time of different algorithms

Fig. 56
figure 56

CPU time of different algorithms

Fig. 57
figure 57

CPU time of different algorithms

Fig. 58
figure 58

CPU time of different algorithms

Fig. 59
figure 59

CPU time of different algorithms

Fig. 60
figure 60

CPU time of different algorithms

Fig. 61
figure 61

CPU time of different algorithms

4.4 Statistical Analysis

In order to conduct statistical analysis on the experimental results, two nonparametric tests, Friedman test [57] and Wilcoxon signed-rank test [58], were used to evaluate the performance of the proposed algorithm. Friedman's test is a statistical test for the consistency of multiple correlated samples. The test calculates the ranking of the shortest distance achieved by each algorithm on each instance, with a best value of 1 and a worst value of 9. Table 2 shows the average ranking obtained by the nine algorithms using the Friedman test at the 95% confidence level. As you can see, our proposed algorithm ranks first. Experimental results show that the proposed GSTAEFA search strategy is effective in solving the SMTSP problem, and its capabilities are the best among the compared algorithms.

Table 2 Friedman test results for different algorithms

Wilcoxon signed-rank test is a nonparametric test. Statistical test of rank is based on sample observation. The test results were used to compare the differences between the algorithms. Less than 5% indicates that the proposed algorithm is good enough. Table 3 shows the detection results. P values less than 0.05 indicate that GSTAEFA has a good performance in statistics. In the table, the value is greater than or equal to 0.05. All detection results are less than 0.05, indicating that the performance of GSTAEFA is irreplaceable.

Table 3 Wilcoxon p values are compared with other algorithms

From the above two non-parametric test, we can clearly see that GSTAEFA is superior to other advanced methods in solving SMTSP, and the algorithm is obviously different from other algorithms. It shows that GSTAEFA is irreplaceable when solving SMTSP.

5 Conclusions and Further Works

In this paper, a hybrid algorithm GSTAEFA based on traditional AEFA hybrid greedy state transition strategy is proposed. AEFA is an effective naturally inspired algorithm which relies on Coulomb's electrostatic law and Newton's laws of motion. It has been successfully applied to various types of optimization problems and obtained efficient solutions. Although AEFA has a satisfactory exploration experience, its development capability is its main disadvantage. In order to overcome these problems of AEFA and improve its development ability, greedy state transfer strategy is considered in the proposed algorithm to effectively improve its development ability, which will make it more efficient, more effective, and easier to solve various combinatorial optimization problems. We apply GSTAEFA to solve a new spherical multi-traveler problem, which is considered as the shortest path problem for multiple travel agencies around the world, and test the performance of the algorithm with different dimensional examples. The results show that the artificial electric field algorithm based on greedy state transition strategy is superior to the classical algorithm.

In addition, GSTAEFA is weak in time complexity, so it still has room for further optimization. In the future, we will consider reducing the time cost of the algorithm while ensuring the solution accuracy. We can try to reduce the local search times according to probability to reduce the time complexity. Finally, we focus on single-target SMTSP, so it is interesting that our algorithm can be used to solve multi-target projects. As a future research, the formulas proposed in this study can be used to obtain Pareto optimal or nondominated solutions through multi-objective precise and multi-objective metaheuristic solutions.