An Enhanced Artiﬁcial Electric Field Algorithm with Sine Cosine Mechanism for Logistics Distribution Vehicle Routing

: Aiming at the scheduling problem of logistics distribution vehicles, an enhanced artiﬁcial electric ﬁeld algorithm (SC-AEFA) based on the sine cosine mechanism is proposed. The development of the SC-AEFA was as follows. First, a map grid model for enterprise logistics distribution vehicle path planning was established. Then, an enhanced artiﬁcial electric ﬁeld algorithm with the sine cosine mechanism was developed to simulate the logistics distribution vehicle scheduling, establish the logistics distribution vehicle movement law model, and plan the logistics distribution vehicle scheduling path. Finally, a distribution business named fresh enterprise A in the Fuzhou Strait Agricultural and Sideline Products Trading Market was selected to test the effectiveness of the method proposed. The theoretical proof and simulation test results show that the SC-AEFA has a good optimization ability and a strong path planning ability for enterprise logistics vehicle scheduling, which can improve the scheduling ability and efﬁciency of logistics distribution vehicles and save transportation costs.


Introduction
Many scientific and engineering problems in the fields of industry, agriculture, transportation, information, and management, among others, belong to optimization problems, or can be transformed into optimization problems [1][2][3][4]. These optimization problems are one of the hotspots and difficulties recognized by the experts and scholars at home and abroad. Mature optimization theories and methods have been widely used in these fields [5][6][7]. With the deepening of human cognitive activities and the rapid development of computer science and technology, the optimization problems faced in the real world are becoming increasingly diversified, large-scale, and complex. Additionally, these optimization problems present complex features such as being highly dynamic, high-dimensional, nonlinear, multi-objective, multi-constraint, discontinuous, and non-differentiable. This makes it difficult for experts and scholars using traditional optimization theories and methods to solve problems from the perspective of analyzing the mathematical characteristics of the problem [8][9][10][11][12]. Therefore, seeking new intelligent optimization algorithms with high efficiency, parallelism, adaptability, and robustness to solve large-scale complex optimization problems has become an urgent and persistent research topic in the field of engineering application, which not only has important theoretical significance but also has a wide application prospect.
Although there are many types of optimization algorithms in the field of intelligent optimization, none of them can solve all optimization problems. Therefore, a large number of new optimization algorithms are constantly being proposed or improved. In recent decades, meta-heuristic algorithms based on the population have achieved good performance in solving complex engineering optimization problems: for example, the genetic algorithm (GA) [13], the simulated annealing algorithm (SAA) [14], particle swarm optimization (PSO) [15], the bat algorithm (BA) [16], ant colony optimization (ACO) [17], the novel moth to fire algorithm (MFO) [18], the locust optimization algorithm (GOA) [19], the butterfly optimization algorithm (BOA) [20], and the sine cosine optimization algorithm (SCA) [21], among others [22][23][24][25][26][27][28][29][30][31]. These algorithms can be grouped into two broad categories: individual-based and group-based. The first class generates only one solution, while the second class generates multiple solutions.
The artificial electric field algorithm (AEFA) [32] is different from these swarm intelligence bionic algorithms; it simulates the process of the relative motion of the charged particles under Coulomb force in the electrostatic field. The AEFA has the advantages of a simple structure, less adaptive parameters, and a simple algorithm principle. With the increasingly scattered urban commercial centers and the increasing demand for logistics, vehicle routing problems have gradually become the focus of research by scholars of intelligent optimization algorithms. The vehicle routing problem (VRP) [33] is a crucial part of logistics distribution optimization. In the process of logistics distribution, by selecting the optimal transportation route for the distribution vehicles and rationally arranging the scheduling sequence of the vehicles, the empty driving rate and driving distance of the vehicles can be effectively reduced. This problem was first proposed by Dantzig and Ramser in 1959 and belongs to the NP-hard problem [34]. At present, scholars at home and abroad have carried out extensive and in-depth research on the VRP, and the VRP has been applied to many social fields such as the route optimization of garbage trucks and the delivery route optimization of chain stores [35]. Since the traditional vehicle routing problem has less constraints, the vehicle cost is usually taken as the total cost as the optimization objective, which leads to great limitations in practical applications [36]. Therefore, the vehicle routing problem with time window constraints has become a research hotspot. Currently, many novel intelligent algorithms are applied to solve the vehicle routing problem with time window constraints [37]. Tas solved the vehicle routing problem with time-dependent soft time windows and random travel times by using the tabu search algorithm and the adaptive large neighborhood search algorithm, and showed that the method could be used to solve some other large-scale problems [38]. Iqbal used artificial bee colonies that simulate the foraging behavior of bees and a hybrid hyper-heuristic algorithm to solve the multi-objective vehicle routing problem with time windows [39]. Wang proposed a method to describe the spatial distribution of solutions using a distribution estimation algorithm using the generalized Mallows distribution as a probabilistic model to solve vehicle routing problems with time windows [40]. This paper starts from an actual scientific engineering optimization problem, takes the artificial electric field algorithm as the research object, and uses the characteristics of the sine cosine algorithm (SCA) so that it is not easy to fall into a local optimum and has a fast convergence speed. The method of combining theoretical analysis, numerical calculation, and engineering application was adopted. The theoretical system of the artificial electric field algorithm for solving intelligent logistics scheduling problems was constructed. The performance of the new algorithm was tested and verified through practical engineering optimization problems to effectively and systematically research the framework, theory, and application of the new optimization algorithm. The work conducted in this paper is the first application of the artificial electric field algorithm to the VRPTW, which is an innovative application. The main problem faced in the solution process of the simulation experiment is how to code and optimize. After many attempts, it was finally decided to use the natural number encoding method, combined with ant colony optimization, to solve the encoding strategy of such problems, and the improved algorithm of this paper was used for loop iteration.
The innovations and main contributions of this paper are as follows: • An enhanced artificial electric field algorithm with the sine cosine mechanism, named SC-AEFA, is proposed; An optimization scheduling algorithm for logistics distribution vehicles based on the SC-AEFA is proposed for the first time; • A map grid model for enterprise logistics distribution vehicle path planning is established; • Comprehensive experiments were designed and executed to prove the effectiveness of the SC-AEFA through test functions and the case of an actual distribution business, named fresh enterprise A.

Artificial Electric Field Algorithm
The artificial electric field algorithm (AEFA) is a novel meta-heuristic optimization algorithm to simulate the mutual motion of charged particles in an electrostatic field. In order to simplify the operation, the AEFA only considers the attractive force between particles, ignoring the repulsive force between charged particles to ensure that particles with a large charge can attract the nearby particles with a low charge.
Each charged particle represents a feasible solution in the search space. The fitness value of each solution is determined by the charge of each charged particle. The higher the charge of the particles, the closer the feasible solutions are to the optimal solution. The motion principle of the charged particles is shown in Figure 1. Each circle represents a charged particle, and the size of the circle represents the amount of charge. The charged particle Q 1 is attracted to the other three charged particles and finally forms a resultant force F and acceleration in this direction. It can be seen that Q 4 has the largest amount of charge and has the greatest attraction to Q 1 , so the direction of the resultant force on Q 1 is closer to the direction of attraction of Q 4 to Q 1 . Therefore, in the iteration process of the AEFA, the charged particles with a small charge in the search space will move to the charged particles with a high charge, so that the algorithm converges to the optimal solution [41].

lished; 
Comprehensive experiments were designed and executed to prove th of the SC-AEFA through test functions and the case of an actual distrib named fresh enterprise A.

Artificial Electric Field Algorithm
The artificial electric field algorithm (AEFA) is a novel meta-heuristi algorithm to simulate the mutual motion of charged particles in an electr order to simplify the operation, the AEFA only considers the attractive forc ticles, ignoring the repulsive force between charged particles to ensure tha a large charge can attract the nearby particles with a low charge.
Each charged particle represents a feasible solution in the search spa value of each solution is determined by the charge of each charged parti the charge of the particles, the closer the feasible solutions are to the optima motion principle of the charged particles is shown in Figure 1. Each circ charged particle, and the size of the circle represents the amount of charg particle is attracted to the other three charged particles and finally for force and acceleration in this direction. It can be seen that has the l of charge and has the greatest attraction to , so the direction of the res is closer to the direction of attraction of to . Therefore, in the ite of the AEFA, the charged particles with a small charge in the search spac the charged particles with a high charge, so that the algorithm converges solution [41]. The mathematical model of the AEFA can be described by Equations where is a random number in the interval [0, 1]; represents The mathematical model of the AEFA can be described by Equations (1) and (2) [42].
where rand is a random number in the interval [0, 1]; V t+1 i represents the velocity of the i-th charged particle at the (t + 1)-th iteration; X t+1 i represents the position of the i-th charged particle at the (t + 1)-th iteration; and a t i represents the acceleration of the i-th charged particle at the t-th iteration.
According to Newton's second law, when the particle is subjected to the electric field force, the expression of acceleration is described as follows.
At the t-th iteration, the electric field intensity of the i-th particle is The resultant force of the charged particle in the solution space is The resultant force is calculated according to the Coulomb force on the particle. The Coulomb force on the charged particle is modeled as follows.
In Equation (6), F t ij represents the Coulomb force of charged particle i and charged particle j at the t-th iteration; K t is the Coulomb constant; X t best represents the optimal individual at the t-th iteration; R ij represents the distance between charged particle i and charged particle j; ε is a very small positive number. In Equation (8), K 0 = 500; α = 30; iteration represents the current number of iterations; Maxiteration represents the maximum number of iterations. The change in the Coulomb constant makes the algorithm perform a global search in the early iteration and turn to a local search in the later iteration. The K t iteration process is shown in Figure 2.
particle at the -th iteration; is the Coulomb constant; represents the optimal individual at the -th iteration; represents the distance between charged particle and charged particle ; is a very small positive number. In Equation (8), = 500; = 30; represents the current number of iterations; represents the maximum number of iterations. The change in the Coulomb constant makes the algorithm perform a global search in the early iteration and turn to a local search in the later iteration. The iteration process is shown in Figure 2. The charge of all particles in the first-generation population is the same (set to 1). Starting from the second generation, the iterative formula of the charge is as follows: The charge of all particles in the first-generation population is the same (set to 1). Starting from the second generation, the iterative formula of the charge Q t i is as follows: Among them, q t i represents the charge of the i-th particle at the t-th iteration; Q t i is the normalization of q t i ; N is the number of particles; f it t i is the fitness value of the i-th individual at the t-th iteration; best(t) and worst(t) represent the optimal fitness value and the worst fitness value at the t-th iteration, respectively (the same is true in Algorithm 1).
The position of the algorithm at each iteration is determined by the greedy strategy: Equation (11) represents the selection method of the position of the individual in the next generation. If the fitness of the updated individual is worse than that of the previous generation, the position of the individual will not change; otherwise, the updated individual is used as the next generation.
To sum up, the pseudocode of the artificial electric field algorithm is described as follows.
Algorithm 1 Pseudocode of the artificial electric field algorithm (AEFA).

The Sine Cosine Algorithm and Its Basic Principles
The sine cosine algorithm (SCA) is a new meta-heuristic optimization algorithm based on mathematical trigonometric functions proposed by Seyedali Mirjalili in 2016. The SCA utilizes the mathematical properties of the sine and cosine functions, performs a global search and local search of the algorithm by adding adaptive parameters to change the amplitude of the sine and cosine functions, and finally finds the optimal solution. The update formula of the position of the individual in the SCA is described as follows [43].
In Equation (12), X t i represents the position of the i-th individual at the t-th iteration; P t best represents the optimal individual in the population at the t-th iteration; r 1 , r 2 , r 3 , and r 4 are four key parameters in the sine cosine algorithm, where r 1 controls the individual search direction and the degree of influence of the step size in the iteration process, r 2 controls the search distance of the individual in the iterative process, r 3 is a random weight coefficient, which determines the optimal individual's impact on the current influence degree of the individual, and r 4 is the conversion switch of the sine mechanism or cosine mechanism of the control algorithm. In Equation (13), a is a constant (generally 2); iteration is the current iteration number; Maxiteration is the maximum iteration number.
The iteration principle of the SCA is shown in Figure 3 [44], in which r 1 = 2, r 3 = 1. It can be seen from the figure that when 1 < |r 1 sin(r 2 )| < 2 and 1 < |r 1 cos(r 2 )| < 2, the algorithm performs a global search; when the value of r 1 sin(r 2 ) or r 1 cos(r 2 ) belongs to the interval [−1, 1], the algorithm performs a local search in the explored space. The purpose of a global search is to quickly browse the search space and lock the range of the optimal solution, while that of a local search is to find the optimal solution within the locked range.
Appl. Sci. 2022, 12, 6240 6 of 18 In Equation (12), represents the position of the -th individual at the -th iteration; represents the optimal individual in the population at the -th iteration; , , , and are four key parameters in the sine cosine algorithm, where controls the individual search direction and the degree of influence of the step size in the iteration process, controls the search distance of the individual in the iterative process, is a random weight coefficient, which determines the optimal individual's impact on the current influence degree of the individual, and is the conversion switch of the sine mechanism or cosine mechanism of the control algorithm. In Equation (13), is a constant (generally 2); is the current iteration number; is the maximum iteration number.
The iteration principle of the SCA is shown in Figure 3 [44], in which = 2, = 1. It can be seen from the figure that when 1 < | sin( )| < 2 and 1 < | cos( )| < 2, the algorithm performs a global search; when the value of sin( ) or cos( ) belongs to the interval [−1, 1], the algorithm performs a local search in the explored space. The purpose of a global search is to quickly browse the search space and lock the range of the optimal solution, while that of a local search is to find the optimal solution within the locked range.

Fundamental
Too much global searching will make the algorithm inefficient, and too much local searching will make the algorithm fall into a local optimum prematurely, resulting in unsatisfactory final results. Therefore, balancing the global search and local search can better improve the performance of the algorithm [45]. It was found that the position update of the artificial electric field algorithm is controlled by the position of the charged particle

Fundamental
Too much global searching will make the algorithm inefficient, and too much local searching will make the algorithm fall into a local optimum prematurely, resulting in unsatisfactory final results. Therefore, balancing the global search and local search can better improve the performance of the algorithm [45]. It was found that the position update of the artificial electric field algorithm is controlled by the position of the charged particle and the mutual attraction of the surrounding particles. The information interaction ability between the charged particles is strong, so the AEFA has a strong local search ability and a weak global search ability. Compared with the AEFA, the SCA can balance the global search and local development better. Therefore, the updating mechanism of the SCA is integrated into the AEFA (SC-AEFA), which changes the iterative method of the AEFA, makes the global search and local search of the algorithm achieve a dynamic balance, and enhances the optimization ability of the algorithm.
In order to carry out the global search as much as possible in the early stage of the algorithm, the local search of the optimization range is carried out in the later stage; it is specified that when the number of iterations is less than 200, the algorithm uses a modified sine cosine iteration formula to update the position.

Improved Artificial Electric Field Algorithm
Aiming at the shortcomings of the AEFA, this paper made the following improvements to the original artificial electric field algorithm: a partial repulsion factor was introduced on the basis of the original algorithm, that is, far away from the current worst individual X t worst . In addition, in order to reduce the influence of the step size in the later iteration of the algorithm and improve the role of the particle's own position in the iteration, the parameter γ was added, which decreases as the number of iterations increases; the improved iterative formula is given as follows.

Improved Sine Cosine Algorithm
In order to better coordinate the global search and local search of the SCA, the sine cosine algorithm was improved. Section 2.2 points out that the parameter r 1 is extremely important and determines the influence of the individual search direction and step size during the iterative process. However, r 1 as a linear function does not favor a sufficient global search in the early stage of the algorithm iteration; this will lead to a decline in the local optimization ability in the later stage of the algorithm. Therefore, the parameter r 1 can be improved as follows [46].
Compared with the previous one, the improved r 1 expands the global search range of the SCA and uses the mathematical characteristics of the cosine function to make r 1 oscillate up and down within a fixed range, which better balances the global search and local search of the algorithm.

Steps of SC-AEFA
Based on the improved artificial electric field algorithm, the improved sine cosine algorithm we introduced to obtain the artificial electric field algorithm with the sine cosine mechanism (SC-AEFA). Combining the advantages of the two algorithms, the SC-AEFA not only has a strong global search ability but also has the ability to avoid falling into a local optimum. The pseudocode of the SC-AEFA is shown in Algorithm 2.

Simulation Experiment and Result Analysis
In order to test the performance of the SC-AEFA, the artificial electric field algorithm (AEFA), artificial electric field algorithm with chaotic mapping (IAEFA), butterfly optimization algorithm (BOA), and grasshopper optimization algorithm (GOA) were used as a control group, and six groups of functions (as shown in Table 1) were used for testing [47][48][49][50]. The software used was MATLAB R2016a, the operating environment was a 64-bit Windows 10 operating system, and the computer hardware parameters were as follows: the processor type was an AMD Ryzen 5 3500U, the on-board RAM was 12.0 GB, and the system was a 64-bit operating system.

Function
Search Space Theoretical Value The above five algorithms used the same population size N = 50, dimension D = 30, and maximum number of iterations Maxiteration = 1000. In order to ensure the validity of the experimental results, each group of functions was run independently 20 times, and the mean value and variance of the running results of each algorithm were compared. The mean value represents the final solution accuracy of the algorithm, and the variance represents the stability of the algorithm. The running results of the five algorithms on the above six standard test functions are shown in Table 2.  Table 2 shows the mean and variance of 20 independent runs of the test functions for the GOA, BOA, AEFA, IAEFA, and SC-AEFA. It can be seen from the operation results that the performance and accuracy of the SC-AEFA were significantly stronger than those of the other four algorithms. For the function f 6 , the SC-AEFA can directly search for the optimal value 0, and the optimization effect can reach 100%. Since the function f 5 belongs to the banana function, the optimization result of the SC-AEFA is not ideal, but it is still many orders of magnitude more accurate than that of the other four algorithms. Therefore, the performance of the SC-AEFA has obvious competitive advantages.
The convergence trend comparison diagram of the five algorithms is presented below to observe the differences between the five algorithms more intuitively.
It can be seen from Figure 4 that the SC-AEFA had obvious advantages in the convergence speed compared with the other algorithms. In addition, as shown in Figure 4b, although the SC-AEFA falls into a local optimum in the early stage of the iteration, as the number of iterations increases, the SC-AEFA escapes this situation. This shows that the SC-AEFA has a strong ability to deviate from the local optimum, that is, it has a strong global search ability and robustness. In Figure 4b,d,e, the BOA and SC-AEFA showed little difference in the convergence speed, but from the analysis of the results, the SC-AEFA had a higher accuracy.
SC-AEFA has a strong ability to deviate from the local optimum, that is, it has a strong global search ability and robustness. In Figure 4b,d,e, the BOA and SC-AEFA showed little difference in the convergence speed, but from the analysis of the results, the SC-AEFA had a higher accuracy.

Model Analysis
Unlike the traditional vehicle routing problem, this paper added time window constraints. Each customer has its own service time, and arriving at the customer point earlier or later will be penalized by the time window, which will increase the cost. Furthermore, this is not limited to one cargo vehicle. Within the range of the distribution center, additional delivery vehicles can be dispatched, but each vehicle has a usage cost. On the premise of the above conditions, the distribution vehicle needs to minimize the distribution cost while completing the transportation task.

Model Assumptions
1. The delivery vehicle only delivers a single type of goods; 2. The needs of customers in the delivery process are sequentially met; 3. The specifications of the delivery vehicles are unified; 4. After the delivery vehicle completes the delivery task, it needs to return to the delivery center; 5. The whole distribution process does not consider the influence of other special factors (traffic congestion, vehicle failure, etc.) and the driving speed is constant; 6. The time when the delivery vehicle leaves the distribution center is calculated from 0:00;

Model Analysis
Unlike the traditional vehicle routing problem, this paper added time window constraints. Each customer has its own service time, and arriving at the customer point earlier or later will be penalized by the time window, which will increase the cost. Furthermore, this is not limited to one cargo vehicle. Within the range of the distribution center, additional delivery vehicles can be dispatched, but each vehicle has a usage cost. On the premise of the above conditions, the distribution vehicle needs to minimize the distribution cost while completing the transportation task.

1.
The delivery vehicle only delivers a single type of goods; 2.
The needs of customers in the delivery process are sequentially met; 3.
The specifications of the delivery vehicles are unified; 4.
After the delivery vehicle completes the delivery task, it needs to return to the delivery center; 5.
The whole distribution process does not consider the influence of other special factors (traffic congestion, vehicle failure, etc.) and the driving speed is constant; 6.
The time when the delivery vehicle leaves the distribution center is calculated from 0:00; 7.
The road gradient of each driving route in the distribution network is 0; 8.
The service time of the delivery vehicles at each demand point is equal (the service time can also be set according to the actual situation). Table 3) 2.

Parameter Symbol Description (as shown in
Decision Variable Description When the vehicle k drives from node i to node j, x ijk = 1; otherwise, x ijk = 0. When the vehicle k is put into use, y k = 1; otherwise, y k = 0.
The load of vehicle k leaving customer node i, i ∈ V k ∪ N

Establishment of VRPTW Model
The vehicle routing problem with the time window constraints (VRPTW) optimization model is as follows: The objective function indicates that the total delivery cost was the lowest. The total cost consists of the vehicle fixed cost, travel distance cost, and time window penalty cost. The model constraints are as follows. ∑ j∈N,i =j ∑ k∈K y k ≤ |K| (23) ∑ i∈V,i =j Equation (21) indicates that the demand of each customer point is satisfied only once by one vehicle. Equation (22) indicates that each vehicle only serves customer points on one path. Equation (23) indicates that the number of vehicles put into use does not exceed the total number of vehicles in the distribution center. Equation (24) indicates that the traffic flow remains balanced at each customer point. Equation (25) represents the residual cargo weight of the vehicle at customer point j. Equation (26) indicates that the load of the vehicle does not exceed the maximum load of the vehicle in the process of driving. Equation (27) indicates the waiting time tω i = e i − t 1 i for the vehicle when it arrives at the customer point early. If the vehicle does not arrive in advance, tω i = 0. Equation (28) represents the time when the vehicle departs from customer point i to the next customer point. Equation (29) represents the driving time of the vehicle from customer point i to customer point j. Equation (30) represents the time when the vehicle arrives at customer point j.

Coding Strategy
In accordance with the characteristics of the problem, this paper used the natural number coding method and coding strategy of ant colony optimization, and the SC-AEFA for the cyclic iteration.

Solving Steps
On the basis of determining the coding strategy, the flow chart of the algorithm is shown in Figure 5. The specific steps of the algorithm are described as follows.
Step 1. Initialize the population and various parameters, obtain the position information of each node of the problem model, establish a coordinate system, and calculate the distance matrix; Step 2. Update the population; The specific steps of the algorithm are described as follows.
Step 1. Initialize the population and various parameters, obtain the position information of each node of the problem model, establish a coordinate system, and calculate the distance matrix; Step 2. Update the population; Step 3. Compare the cost of each path with the previous generation, and save the best path; Step 4. If the algorithm reaches the maximum number of iterations, output the optimal solution; otherwise, go back to Step 2.

Example Verification
Taking a distribution business called fresh enterprise A in the Fuzhou Strait Agricultural and Sideline Products Trading Market as an example, the optimization problem of the vehicle distribution path was solved.

Basic Data
The model data used in this paper are shown in Tables 4 and 5 and Figure 6 including the specific information of the distribution vehicle and the geographic location of the customer points and distribution centers.    Model parameter settings: the speed of the delivery vehicle is = 60 km/h; the driving cost per mileage is CNY 0.4; the penalty coefficient for being earlier than the time window is = 0.05; the penalty coefficient for being later than the time window is = 0.1; the penalty coefficient for violating the capacity constraint is ℎ = 100.  Model parameter settings: the speed of the delivery vehicle is v = 60 km/h; the driving cost per mileage is CNY 0.4; the penalty coefficient for being earlier than the time window is early = 0.05; the penalty coefficient for being later than the time window is late = 0.1; the penalty coefficient for violating the capacity constraint is al pha = 100.

Analysis of Results
Under the premise of ensuring the same population size, dimension, number of iterations, and related parameters, the above VRPTW was solved by using the ACO algorithm, BOA, AEFA, and SC-AEFA. The results are described below.
It can be seen from Table 6 that the SC-AEFA obtained better results under the premise of less time, which shows that the SC-AEFA is superior to the other three algorithms in terms of both the computing speed and the optimization accuracy. In order to more clearly observe the convergence trend of the SC-AEFA and the other three algorithms, the algorithm iteration convergence graph is shown in Figure 7.

. Analysis of Results
Under the premise of ensuring the same population size, dimension, number of iterations, and related parameters, the above VRPTW was solved by using the ACO algorithm, BOA, AEFA, and SC-AEFA. The results are described below.
It can be seen from Table 6 that the SC-AEFA obtained better results under the premise of less time, which shows that the SC-AEFA is superior to the other three algorithms in terms of both the computing speed and the optimization accuracy. In order to more clearly observe the convergence trend of the SC-AEFA and the other three algorithms, the algorithm iteration convergence graph is shown in Figure 7.  From the convergence comparison chart, it can be seen that the effect of the ant colony algorithm was the worst, and the convergence trend was very weak. The BOA was prone to premature convergence, resulting in it taking a long time to jump out of the local optimum, and the convergence accuracy was not high. Both the AEFA and SC-AEFA had From the convergence comparison chart, it can be seen that the effect of the ant colony algorithm was the worst, and the convergence trend was very weak. The BOA was prone to premature convergence, resulting in it taking a long time to jump out of the local optimum, and the convergence accuracy was not high. Both the AEFA and SC-AEFA had better convergence trends, but the SC-AEFA had a significantly higher accuracy.
It can be seen from Table 7 that the optimal value, the worst value, and the average value obtained by the algorithm proposed in this paper were better than those of the other three algorithms. At the same time, in the 20 independent repeated experiments, the SC-AEFA algorithm's earliest convergence iteration number was 23, which was the fastest among the four algorithms. Additionally, the optimal value obtained by the algorithm proposed was 556.12, while the theoretical value of the example was 553.81. In comparison, it can be found that the degradation degree of the algorithm's performance was not obvious, which indicates that the optimization results of the algorithm proposed in this paper are effective in solving the VRPTW.

Conclusions
In order to improve the defects of the AEFA, this paper proposed an improved artificial electric field algorithm (SC-AEFA) that integrates the sine cosine mechanism. First, the iterative formula of the original artificial electric field algorithm was improved to reduce the influence of the step size in the later iteration to highlight the importance of individual positions. In addition, a repulsive factor was introduced in the iterative process to keep away from the current worst individual. Second, some parameters of the sine cosine algorithm were improved, so that the sine cosine algorithm could better control the dynamic balance between the global search and local search. Finally, the improved sine cosine iterative formula was introduced into the artificial electric field algorithm, so that the algorithm can increase the scope of the global search and improve the ability of local optimization. Through the comparison experiment of the test functions, it was proven that the optimization accuracy of the algorithm proposed was significantly improved, and the stability had more significant advantages.
In addition, this paper took the vehicle routing problem with time window constraints as the research object and established the VRPTW with the vehicle cost, distance cost, and time window penalty cost as the objective function. This problem was solved by the ACO algorithm, BOA, AEFA, and SC-AEFA. The results showed that the optimization ability of the SC-AEFA was significantly improved compared to the AEFA, and that it had a certain robustness. The results obtained by the algorithm proposed are not the best solution, so there is still much room for improvement in the performance of the algorithm. The main problem we face is that we cannot find the best solution range in the global search, so we cannot find the best result in the local search. In the following research, based on this problem, strategies to enhance the global search will be added into the algorithm.
Future research can be further carried out from the following two aspects: Methods for solving discrete problems such as path optimization and location selection can be studied in more depth, since the artificial electric field algorithm is more suitable for solving discrete problems. The improvement mechanism of this paper is relatively simple. The performance of the artificial electric field algorithm has not been fully explored, so the algorithm still has much room for improvement. Applying the improved artificial electric