# Energy Dispatching Based on an Improved PSO-ACO Algorithm

Authors: Qisong Song; Liya Yu; Shaobo Li; Naohiko Hanajima; Xingxing Zhang; Ruiqiang Pu
Journal: International Journal of Intelligent Systems
 (2023)

---

## Abstract

In order to improve the comprehensive performance of energy dispatching between different sites, the optimization research of particle swarm optimization (PSO) algorithm and ant colony optimization (ACO) algorithm is carried out. We proposed a new improved PSO-ACO algorithm based on the idea of hybrid algorithm to solve the problem of poor energy dispatching efficiency between sites. First, the multiobjective performance indicators were introduced to transform the sites’ energy dispatching problem into a multiobjective optimization problem. Second, the vitality factor was introduced into the PSO strategy to solve the local optimal problem, and in the PSO-ACO fusion strategy, the PSO routes were transformed into the ant colony enhancement pheromone to accelerate the accumulation speed of the ACO initial pheromone. Then, the angle guidance function was introduced into the state transition probability of the ACO strategy to improve the global search capability, and a high-quality pheromone update rule was proposed to improve the convergence speed of the algorithm. Finally, simulation experiments were carried out on the improved PSO-ACO algorithm, Min–Max Ant System (MMAS) algorithm, ACO algorithm, PSO algorithm, and PSO update algorithm in a variety of complex site scenarios. The simulation results show that the improved PSO-ACO algorithm can plan a site energy dispatching route with shorter route, less time-consuming, and higher security and realize the comprehensive and global optimization of energy dispatching.


---

## Body

## 1. Introduction

Energy is the foundation of sustainable development of human society. With the rapid development of the global economy, the demand for energy continues to increase, resulting in energy problems becoming important research carried out by human beings at present. With the overexploitation of resources and environmental constraints, it is difficult for the energy-intensive development mode to meet the current demand. Therefore, energy dispatching has become the main mode of current energy utilization [1], where energy dispatching between different sites is a research hotspot in the energy field and a key technology of the Energy Internet. Realizing the interconnection of energy between different sites and building a large-scale energy network channel is the top priority of the current energy development layout [2].Energy dispatching refers to rationally arranging dispatch routes of energy dispatch links to meet energy supply and demand matching. The efficiency of energy dispatching between different sites is low, the route is long, the cost is high, the safety performance is poor, and there is a problem of energy waste. Therefore, in energy dispatching, optimizing energy allocation, improving energy utilization, and planning a safe, shortest, and optimal energy route with minimum cost are the main goals of energy dispatching [3].At present, many researchers have performed relevant research work in energy dispatching, including energy dispatching system [4], energy management system [5], energy control system [6], management method [7, 8], detection method [9], remote control method [10], and so on. However, there are few research studies on energy dispatching algorithms between different sites. The mainstream algorithms in current dispatching research are mainly intelligent optimization algorithms, including genetic algorithm(GA) [11], PSO algorithm [12], ACO algorithm [13], grey wolf optimizer(GWO) algorithm [14], deep learning(DL) [15], differential evolution(DE) algorithm [16], fruit fly optimization Algorithm(FOA) algorithm [17], and so on.Aiming at the problem of energy dispatching route cost, Ara et al. [18] proposed a self-regulating PSO algorithm to reduce energy costs in energy dispatching under the premise of ensuring time. Li et al. [19] proposed an improved new mayfly algorithm to reduce operating costs on the basis of ensuring the stability and balance of grid energy dispatch. Deng et al. [20] proposed an improved krill swarm algorithm to reduce the overall cost in energy dispatch and improve energy efficiency. Yu et al. [21] proposed a scheduling approach based on deep neural network and ACO, which can reduce the energy consumption cost of grid energy scheduling. Sahoo et al. [22] proposed an enhanced emperor penguin optimization algorithm to reduce the economic cost of renewable energy and microgrids dynamic dispatch.Aiming at the problem of energy dispatching route security, Cao et al. [23] proposed a nondominated-sorting GWO algorithm to solve the power plant multiobjective load dispatching problem, which improves the accuracy of energy dispatching and realizes the safe distribution of energy. Bo et al. [24] proposed an ultrashort-term optimal dispatch strategy based on distributed robust optimization, which improves the efficiency and accuracy of dispatch and ensures the security and robustness in dispatch. Paul et al. [25] proposed a whale optimization technology based on quasi-oppositional to solve the problem of route conflict in energy dispatching and reduce the loss in transmission. Lei et al. [26] proposed a dynamic energy dispatching method based on deep reinforcement learning to solve the uncertainty in microgrids.Aiming at the problem of energy dispatching route length, Chen et al. [27] proposed a new equilibrium optimization algorithm to solve the optimal energy scheduling problem, which has good global search performance and shortens the route length. Wang et al. [28] proposed an improved min–max power dispatching method which improves the smoothness of dispatching routes between two adjacent locations. Shang et al. [29] proposed an improved GA with simulated annealing, which improves the efficiency of dispatching, reduces the load of energy dispatching, and optimizes the dispatching route. Qiu et al. [30] proposed a robust optimization method driven by history correlation to solve the uncertainty problem of dispatching routes in microgrids, which improves the precision and linearization of dispatching routes.Aiming at the problem of energy dispatching route time, Ellahi and Abbas [31] proposed a hybrid metaheuristic approach to alleviate the energy dispatching problem of power plants, which reduces the cost reasonably and shortens the calculation time. Zeng et al. [32] proposed a multiobjective dispatch approach based on hierarchical progressive parallel NSGA-II algorithm, which speeds up the convergence speed of energy dispatching and reduces the algorithm iteration time. Li and Wang [33] proposed an improved intensity pareto evolutionary algorithm 2 (ISPEA2) and improved nondominated sorting genetic algorithm 2 (INSGA2), which improve the accuracy of energy dispatching and reduce the dispatching time. Wang et al. [34] proposed an improved harmony search algorithm to alleviate the time series constraint problem in dispatching.The research on the abovementioned algorithms only studies some of the problems existing in dispatching and lacks comprehensive research on dispatching problems. Therefore, we conducted a comprehensive study on the dispatching route problem.PSO has been used to optimize the model parameters and was applied to many multiobjective optimization problems. Song et al. [35] proposed a feature selection algorithm based on mutual information bare bones PSO, which improves the ability to deal with high-dimensional feature selection problems. On this basis, they combined PSO with correlation-guided clustering to propose a new three-phase hybrid feature selection algorithm, which reduced the computational cost, improved the algorithm search speed in high-dimensional data, and effectively solved the constrained problems of evolutionary algorithms in high-dimensional data feature selection [36]. Lu et al. [37] proposed PSO integrating neutrino-like particles, which can enhance its global search ability in nonlinear constrained optimization problems and avoid premature convergence.Ji et al. [38, 39] proposed a dual-surrogate-assisted and multisurrogate-assisted multitasking PSO, which can obtain multiple optimal solutions of expensive multimodal optimization problems at low computational cost. Ammar et al. [40] designed two new multiobjective binary PSO algorithms, which effectively solved multi‐item capacitated lot‐sizing problem. Zheng et al. [41] proposed a PSO algorithm based on migration learning, which effectively improves its search efficiency in the traveling salesman problem and can obtain better routes.The single algorithm has the disadvantage of insufficient optimization. The hybrid algorithm can combine the advantages of different algorithms to achieve better optimization results. The hybrid algorithm combining the two algorithms has better convergence and stability. From the above research, it can be seen that the PSO algorithm has a simple structure and few parameter settings, which can be used to optimize model parameters and has a good effect in solving multiobjective optimization problems. ACO algorithm has strong robustness and powerful global search ability and is the mainstream algorithm for energy dispatching research.In order to effectively solve the energy dispatching route problem, improve the accuracy and stability of the dispatching problem solution, and achieve the goal of obtaining a better route in a shorter time, we made the full use of the advantages of the two algorithms by hybriding the PSO and ACO algorithms and designing a hybrid PSO-ACO algorithm with less time and stronger global search ability.The main contributions of our work can be summarized as follows:(1)
We proposed a new improved PSO-ACO algorithm based on the hybrid algorithm idea, which can be used to solve multiobjective optimization problems and can obtain safe energy dispatching routes with less time, lower energy consumption, and shorter length.(2)
In the part of improving PSO, we introduced the vitality factor to increase the speed diversity, which solved the local optimum problem. Meanwhile, we introduced the routes generated by the improved PSO into the ACO, which solved the problem of lack of initial pheromone of ACO.(3)
We optimized the state transition probability and pheromone update rules of the ACO, which effectively improves the algorithm’s convergence speed and search quality, reduces the route search time, and achieves global optimization.The main structure of this paper is as follows: Section2 mainly describes the multiobjective optimization problem of energy dispatching. Section 3 mainly summarizes the basic principles of PSO and ACO. Section 4 proposes a new improved PSO-ACO algorithm and details its overall optimization process. Section 5 presents the simulation results and analyzes and discusses the results. Section 6 concludes the paper and gives recommendations for future work.


## 2. Problem Description

### 2.1. Mathematical Modelling

Energy dispatching between different sites is a multiobjective optimization problem, which needs to consider three aspects: route length, security, and energy consumption. We take the minimum route length, maximum security, and minimum energy consumption as the three main constraints of the multiobjective optimization problem and establish the mathematical model of the energy dispatching function.We set the number of sites to ben, N is the set of all sites, N=1,…,n, i repent the current site, k is the previous site of site i, and j is the next site of site i.The route length directly affects the time and efficiency of energy dispatch, the minimum route length can be described as follows:(1)minD=∑i=1n−1xj−xi2+yj−yi2,where xi,yi is the site coordinate value and D is the route length.The route security can ensure that the route of energy dispatching between different sites do not collide, maximum security can be described as follows:(2)maxS=∑i=2n−1xo−xi2+yo−yi2Nr,where S is the route security, xoyo is the coordinate value of the collision-prone location near the two sites, and Nr is the number of grids passing through the dangerous area in the route.The energy consumption can ensure that the energy dispatching can obtain a smoother route as much as possible, and the turning angle variable and turning times are taken as the main factors of the energy consumption index, and minimum energy consumption can be described as follows:(3)minE=μ1∑i=2n−1σlk,li+μ2Nt,(4)σlk,li=atanyj−yixi+1−xi−atanyi−ykxi−xk∗180pi,where E is the energy consumption value, σlk,li is the turning angle variable between line lk and line li, Nt is the turning times, and μ1 and μ2 are the weight coefficient of the turning angle variable and the turning times, respectively.In actual energy dispatching, the abovementioned evaluation indicators may lead to conflicts in the route optimization of energy dispatching. Therefore, in the route optimization of energy dispatching, it is necessary to balance various evaluation indicators, so it is necessary to set the corresponding weight coefficients for each evaluation indicator. The comprehensive multiobjective function for energy dispatching optimization can be defined as a weighted combination of minimum route length, maximum security, and minimum energy consumption, which can be described as follows:(5)J=hD∗minD+hSmaxS+hE∗minE,where hD, hS, and hE are the weight coefficients of the minimum route length, maximum security, and minimum energy consumption indicators, respectively.


### 2.2. Basic Constraints

In addition to the abovementioned three main constraints, there are also some basic constraints in the process of energy dispatching between different sites. These constraints include traffic balance constraint, flow direction unique constraint, and site unique constraint.The traffic balance constraint means that the traffic arriving at sitei is equal to the traffic leaving site i, which can be described as follows:(6)∑k∈N,i≠kXki−∑j∈N,j≠iXij=0,i∈N,where N is the set of all sites, k is the previous site of site i, j is the next site of site i, Xki is the traffic arriving at site i, and Xij is the traffic leaving site i.The flow direction unique constraint means that all energies leaving sitei and arriving at site j are unique, which can be described as follows:(7)∑i∈N,j≠iXijE=∑j∈NyjE,where XijE is the energy leaving the site i, and yjE is the energy arriving at the site j.The site’s unique constraint means that any station has and only one route can pass through it, which can be described as follows:(8)∑k≠i≠jXkij=1k,i,j∈N,where Xkij refers to the route through site i.


## 2.1. Mathematical Modelling

Energy dispatching between different sites is a multiobjective optimization problem, which needs to consider three aspects: route length, security, and energy consumption. We take the minimum route length, maximum security, and minimum energy consumption as the three main constraints of the multiobjective optimization problem and establish the mathematical model of the energy dispatching function.We set the number of sites to ben, N is the set of all sites, N=1,…,n, i repent the current site, k is the previous site of site i, and j is the next site of site i.The route length directly affects the time and efficiency of energy dispatch, the minimum route length can be described as follows:(1)minD=∑i=1n−1xj−xi2+yj−yi2,where xi,yi is the site coordinate value and D is the route length.The route security can ensure that the route of energy dispatching between different sites do not collide, maximum security can be described as follows:(2)maxS=∑i=2n−1xo−xi2+yo−yi2Nr,where S is the route security, xoyo is the coordinate value of the collision-prone location near the two sites, and Nr is the number of grids passing through the dangerous area in the route.The energy consumption can ensure that the energy dispatching can obtain a smoother route as much as possible, and the turning angle variable and turning times are taken as the main factors of the energy consumption index, and minimum energy consumption can be described as follows:(3)minE=μ1∑i=2n−1σlk,li+μ2Nt,(4)σlk,li=atanyj−yixi+1−xi−atanyi−ykxi−xk∗180pi,where E is the energy consumption value, σlk,li is the turning angle variable between line lk and line li, Nt is the turning times, and μ1 and μ2 are the weight coefficient of the turning angle variable and the turning times, respectively.In actual energy dispatching, the abovementioned evaluation indicators may lead to conflicts in the route optimization of energy dispatching. Therefore, in the route optimization of energy dispatching, it is necessary to balance various evaluation indicators, so it is necessary to set the corresponding weight coefficients for each evaluation indicator. The comprehensive multiobjective function for energy dispatching optimization can be defined as a weighted combination of minimum route length, maximum security, and minimum energy consumption, which can be described as follows:(5)J=hD∗minD+hSmaxS+hE∗minE,where hD, hS, and hE are the weight coefficients of the minimum route length, maximum security, and minimum energy consumption indicators, respectively.


## 2.2. Basic Constraints

In addition to the abovementioned three main constraints, there are also some basic constraints in the process of energy dispatching between different sites. These constraints include traffic balance constraint, flow direction unique constraint, and site unique constraint.The traffic balance constraint means that the traffic arriving at sitei is equal to the traffic leaving site i, which can be described as follows:(6)∑k∈N,i≠kXki−∑j∈N,j≠iXij=0,i∈N,where N is the set of all sites, k is the previous site of site i, j is the next site of site i, Xki is the traffic arriving at site i, and Xij is the traffic leaving site i.The flow direction unique constraint means that all energies leaving sitei and arriving at site j are unique, which can be described as follows:(7)∑i∈N,j≠iXijE=∑j∈NyjE,where XijE is the energy leaving the site i, and yjE is the energy arriving at the site j.The site’s unique constraint means that any station has and only one route can pass through it, which can be described as follows:(8)∑k≠i≠jXkij=1k,i,j∈N,where Xkij refers to the route through site i.


## 3. Intelligent Optimization Algorithm

### 3.1. PSO Algorithm

PSO algorithm is an evolutionary computing technology that simulates bird flock foraging; it seeks the optimal solution through cooperation and information sharing among individuals in the group. The particles in the PSO only have two attributes: speed and position, where speed represents the speed of movement, and position represents the direction of movement. Each particle searches for the optimal solution individually in the search space, which is marked as the individual optimal value of the particle. The individual optimal values of each particle in the particle swarm are shared with each other, and the optimal individual optimal value is found from it, which is marked as the global optimal value. Each particle in the particle swarm adjusts the next speed and position according to the global optimal value and its own particle individual optimal value.The main process of the PSO is as follows:Step 1. Initialize parameters and randomly generate a batch of uniformly distributed initial particlesStep 2. Calculate the fitness value of each particle in the populationStep 3. Find out the individual optimal solution and the global optimal solutionStep 4. Use the speed and position update equations to update the populationStep 5. Determine whether the termination conditions are met. If the conditions are met, execute Step 6, otherwise, repeat Steps 2–5Step 6. Output the route


### 3.2. ACO Algorithm

ACO algorithm is a probabilistic algorithm that simulates ants’ foraging behavior to find optimal routes. The working mechanism of the ant colony algorithm is as follows: first, we release the pheromone on the route; second, we select a route randomly in the feasible area, then accumulate the pheromone concentration through the route cycle; and finally, we select the route with the highest pheromone concentration as the target route. The main shortcomings of the ACO at this stage are insufficient initial pheromone, poor global search ability, low algorithm solution efficiency, and poor convergence. In view of the abovementioned shortcomings, the main optimization directions for improving the ACO are structure optimization, parameter optimization, multialgorithm fusion, search strategy, pheromone initialization, and update strategy.The main process of the ACO are as follows:Step 1. Initialize pheromone and related parameters;Step 2. Build the solution according to the state transition;Step 3. Update the pheromone according to the update rules;Step 4. Determine whether the termination condition is met. If the condition is met, execute Step 5, otherwise, repeat Steps 2–4;Step 5. Output the route.


## 3.1. PSO Algorithm

PSO algorithm is an evolutionary computing technology that simulates bird flock foraging; it seeks the optimal solution through cooperation and information sharing among individuals in the group. The particles in the PSO only have two attributes: speed and position, where speed represents the speed of movement, and position represents the direction of movement. Each particle searches for the optimal solution individually in the search space, which is marked as the individual optimal value of the particle. The individual optimal values of each particle in the particle swarm are shared with each other, and the optimal individual optimal value is found from it, which is marked as the global optimal value. Each particle in the particle swarm adjusts the next speed and position according to the global optimal value and its own particle individual optimal value.The main process of the PSO is as follows:Step 1. Initialize parameters and randomly generate a batch of uniformly distributed initial particlesStep 2. Calculate the fitness value of each particle in the populationStep 3. Find out the individual optimal solution and the global optimal solutionStep 4. Use the speed and position update equations to update the populationStep 5. Determine whether the termination conditions are met. If the conditions are met, execute Step 6, otherwise, repeat Steps 2–5Step 6. Output the route


## 3.2. ACO Algorithm

ACO algorithm is a probabilistic algorithm that simulates ants’ foraging behavior to find optimal routes. The working mechanism of the ant colony algorithm is as follows: first, we release the pheromone on the route; second, we select a route randomly in the feasible area, then accumulate the pheromone concentration through the route cycle; and finally, we select the route with the highest pheromone concentration as the target route. The main shortcomings of the ACO at this stage are insufficient initial pheromone, poor global search ability, low algorithm solution efficiency, and poor convergence. In view of the abovementioned shortcomings, the main optimization directions for improving the ACO are structure optimization, parameter optimization, multialgorithm fusion, search strategy, pheromone initialization, and update strategy.The main process of the ACO are as follows:Step 1. Initialize pheromone and related parameters;Step 2. Build the solution according to the state transition;Step 3. Update the pheromone according to the update rules;Step 4. Determine whether the termination condition is met. If the condition is met, execute Step 5, otherwise, repeat Steps 2–4;Step 5. Output the route.


## 4. Improved PSO-ACO Algorithm

### 4.1. Improved PSO Strategy

The core of PSO is to update the population using the speed and position update functions. The PSO speed update function can be described as follows:(9)vt=ω⋅vt−1+c1⋅r1⋅pt−1−xt−1+c2⋅r2⋅gt−1−xt−1,where ω is the inertia weight coefficient, pt−1 is the particle individual optimal at the previous moment, gt−1 is the particle swarm global optimal at the previous moment, c1 is the current optimal learning factor, c2 is the global optimal learning factor, and r1 and r2 are random factors with a range of (0, 1).The PSO uses linearly decreasing inertia weight coefficient, which can be described as follows:(10)ω=ωmax−ωmax−ωmin⋅TTmax,where ωmax is the maximum inertia weight coefficient, ωmin is the minimum inertia weight coefficient, T is the current iteration, and Tmax is the maximum iterations.In the optimization process of the PSO, with the continuous evolution of the particle swarm, the vitality of the particles continues to decline, which makes the particle speed continue to decrease, and it is easy to fall into the local optimal problem. In order to avoid the PSO falling into the local optimal problem, the vitality factor is introduced into the speed update function, which strengthens the diversity of particle optimization and expands the particle search range. The vitality factor is the particle information with the most obvious change between the global optimal solution at the current moment and the global optimal solution at the previous moment.The improved PSO speed update function can be described as follows:(11)vt′=ω′⋅vt−1′+c1⋅r1⋅pt−1−xt−1′+c2⋅r2⋅gt−1−xt−1′+c3⋅r3⋅kt−1−xt−1′,where vt′ represents the particle velocity at the current moment, vt−1′ represents the particle velocity at the previous moment, c3 represents the vitality factor, r3 is the random factor with a range of (0, 1), and kt−1 is the particle changes, which is the most obvious change at the previous moment.The improved PSO position update function can be described as follows :(12)xt′=xt−1′+vt′,where xt′ is the particle position at the current moment and xt−1′ is the particle position at the previous moment.The inertia weight coefficient is the core parameter to balance the global search and local search capabilities of PSO. The adaptive strategy can automatically adjust the size of the inertia weight coefficient, so that all particles in the particle swarm can continuously find the optimal solution according to certain rules and optimize the performance of the PSO. The adaptive inertia weight coefficient can be described as follows:(13)ω′=ωmax−ωmax−ωmin⋅fiT−fwfb−fw,where fiT is the particle fitness at the T-th iteration, and fb and fw are the optimal and the worst value of the particle fitness at the T-th iteration, respectively.By introducing the vitality factor and the adaptive inertia weight coefficient, the speed and position update functions of the PSO can be effectively improved, and then, the population update can be realized. In addition, the improved PSO does not just output an optimal route, but outputs the final route of all particles.The parameters in the improved PSO strategy are shown in Table1.Table 1
Improved PSO strategy parameters.
VariablesDescriptionvt′Particle velocity at the current momentxt′Particle position at the current momentω′Adaptive inertia weight coefficientωmaxMaximum inertia weight coefficientωminMinimum inertia weight coefficientfiTParticle fitness at theT-th iterationpt−1Particle individual optimal at the previous momentkt−1Particle changes most obviously at the previous momentfwWorst value of particle fitness at theT-th iterationmpNumber of particlesc1Current optimal learning factorc2Global optimal learning factorc3Vitality factorTCurrent iterationTmaxMaximum iterationsr1r2r3Random factorsgt−1Particle swarm global optimal at the previous momentfbOptimal value of particle fitness at theT-th iteration


### 4.2. PSO-ACO Fusion Strategy

The pheromone accumulation of ACO is a positive feedback process, so the route formed by the ant colony in the early stage will directly affect the effective decision-making in the later stage. The optimal pheromones accumulation in the early stage of ACO is slow, which greatly affects the efficiency of energy dispatching. In order to effectively and accurately complete the initial optimal pheromone accumulation, this paper proposes a PSO-ACO fusion strategy, its specific process is as follows: First, we use the PSO to complete the route planning and generate some optimized routes. Second, we convert this part of the initial optimized routes into the enhanced pheromone of the ACO. Then, we obtain the initial pheromone of the ACO according to the environmental information. Finally, we combine the initial pheromone of the ACO with the enhanced pheromone of the ACO to obtain the initial pheromone of the improved PSO-ACO. It can  be described as follows:(14)τij′=τijACO+∆τijPSO,where τij′ is the initial pheromone of the improved PSO-ACO, τijACO is the initial pheromone of the ACO, and ∆τijPSO is the ACO enhanced pheromone converted from PSO.Through the PSO-ACO fusion strategy, the effective fusion of PSO and ACO is realized, so that the ant colony can complete the initial pheromone accumulation faster. Meanwhile, the ACO is optimized on the basis of the PSO route, which can effectively avoid the blind search problem of the ACO and improve the algorithm convergence speed and search ability.


### 4.3. Improved ACO Strategy

#### 4.3.1. Improved State Transition Probability

The state transition probability of the traditional ACO adopts the roulette wheel method, and the search efficiency of the route is poor, which can be described as follows:(15)Pijt=τijtα⋅ηijtβ∑j∈Jiτijtα⋅ηijtβ,j∈Ji,0,otherwise,where τijt is the pheromone concentration from site i to site j at time t, α is the heuristic factor, β is the expectation heuristic factor, Ji is the set of optional subsequent sites for ant at the site i, and ηijt is the heuristic function of the route from site i to site j at time t, which can be described as follows:(16)ηijt=1dij,where dij is the distance from site i to site j.In order to increase the diversity of route search and improve the efficiency of route search, this paper introduces the angle guidance function based on the state transition probability of ACO. The improved state transition probability can be described as follows:(17)μijt=yj−ygdjg(18)Pijt=τij′tαηij′tβμijtγ(19)Pij′t=Pijt∑j∈JiPijt,j∈Ji,0,otherwise,where τij′t is the optimized pheromone concentration from site i to site j at time t, ηij′t is the optimized heuristic function of the route from site i to site j at time t, μijt is the angle guidance function of the route from site i to site j at time t, γ is the angle guidance factor, yj is the ordinate of the site j, yg is the ordinate of the nearest target site, and djg is the distance from the next feasible site to the nearest target site.Meanwhile, in order to improve the precision of route goal search, the heuristic function is optimized, and the distance from the next feasible node to the nearest target node is introduced based on the traditional heuristic function. The optimized heuristic function can be described as follows:(20)ηij′t=1λ⋅dij+μ⋅djg2,where λ and μ are the corresponding weight coefficients of dij and djg, respectively.


#### 4.3.2. Improved Pheromone Update Rules

The pheromone update of traditional ACO includes a local pheromone update and global pheromone update. Ants will update the local pheromone concentration fromi-th node to j-th node, and the global pheromone concentration will be updated when the ant colony completes one iteration. The local pheromone and global pheromone update rules can be described as follows:(21)τijt=1−δτijt+δτ0,δ∈0,1,(22)τijt+1=1−ρτijt+∆τijt,where τijt is the pheromone value of the route from the i-th node to the j-th node at time t, δ is the local pheromone volatilization rate, τ0 is a small constant, and ρ is the global pheromone volatilization rate.Aiming at the problem that the global optimal pheromone cannot be found in time in the global pheromone update of the ACO, we introduce the pheromones of leader ant and follower ants and propose a high-quality ant colony pheromone update rule. Its update principle is to use the leader ant’s guiding ability to lead the all follower ants to move towards each target point and to avoid blind update of global pheromones by updating only the pheromones of the route to each target point. Our high-quality pheromone update rule can make the search range of the ant colony more concentrated on the optimal route direction in the neighborhood and can effectively improve the convergence speed and search quality of the algorithm, and finally achieve global optimization. The high-quality pheromone update rules can be described as follows:(23)τij′t+1=1−ρ′τij′t+∆τij′t,(24)∆τij′t=∑L=1mL∆τijLt,(25)ρ′=ξdsgJb,where ρ′ is the adaptive pheromone volatilization rate, Jb is the optimal route multiobjective value, ξ is the adjustment coefficient, the value is less than 1, and dsg is the distance from the start site to the target site.In the early stage of the algorithm, sinceJb is large and ρ′ is small, the pheromone concentration difference of each route is small, this weakens the guidance function of the leader ant and improves the global search scope and calculation accuracy of the ant. As Jb gets smaller and smaller, ρ′ increases rapidly, and the pheromone concentration difference of each route increases; this enhances the guiding ability of the leader ant, improves the search speed of the ant colony, and enables the algorithm to converge quickly. The optimized pheromone increment expression is as follows:(26)∆τijLt=QWL+QWF,j∈Ji,0,others,WL=aAL+bBL,WF=∑F=1mFALF+BLF,where L represents the leader ant, F represents the follower ants, and WL is the route comprehensive index taken by leader ant, pheromones are allocated according to the comprehensive index, the smaller the comprehensive index, the better the route. WF is the route comprehensive index taken by follower ants, Q is pheromone intensity, AL is the route length of leader ant, BL is route turns number for leader ant, a and b are the adjustment factors of route length, which can be taken according to the route demand, ALF is the route length of follower ants in this iteration, BLF is route turns number for follower ants in this iteration, and mF is the number of follower ants. The total length and turns of the route can be described as follows:(27)AL=∑i=1n−1xi+1−xi2+yi+1−yi2,(28)BL=turns,…,i,j,…,g,where turn represents the turning between sites.The parameters in the improved ACO strategy are shown in Table2.Table 2
Improved ACO strategy parameters.
VariablesDescriptionαHeuristic factorβExpectation heuristic factorγAngle guidance factorλWeight coefficients ofdijρ′Adaptive pheromone volatilization rateξAdjustment coefficientabAdjustment factors of route lengthmaNumber of antsFmaxMaximum iterationsτijACOInitial pheromone of the ACO∆τijPSOACO enhanced pheromone converted from PSOηij′tOptimized heuristic function of the route from sitei to site j at time tμij′tAngle guidance function of the route from sitei to site j at time tdijDistance from sitei to site jdjgDistance from sitej to site gdsgDistance from sites to site gμWeight coefficients ofdjgALRoute length of leader antALFRoute length of follower antsBLRoute turns number for leader antBLFRoute turns number for follower antsQPheromone intensityJbOptimal route multiobjective valueτij′tOptimized pheromone concentration from sitei to site j at time tWLRoute comprehensive index taken by leader antWFRoute comprehensive index taken by follower ants


### 4.4. Improved PSO-ACO Algorithm Flow

The main process of the improved PSO-ACO are as follows:Step 1. Determine the location of each site and calculate the distance between any two sitesStep 2. Initialize the parameters of PSOStep 3. Meet the three basic constraints of site dispatchingStep 4. Update the particle individual optimal and the global optimal solutionStep 5 Update the vitality factorStep 6. Update particle speed and positionStep 7. According to the three constraints of minimum route length, maximum security, and minimum energy consumption, find some routes that satisfies any one of the constraintsStep 8. Determine whether the maximum iteration of the particle swarm is reached. If it is, execute Step 9, otherwise, repeat Steps 4–7Step 9. Output the optimized routes generated by the improved PSOStep 10. Initialize the parameters of the ACO and obtain the initial pheromone of the ant colonyStep 11. Convert the optimized routes of PSO into ant colony enhancement pheromoneStep 12. Obtain the initial pheromone of the improved PSO-ACO. By fusing the initial pheromone and the enhancement pheromone of the ant colonyStep 13. Move ants using the improved state transition probabilityStep 14. Modify pheromone concentration using the improved pheromone update rulesStep 15. Meet the three main constraints and find the optimal routeStep 16. Determine whether the maximum iteration of the ant colony is reached. If it is, execute step 17, otherwise, repeat steps 12–15Step 17. Output the optimal route of the improved PSO-ACO.The algorithm flowchart of the improved PSO-ACO algorithm is shown in Figure1.Figure 1
Improved PSO-ACO algorithm flowchart.


### 4.5. Constraint Handling Methods and Computational Complexity

#### 4.5.1. Constraint Handling Methods

There are three basic constraints and three main constraints for energy dispatching between different sites, we should strictly follow these three basic constraints and meet three main constraints when executing the algorithm.We set three basic constraints as the premise and basic criterion for the algorithm to find the site route. If the algorithm conflicts with the three basic constraints in the process of finding routes in the early stage, it means that the routes found are not met with the constraints, and they are discarded directly.We set three main constraints as the objective function for the algorithm to find the optimal route. In the improved PSO part, the routes found by particles with fewer violations of the main constraints are called good routes. In the improved ACO part, the route found by ants that do not violate the three main constraints is the final optimal route.In the process of algorithm execution, first, based on the three basic constraints, we find feasible routes that meet them. Second, based on the three main constraints, we find some good routes that meet any one or more constraints. Finally, on this basis, the optimal route that fully meets the three main constraints is found.


#### 4.5.2. Computational Complexity

Computational complexity is the resources occupied by the algorithm operation, mainly including time complexity and space complexity. Time complexity is how much time the algorithm takes during operation, space complexity is the size of the memory occupied by the algorithm during operation, and they are usually approximated by largeO values.We set the site number of the energy dispatching problem asn, the improved PSO-ACO algorithm mainly includes improved PSO, PSO-ACO fusion, and improved ACO. Then, the time complexity of the proposed method is the combination of the improved PSO and ACO time, which can be described as follows:(29)Tn=OTmax∗mp∗n+ONmax∗ma∗n,where OTmax∗mp∗n represents the time complexity of the improved PSO, that is, the time complexity of all particles traversing n sites under its total number of iterations. ONmax∗ma∗n represents the time complexity of the improved ACO, that is, the time complexity of all ants traversing n sites under its total number of iterations.The space complexity of the proposed method is the memory occupied by the data stored by the algorithm and the data generated during the operation of the algorithm, which can be described as follows:(30)Sn=On2+Omp∗n+Oma∗n+On,where On2 represents the space complexity of storing the distance between any two sites, Omp∗n represents the space complexity of storing and recording the PSO route generation, Oma∗n represents the space complexity of storing and recording the ACO route generation, and On represents the space complexity of storing the final optimal solution.


## 4.1. Improved PSO Strategy

The core of PSO is to update the population using the speed and position update functions. The PSO speed update function can be described as follows:(9)vt=ω⋅vt−1+c1⋅r1⋅pt−1−xt−1+c2⋅r2⋅gt−1−xt−1,where ω is the inertia weight coefficient, pt−1 is the particle individual optimal at the previous moment, gt−1 is the particle swarm global optimal at the previous moment, c1 is the current optimal learning factor, c2 is the global optimal learning factor, and r1 and r2 are random factors with a range of (0, 1).The PSO uses linearly decreasing inertia weight coefficient, which can be described as follows:(10)ω=ωmax−ωmax−ωmin⋅TTmax,where ωmax is the maximum inertia weight coefficient, ωmin is the minimum inertia weight coefficient, T is the current iteration, and Tmax is the maximum iterations.In the optimization process of the PSO, with the continuous evolution of the particle swarm, the vitality of the particles continues to decline, which makes the particle speed continue to decrease, and it is easy to fall into the local optimal problem. In order to avoid the PSO falling into the local optimal problem, the vitality factor is introduced into the speed update function, which strengthens the diversity of particle optimization and expands the particle search range. The vitality factor is the particle information with the most obvious change between the global optimal solution at the current moment and the global optimal solution at the previous moment.The improved PSO speed update function can be described as follows:(11)vt′=ω′⋅vt−1′+c1⋅r1⋅pt−1−xt−1′+c2⋅r2⋅gt−1−xt−1′+c3⋅r3⋅kt−1−xt−1′,where vt′ represents the particle velocity at the current moment, vt−1′ represents the particle velocity at the previous moment, c3 represents the vitality factor, r3 is the random factor with a range of (0, 1), and kt−1 is the particle changes, which is the most obvious change at the previous moment.The improved PSO position update function can be described as follows :(12)xt′=xt−1′+vt′,where xt′ is the particle position at the current moment and xt−1′ is the particle position at the previous moment.The inertia weight coefficient is the core parameter to balance the global search and local search capabilities of PSO. The adaptive strategy can automatically adjust the size of the inertia weight coefficient, so that all particles in the particle swarm can continuously find the optimal solution according to certain rules and optimize the performance of the PSO. The adaptive inertia weight coefficient can be described as follows:(13)ω′=ωmax−ωmax−ωmin⋅fiT−fwfb−fw,where fiT is the particle fitness at the T-th iteration, and fb and fw are the optimal and the worst value of the particle fitness at the T-th iteration, respectively.By introducing the vitality factor and the adaptive inertia weight coefficient, the speed and position update functions of the PSO can be effectively improved, and then, the population update can be realized. In addition, the improved PSO does not just output an optimal route, but outputs the final route of all particles.The parameters in the improved PSO strategy are shown in Table1.Table 1
Improved PSO strategy parameters.
VariablesDescriptionvt′Particle velocity at the current momentxt′Particle position at the current momentω′Adaptive inertia weight coefficientωmaxMaximum inertia weight coefficientωminMinimum inertia weight coefficientfiTParticle fitness at theT-th iterationpt−1Particle individual optimal at the previous momentkt−1Particle changes most obviously at the previous momentfwWorst value of particle fitness at theT-th iterationmpNumber of particlesc1Current optimal learning factorc2Global optimal learning factorc3Vitality factorTCurrent iterationTmaxMaximum iterationsr1r2r3Random factorsgt−1Particle swarm global optimal at the previous momentfbOptimal value of particle fitness at theT-th iteration


## 4.2. PSO-ACO Fusion Strategy

The pheromone accumulation of ACO is a positive feedback process, so the route formed by the ant colony in the early stage will directly affect the effective decision-making in the later stage. The optimal pheromones accumulation in the early stage of ACO is slow, which greatly affects the efficiency of energy dispatching. In order to effectively and accurately complete the initial optimal pheromone accumulation, this paper proposes a PSO-ACO fusion strategy, its specific process is as follows: First, we use the PSO to complete the route planning and generate some optimized routes. Second, we convert this part of the initial optimized routes into the enhanced pheromone of the ACO. Then, we obtain the initial pheromone of the ACO according to the environmental information. Finally, we combine the initial pheromone of the ACO with the enhanced pheromone of the ACO to obtain the initial pheromone of the improved PSO-ACO. It can  be described as follows:(14)τij′=τijACO+∆τijPSO,where τij′ is the initial pheromone of the improved PSO-ACO, τijACO is the initial pheromone of the ACO, and ∆τijPSO is the ACO enhanced pheromone converted from PSO.Through the PSO-ACO fusion strategy, the effective fusion of PSO and ACO is realized, so that the ant colony can complete the initial pheromone accumulation faster. Meanwhile, the ACO is optimized on the basis of the PSO route, which can effectively avoid the blind search problem of the ACO and improve the algorithm convergence speed and search ability.


## 4.3. Improved ACO Strategy

### 4.3.1. Improved State Transition Probability

The state transition probability of the traditional ACO adopts the roulette wheel method, and the search efficiency of the route is poor, which can be described as follows:(15)Pijt=τijtα⋅ηijtβ∑j∈Jiτijtα⋅ηijtβ,j∈Ji,0,otherwise,where τijt is the pheromone concentration from site i to site j at time t, α is the heuristic factor, β is the expectation heuristic factor, Ji is the set of optional subsequent sites for ant at the site i, and ηijt is the heuristic function of the route from site i to site j at time t, which can be described as follows:(16)ηijt=1dij,where dij is the distance from site i to site j.In order to increase the diversity of route search and improve the efficiency of route search, this paper introduces the angle guidance function based on the state transition probability of ACO. The improved state transition probability can be described as follows:(17)μijt=yj−ygdjg(18)Pijt=τij′tαηij′tβμijtγ(19)Pij′t=Pijt∑j∈JiPijt,j∈Ji,0,otherwise,where τij′t is the optimized pheromone concentration from site i to site j at time t, ηij′t is the optimized heuristic function of the route from site i to site j at time t, μijt is the angle guidance function of the route from site i to site j at time t, γ is the angle guidance factor, yj is the ordinate of the site j, yg is the ordinate of the nearest target site, and djg is the distance from the next feasible site to the nearest target site.Meanwhile, in order to improve the precision of route goal search, the heuristic function is optimized, and the distance from the next feasible node to the nearest target node is introduced based on the traditional heuristic function. The optimized heuristic function can be described as follows:(20)ηij′t=1λ⋅dij+μ⋅djg2,where λ and μ are the corresponding weight coefficients of dij and djg, respectively.


### 4.3.2. Improved Pheromone Update Rules

The pheromone update of traditional ACO includes a local pheromone update and global pheromone update. Ants will update the local pheromone concentration fromi-th node to j-th node, and the global pheromone concentration will be updated when the ant colony completes one iteration. The local pheromone and global pheromone update rules can be described as follows:(21)τijt=1−δτijt+δτ0,δ∈0,1,(22)τijt+1=1−ρτijt+∆τijt,where τijt is the pheromone value of the route from the i-th node to the j-th node at time t, δ is the local pheromone volatilization rate, τ0 is a small constant, and ρ is the global pheromone volatilization rate.Aiming at the problem that the global optimal pheromone cannot be found in time in the global pheromone update of the ACO, we introduce the pheromones of leader ant and follower ants and propose a high-quality ant colony pheromone update rule. Its update principle is to use the leader ant’s guiding ability to lead the all follower ants to move towards each target point and to avoid blind update of global pheromones by updating only the pheromones of the route to each target point. Our high-quality pheromone update rule can make the search range of the ant colony more concentrated on the optimal route direction in the neighborhood and can effectively improve the convergence speed and search quality of the algorithm, and finally achieve global optimization. The high-quality pheromone update rules can be described as follows:(23)τij′t+1=1−ρ′τij′t+∆τij′t,(24)∆τij′t=∑L=1mL∆τijLt,(25)ρ′=ξdsgJb,where ρ′ is the adaptive pheromone volatilization rate, Jb is the optimal route multiobjective value, ξ is the adjustment coefficient, the value is less than 1, and dsg is the distance from the start site to the target site.In the early stage of the algorithm, sinceJb is large and ρ′ is small, the pheromone concentration difference of each route is small, this weakens the guidance function of the leader ant and improves the global search scope and calculation accuracy of the ant. As Jb gets smaller and smaller, ρ′ increases rapidly, and the pheromone concentration difference of each route increases; this enhances the guiding ability of the leader ant, improves the search speed of the ant colony, and enables the algorithm to converge quickly. The optimized pheromone increment expression is as follows:(26)∆τijLt=QWL+QWF,j∈Ji,0,others,WL=aAL+bBL,WF=∑F=1mFALF+BLF,where L represents the leader ant, F represents the follower ants, and WL is the route comprehensive index taken by leader ant, pheromones are allocated according to the comprehensive index, the smaller the comprehensive index, the better the route. WF is the route comprehensive index taken by follower ants, Q is pheromone intensity, AL is the route length of leader ant, BL is route turns number for leader ant, a and b are the adjustment factors of route length, which can be taken according to the route demand, ALF is the route length of follower ants in this iteration, BLF is route turns number for follower ants in this iteration, and mF is the number of follower ants. The total length and turns of the route can be described as follows:(27)AL=∑i=1n−1xi+1−xi2+yi+1−yi2,(28)BL=turns,…,i,j,…,g,where turn represents the turning between sites.The parameters in the improved ACO strategy are shown in Table2.Table 2
Improved ACO strategy parameters.
VariablesDescriptionαHeuristic factorβExpectation heuristic factorγAngle guidance factorλWeight coefficients ofdijρ′Adaptive pheromone volatilization rateξAdjustment coefficientabAdjustment factors of route lengthmaNumber of antsFmaxMaximum iterationsτijACOInitial pheromone of the ACO∆τijPSOACO enhanced pheromone converted from PSOηij′tOptimized heuristic function of the route from sitei to site j at time tμij′tAngle guidance function of the route from sitei to site j at time tdijDistance from sitei to site jdjgDistance from sitej to site gdsgDistance from sites to site gμWeight coefficients ofdjgALRoute length of leader antALFRoute length of follower antsBLRoute turns number for leader antBLFRoute turns number for follower antsQPheromone intensityJbOptimal route multiobjective valueτij′tOptimized pheromone concentration from sitei to site j at time tWLRoute comprehensive index taken by leader antWFRoute comprehensive index taken by follower ants


## 4.3.1. Improved State Transition Probability

The state transition probability of the traditional ACO adopts the roulette wheel method, and the search efficiency of the route is poor, which can be described as follows:(15)Pijt=τijtα⋅ηijtβ∑j∈Jiτijtα⋅ηijtβ,j∈Ji,0,otherwise,where τijt is the pheromone concentration from site i to site j at time t, α is the heuristic factor, β is the expectation heuristic factor, Ji is the set of optional subsequent sites for ant at the site i, and ηijt is the heuristic function of the route from site i to site j at time t, which can be described as follows:(16)ηijt=1dij,where dij is the distance from site i to site j.In order to increase the diversity of route search and improve the efficiency of route search, this paper introduces the angle guidance function based on the state transition probability of ACO. The improved state transition probability can be described as follows:(17)μijt=yj−ygdjg(18)Pijt=τij′tαηij′tβμijtγ(19)Pij′t=Pijt∑j∈JiPijt,j∈Ji,0,otherwise,where τij′t is the optimized pheromone concentration from site i to site j at time t, ηij′t is the optimized heuristic function of the route from site i to site j at time t, μijt is the angle guidance function of the route from site i to site j at time t, γ is the angle guidance factor, yj is the ordinate of the site j, yg is the ordinate of the nearest target site, and djg is the distance from the next feasible site to the nearest target site.Meanwhile, in order to improve the precision of route goal search, the heuristic function is optimized, and the distance from the next feasible node to the nearest target node is introduced based on the traditional heuristic function. The optimized heuristic function can be described as follows:(20)ηij′t=1λ⋅dij+μ⋅djg2,where λ and μ are the corresponding weight coefficients of dij and djg, respectively.


## 4.3.2. Improved Pheromone Update Rules

The pheromone update of traditional ACO includes a local pheromone update and global pheromone update. Ants will update the local pheromone concentration fromi-th node to j-th node, and the global pheromone concentration will be updated when the ant colony completes one iteration. The local pheromone and global pheromone update rules can be described as follows:(21)τijt=1−δτijt+δτ0,δ∈0,1,(22)τijt+1=1−ρτijt+∆τijt,where τijt is the pheromone value of the route from the i-th node to the j-th node at time t, δ is the local pheromone volatilization rate, τ0 is a small constant, and ρ is the global pheromone volatilization rate.Aiming at the problem that the global optimal pheromone cannot be found in time in the global pheromone update of the ACO, we introduce the pheromones of leader ant and follower ants and propose a high-quality ant colony pheromone update rule. Its update principle is to use the leader ant’s guiding ability to lead the all follower ants to move towards each target point and to avoid blind update of global pheromones by updating only the pheromones of the route to each target point. Our high-quality pheromone update rule can make the search range of the ant colony more concentrated on the optimal route direction in the neighborhood and can effectively improve the convergence speed and search quality of the algorithm, and finally achieve global optimization. The high-quality pheromone update rules can be described as follows:(23)τij′t+1=1−ρ′τij′t+∆τij′t,(24)∆τij′t=∑L=1mL∆τijLt,(25)ρ′=ξdsgJb,where ρ′ is the adaptive pheromone volatilization rate, Jb is the optimal route multiobjective value, ξ is the adjustment coefficient, the value is less than 1, and dsg is the distance from the start site to the target site.In the early stage of the algorithm, sinceJb is large and ρ′ is small, the pheromone concentration difference of each route is small, this weakens the guidance function of the leader ant and improves the global search scope and calculation accuracy of the ant. As Jb gets smaller and smaller, ρ′ increases rapidly, and the pheromone concentration difference of each route increases; this enhances the guiding ability of the leader ant, improves the search speed of the ant colony, and enables the algorithm to converge quickly. The optimized pheromone increment expression is as follows:(26)∆τijLt=QWL+QWF,j∈Ji,0,others,WL=aAL+bBL,WF=∑F=1mFALF+BLF,where L represents the leader ant, F represents the follower ants, and WL is the route comprehensive index taken by leader ant, pheromones are allocated according to the comprehensive index, the smaller the comprehensive index, the better the route. WF is the route comprehensive index taken by follower ants, Q is pheromone intensity, AL is the route length of leader ant, BL is route turns number for leader ant, a and b are the adjustment factors of route length, which can be taken according to the route demand, ALF is the route length of follower ants in this iteration, BLF is route turns number for follower ants in this iteration, and mF is the number of follower ants. The total length and turns of the route can be described as follows:(27)AL=∑i=1n−1xi+1−xi2+yi+1−yi2,(28)BL=turns,…,i,j,…,g,where turn represents the turning between sites.The parameters in the improved ACO strategy are shown in Table2.Table 2
Improved ACO strategy parameters.
VariablesDescriptionαHeuristic factorβExpectation heuristic factorγAngle guidance factorλWeight coefficients ofdijρ′Adaptive pheromone volatilization rateξAdjustment coefficientabAdjustment factors of route lengthmaNumber of antsFmaxMaximum iterationsτijACOInitial pheromone of the ACO∆τijPSOACO enhanced pheromone converted from PSOηij′tOptimized heuristic function of the route from sitei to site j at time tμij′tAngle guidance function of the route from sitei to site j at time tdijDistance from sitei to site jdjgDistance from sitej to site gdsgDistance from sites to site gμWeight coefficients ofdjgALRoute length of leader antALFRoute length of follower antsBLRoute turns number for leader antBLFRoute turns number for follower antsQPheromone intensityJbOptimal route multiobjective valueτij′tOptimized pheromone concentration from sitei to site j at time tWLRoute comprehensive index taken by leader antWFRoute comprehensive index taken by follower ants


## 4.4. Improved PSO-ACO Algorithm Flow

The main process of the improved PSO-ACO are as follows:Step 1. Determine the location of each site and calculate the distance between any two sitesStep 2. Initialize the parameters of PSOStep 3. Meet the three basic constraints of site dispatchingStep 4. Update the particle individual optimal and the global optimal solutionStep 5 Update the vitality factorStep 6. Update particle speed and positionStep 7. According to the three constraints of minimum route length, maximum security, and minimum energy consumption, find some routes that satisfies any one of the constraintsStep 8. Determine whether the maximum iteration of the particle swarm is reached. If it is, execute Step 9, otherwise, repeat Steps 4–7Step 9. Output the optimized routes generated by the improved PSOStep 10. Initialize the parameters of the ACO and obtain the initial pheromone of the ant colonyStep 11. Convert the optimized routes of PSO into ant colony enhancement pheromoneStep 12. Obtain the initial pheromone of the improved PSO-ACO. By fusing the initial pheromone and the enhancement pheromone of the ant colonyStep 13. Move ants using the improved state transition probabilityStep 14. Modify pheromone concentration using the improved pheromone update rulesStep 15. Meet the three main constraints and find the optimal routeStep 16. Determine whether the maximum iteration of the ant colony is reached. If it is, execute step 17, otherwise, repeat steps 12–15Step 17. Output the optimal route of the improved PSO-ACO.The algorithm flowchart of the improved PSO-ACO algorithm is shown in Figure1.Figure 1
Improved PSO-ACO algorithm flowchart.


## 4.5. Constraint Handling Methods and Computational Complexity

### 4.5.1. Constraint Handling Methods

There are three basic constraints and three main constraints for energy dispatching between different sites, we should strictly follow these three basic constraints and meet three main constraints when executing the algorithm.We set three basic constraints as the premise and basic criterion for the algorithm to find the site route. If the algorithm conflicts with the three basic constraints in the process of finding routes in the early stage, it means that the routes found are not met with the constraints, and they are discarded directly.We set three main constraints as the objective function for the algorithm to find the optimal route. In the improved PSO part, the routes found by particles with fewer violations of the main constraints are called good routes. In the improved ACO part, the route found by ants that do not violate the three main constraints is the final optimal route.In the process of algorithm execution, first, based on the three basic constraints, we find feasible routes that meet them. Second, based on the three main constraints, we find some good routes that meet any one or more constraints. Finally, on this basis, the optimal route that fully meets the three main constraints is found.


### 4.5.2. Computational Complexity

Computational complexity is the resources occupied by the algorithm operation, mainly including time complexity and space complexity. Time complexity is how much time the algorithm takes during operation, space complexity is the size of the memory occupied by the algorithm during operation, and they are usually approximated by largeO values.We set the site number of the energy dispatching problem asn, the improved PSO-ACO algorithm mainly includes improved PSO, PSO-ACO fusion, and improved ACO. Then, the time complexity of the proposed method is the combination of the improved PSO and ACO time, which can be described as follows:(29)Tn=OTmax∗mp∗n+ONmax∗ma∗n,where OTmax∗mp∗n represents the time complexity of the improved PSO, that is, the time complexity of all particles traversing n sites under its total number of iterations. ONmax∗ma∗n represents the time complexity of the improved ACO, that is, the time complexity of all ants traversing n sites under its total number of iterations.The space complexity of the proposed method is the memory occupied by the data stored by the algorithm and the data generated during the operation of the algorithm, which can be described as follows:(30)Sn=On2+Omp∗n+Oma∗n+On,where On2 represents the space complexity of storing the distance between any two sites, Omp∗n represents the space complexity of storing and recording the PSO route generation, Oma∗n represents the space complexity of storing and recording the ACO route generation, and On represents the space complexity of storing the final optimal solution.


## 4.5.1. Constraint Handling Methods

There are three basic constraints and three main constraints for energy dispatching between different sites, we should strictly follow these three basic constraints and meet three main constraints when executing the algorithm.We set three basic constraints as the premise and basic criterion for the algorithm to find the site route. If the algorithm conflicts with the three basic constraints in the process of finding routes in the early stage, it means that the routes found are not met with the constraints, and they are discarded directly.We set three main constraints as the objective function for the algorithm to find the optimal route. In the improved PSO part, the routes found by particles with fewer violations of the main constraints are called good routes. In the improved ACO part, the route found by ants that do not violate the three main constraints is the final optimal route.In the process of algorithm execution, first, based on the three basic constraints, we find feasible routes that meet them. Second, based on the three main constraints, we find some good routes that meet any one or more constraints. Finally, on this basis, the optimal route that fully meets the three main constraints is found.


## 4.5.2. Computational Complexity

Computational complexity is the resources occupied by the algorithm operation, mainly including time complexity and space complexity. Time complexity is how much time the algorithm takes during operation, space complexity is the size of the memory occupied by the algorithm during operation, and they are usually approximated by largeO values.We set the site number of the energy dispatching problem asn, the improved PSO-ACO algorithm mainly includes improved PSO, PSO-ACO fusion, and improved ACO. Then, the time complexity of the proposed method is the combination of the improved PSO and ACO time, which can be described as follows:(29)Tn=OTmax∗mp∗n+ONmax∗ma∗n,where OTmax∗mp∗n represents the time complexity of the improved PSO, that is, the time complexity of all particles traversing n sites under its total number of iterations. ONmax∗ma∗n represents the time complexity of the improved ACO, that is, the time complexity of all ants traversing n sites under its total number of iterations.The space complexity of the proposed method is the memory occupied by the data stored by the algorithm and the data generated during the operation of the algorithm, which can be described as follows:(30)Sn=On2+Omp∗n+Oma∗n+On,where On2 represents the space complexity of storing the distance between any two sites, Omp∗n represents the space complexity of storing and recording the PSO route generation, Oma∗n represents the space complexity of storing and recording the ACO route generation, and On represents the space complexity of storing the final optimal solution.


## 5. Experimental Results and Analysis

### 5.1. Experimental Platform and Algorithm Parameter Setting

#### 5.1.1. Experimental Platform

In order to verify the feasibility and effectiveness of the improved PSO-ACO algorithm proposed in this paper in energy scheduling, simulation experiments were conducted on the improved PSO-ACO algorithm, ACO algorithm, MMAS algorithm, PSO algorithm, and PSO update algorithm, respectively. The simulation environment is 20 cm × 20 cm, there are 10 sites for energy dispatching. Different locations are set for the 10 sites, which can form different experimental scenarios. The simulation experiment is based on the HP Pavilion personal computer (Intel (R) Core (TM) I7-9700F CPU, 3.0 GHz, 8 GB memory; NVIDIA Geforce GTX 1080 GPU).


#### 5.1.2. Improved PSO-ACO Parameter

In the improved PSO-ACO algorithm proposed in this paper, the parameters are set as follows: the number of particlesmp is 80, maximum PSO iterations Tmax is 2000, current optimal learning factor c1 is 1.5, global optimal learning factor c2 is 1.5, vitality factor c3 is 2, maximum inertia weight coefficient ωmax is 0.9, minimum inertia weight coefficient ωmin is 0.3, number of ants ma is 20, maximum ACO Iterations Fmax is 2000, heuristic factor α is 1, expectation heuristic factor β is 7, angle guidance factor γ is 8, weight coefficient λ is 1, and the other weight coefficient μ is 3.


#### 5.1.3. Comparison Algorithm Parameter

The four comparison algorithms are as follows:ACO [42], a solution space search method suitable for finding optimal routes on graphsMMAS [43], a search method that sets the maximum and minimum pheromone intervals and adopts elite rulesPSO [44], a solution search method based on information sharing among groups and evolving from disorder to orderPSO update [45], a PSO optimization method for constantly updating particle position and velocityIn the experiment, different parameters of the algorithm may lead to different experimental results, and the same basic parameters of the algorithm can ensure the fairness of the algorithm comparison. In principle, the four comparison algorithms and the improved PSO-ACO algorithm should be set with the same parameters as much as possible.According to the parameters of the improved PSO-ACO algorithm, we set the parameters of ACO and MMAS as follows: the number of ants is set to 20, the maximum iterations number is set to 2000, the heuristic factor is set to 1, the expectation heuristic factor is set to 7, and the pheromone volatilization rate is set to 0.3. In addition, the lower limit of pheromone concentration of MMAS is set to 0.1, and the upper limit of pheromone concentration is 1000.We set the parameters of PSO and PSO update as follows: The number of particles is set to 80, the maximum iterations number is set to 2000, the inertia weight coefficient is set to 0.8, the current optimal learning factor is 1.5, and the global optimal learning factor is 1.5.For the rest of the parameters in the comparison algorithms, we adopt the default settings suggested in the corresponding literature.


### 5.2. Simulation Experiment

#### 5.2.1. Experimental Scenario 1

On the premise of setting 10 sites at different locations, multiple sets of simulation experiments were carried out for the 5 algorithms, respectively. In scenario 1, the energy dispatching routes of five algorithms are shown in Figure2.Figure 2
Energy dispatching routes of five algorithms in scenario 1. (a) Improved PSO-ACO algorithm energy dispatching route; (b) MMAS algorithm energy dispatching route; (c) ACO algorithm energy dispatching route; (d) PSO update algorithm energy dispatching route; (e) PSO algorithm energy dispatching route.
(a)(b)(c)(d)(e)In Figure2, the energy dispatching route length of the improved PSO-ACO algorithm is 58.05 cm, and the coincidence point is 0. The energy dispatching route length of the MMAS algorithm is 66.57 cm, and the coincidence point is 1. The energy dispatching route length of the ACO algorithm is 71.28 cm, and the coincidence point is 2. The energy dispatching route length of the PSO update algorithm is 73.01 cm, and the coincidence point is 1. The energy dispatching route length of the PSO algorithm is 97.63 cm, and the coincidence point is 2.Because pheromone is unique to ACO algorithm, pheromone can only exist in ACO algorithm and its optimization algorithm, so there is no pheromone in both PSO algorithm and PSO update algorithm. Based on this, only the improved PSO-ACO algorithm, MMAS algorithm, and ACO algorithm have pheromone in the above five algorithms. The pheromone situation of the three algorithms is shown in Figure3.Figure 3
Pheromones of three algorithms in scenario 1. (a) Improved PSO-ACO algorithm pheromone; (b) MMAS algorithm pheromone; (c) ACO algorithm pheromone.
(a)(b)(c)In Figure3, the pheromone of the improved PSO-ACO algorithm is concise and clear, while the pheromone of the MMAS algorithm and the ACO algorithm is more complex.


#### 5.2.2. Experimental Scenario 2

In scenario 2, the energy dispatching routes of five algorithms are shown in Figure4.Figure 4
Energy dispatching routes of five algorithms in scenario 2. (a) Improved PSO-ACO algorithm energy dispatching route; (b) MMAS algorithm energy dispatching route; (c) ACO algorithm energy dispatching route; (d) PSO update algorithm energy dispatching route; (e) PSO algorithm energy dispatching route.
(a)(b)(c)(d)(e)In Figure4, the energy dispatching route length of the improved PSO-ACO algorithm is 64.29 cm, and the coincidence point is 0. The energy dispatching route length of the MMAS algorithm is 69.09 cm, and the coincidence point is 1. The energy dispatching route length of the ACO algorithm is 76.93 cm, and the coincidence point is 2. The energy dispatching route length of the PSO update algorithm is 80.42 cm, and the coincidence point is 2. The energy dispatching route length of the PSO algorithm is 90.23 cm, and the coincidence point is 3.The pheromone situations of the three algorithms are shown in Figure5.Figure 5
Pheromones of three algorithms in scenario 2. (a) Improved PSO-ACO algorithm pheromone; (b) MMAS algorithm pheromone; (c) ACO algorithm pheromone.
(a)(b)(c)In Figure5, the pheromone of the improved PSO-ACO algorithm is concise and clear, while the pheromone of the MMAS algorithm and the ACO algorithm is more complex.


#### 5.2.3. Experimental Scenario 3

In scenario 3, the energy dispatching routes of five algorithms are shown in Figure6.Figure 6
Energy dispatching routes of five algorithms in scenario 3. (a) Improved PSO-ACO algorithm energy dispatching route; (b) MMAS algorithm energy dispatching route; (c) ACO algorithm energy dispatching route; (d) PSO update algorithm energy dispatching route; (e) PSO algorithm energy dispatching route.
(a)(b)(c)(d)(e)In Figure6, the energy dispatching route length of the improved PSO-ACO algorithm is 72.74 cm, and the coincidence point is 0. The energy dispatching route length of the MMAS algorithm is 74.21 cm, and the coincidence point is 1. The energy dispatching route length of the ACO algorithm is 84.60 cm, and the coincidence point is 2. The energy dispatching route length of the PSO update algorithm is 90.03 cm, and the coincidence point is 1. The energy dispatching route length of the PSO algorithm is 102.71 cm, and the coincidence point is 6.The pheromone situations of the three algorithms are shown in Figure7.Figure 7
Pheromones of three algorithms in scenario 3. (a) Improved PSO-ACO algorithm pheromone; (b) MMAS algorithm pheromone; (c) ACO algorithm pheromone.
(a)(b)(c)In Figure7, the pheromone of the improved PSO-ACO algorithm is concise and clear, while the pheromone of the MMAS algorithm and the ACO algorithm are more complex.


### 5.3. Simulation Results and Analysis

In order to ensure the effectiveness of the algorithm, we set up 20 experimental scenarios and carried out 20 sets of simulation experiments on five algorithms, respectively. The experimental data are shown in Table3.Table 3
Experiment results of intelligent algorithm energy dispatching.
SIPSO-ACOACOMMASPSOPSO updateL (cm)T (s)PL (cm)T (s)PL (cm)T (s)PL (cm)T (s)PL (cm)T (s)P158.052.89071.284.73266.573.8197.634.75273.013.851264.293.14076.934.42269.093.5190.234.87380.424.212372.743.35084.604.55174.213.841102.714.67690.033.881463.503.08072.764.5170.593.86078.894.94270.674.071578.983.53086.174.65182.423.910114.154.683100.344.272662.592.68075.194.16165.903.87194.504.54578.993.912764.413.29080.084.27272.123.78193.584.63384.214.052858.742.97068.904.23260.363.99172.154.35268.223.931961.132.78070.734.12367.073.93176.294.12370.703.8621064.872.82069.714.06168.673.6174.934.76271.013.9411179.352.92090.434.94281.833.931117.454.64695.273.9811266.653.26070.794.38267.513.63177.234.84270.853.8521362.123.05069.494.03165.613.74077.114.59270.873.7611464.433.04074.054.28270.293.61179.984.96271.394.1211575.083.35086.864.64177.483.72096.664.67285.434.0511666.862.92082.244.43270.993.83188.034.79382.564.0801761.043.02071.984.13165.833.67076.834.92273.614.1111860.942.98068.554.11163.563.78183.264.99579.484.0721962.63.06067.694.09163.633.84099.514.93668.673.9522072.933.26087.804.24279.563.97190.804.91280.784.091In Table3, S represents the sites, L represents the route length, T represents the route time, and P represents the route coincidence point.It can be seen from Table3 that in 20 experiments, the energy dispatching route length range of the improved PSO-ACO algorithm is from 58.05 cm to 79.35 cm, the time-consuming range is from 2.68 s to 3.53 s, and the coincidence point is always 0. The energy dispatching route length range of the MMAS algorithm is from 60.36 cm to 82.42 cm, the time-consuming range is from 3.50 s to 3.99 s, and the coincidence point is 0 or 1. The energy dispatching route length range of the ACO algorithm is from 67.69 cm to 90.43 cm, the time-consuming range is from 4.03 s to 4.94 s, and the coincidence point range is from 1 to 3. The energy dispatching route length range of the PSO update algorithm is from 68.22 cm to 100.34 cm, the time-consuming range is from 3.76 s to 4.27 s, and the coincidence point range is from 0 to 2. The energy dispatching route length range of the PSO algorithm is from 72.15 cm to 117.45 cm, the time-consuming range is from 4.12 s to 4.99 s, and the coincidence point range is from 2 to 6.In order to better observe the experimental results, the experimental data are visualized and compared. The visualization effects of 20 experiments are shown in Figure8.Figure 8
Intelligent algorithm simulation visualization results. (a) Intelligent algorithm dispatching route length; (b) intelligent algorithm dispatching route time; (c) intelligent algorithm route coincidence point.
(a)(b)(c)It can be seen from Figure8 that under 20 different energy dispatching experimental scenarios, the improved PSO-ACO algorithm has the shortest dispatching route, the least time-consuming, and no route overlap. MMAS algorithm, ACO algorithm, PSO update algorithm have longer dispatching routes, more time-consuming, and more coincidence points. PSO algorithm has the longest dispatching route, the most time-consuming, and the most coincidence points. The simulation results show that the improved PSO-ACO algorithm proposed in this paper is effective and superior in energy dispatching.Meanwhile, according to the comprehensive performance indicators such as energy dispatching route length, route time, and route coincidence points, 20 sets of experimental data are comprehensively analyzed, and the average performance indicators of five algorithms can be obtained, as shown in Table4.Table 4
Average performance indicators of five intelligent algorithms.
AlgorithmAverage route length (cm)Average time (s)Average coincidence pointIPSO-ACO66.073.070ACO76.314.351.55MMAS70.163.790.7PSO80.104.733.15PSO update78.334.001.35Based on the average performance indicators of the five algorithms, the following conclusions can be reached.(1)
In Table4, the average route length of the improved PSO-ACO algorithm proposed in this paper in the energy dispatching simulation experiment is 66.07 cm, the average time is 3.07 s, and the average route coincidence point is 0.(2)
It can be seen from Table4 that the improved PSO-ACO algorithm proposed in this paper has the shortest route. The average route length is 10.24 cm, 4.09 cm, 14.03 cm, and 12.26 cm less than the ACO algorithm, MMAS algorithm, PSO algorithm, and PSO update algorithm, respectively.(3)
It can be seen from Table4 that the improved PSO-ACO algorithm proposed in this paper has the shortest time. The average time is 1.28 s, 0.72 s, 1.66 s, and 0.93 s less than the ACO algorithm, MMAS algorithm, PSO algorithm, and PSO update algorithm, respectively.(4)
It can be seen from Table4 that the improved PSO-ACO algorithm proposed in this paper has the fewest coincidence points. The average coincidence point is 1.55, 0.7, 3.15, and 1.35 less than ACO algorithm, MMAS algorithm, PSO algorithm, and PSO update algorithm respectively.(5)
In conclusion, the improved PSO-ACO algorithm proposed in this paper is a successful multiobjective optimization algorithm, which can complete the safest and shortest energy dispatching route with the shortest time and the least energy consumption.


## 5.1. Experimental Platform and Algorithm Parameter Setting

### 5.1.1. Experimental Platform

In order to verify the feasibility and effectiveness of the improved PSO-ACO algorithm proposed in this paper in energy scheduling, simulation experiments were conducted on the improved PSO-ACO algorithm, ACO algorithm, MMAS algorithm, PSO algorithm, and PSO update algorithm, respectively. The simulation environment is 20 cm × 20 cm, there are 10 sites for energy dispatching. Different locations are set for the 10 sites, which can form different experimental scenarios. The simulation experiment is based on the HP Pavilion personal computer (Intel (R) Core (TM) I7-9700F CPU, 3.0 GHz, 8 GB memory; NVIDIA Geforce GTX 1080 GPU).


### 5.1.2. Improved PSO-ACO Parameter

In the improved PSO-ACO algorithm proposed in this paper, the parameters are set as follows: the number of particlesmp is 80, maximum PSO iterations Tmax is 2000, current optimal learning factor c1 is 1.5, global optimal learning factor c2 is 1.5, vitality factor c3 is 2, maximum inertia weight coefficient ωmax is 0.9, minimum inertia weight coefficient ωmin is 0.3, number of ants ma is 20, maximum ACO Iterations Fmax is 2000, heuristic factor α is 1, expectation heuristic factor β is 7, angle guidance factor γ is 8, weight coefficient λ is 1, and the other weight coefficient μ is 3.


### 5.1.3. Comparison Algorithm Parameter

The four comparison algorithms are as follows:ACO [42], a solution space search method suitable for finding optimal routes on graphsMMAS [43], a search method that sets the maximum and minimum pheromone intervals and adopts elite rulesPSO [44], a solution search method based on information sharing among groups and evolving from disorder to orderPSO update [45], a PSO optimization method for constantly updating particle position and velocityIn the experiment, different parameters of the algorithm may lead to different experimental results, and the same basic parameters of the algorithm can ensure the fairness of the algorithm comparison. In principle, the four comparison algorithms and the improved PSO-ACO algorithm should be set with the same parameters as much as possible.According to the parameters of the improved PSO-ACO algorithm, we set the parameters of ACO and MMAS as follows: the number of ants is set to 20, the maximum iterations number is set to 2000, the heuristic factor is set to 1, the expectation heuristic factor is set to 7, and the pheromone volatilization rate is set to 0.3. In addition, the lower limit of pheromone concentration of MMAS is set to 0.1, and the upper limit of pheromone concentration is 1000.We set the parameters of PSO and PSO update as follows: The number of particles is set to 80, the maximum iterations number is set to 2000, the inertia weight coefficient is set to 0.8, the current optimal learning factor is 1.5, and the global optimal learning factor is 1.5.For the rest of the parameters in the comparison algorithms, we adopt the default settings suggested in the corresponding literature.


## 5.1.1. Experimental Platform

In order to verify the feasibility and effectiveness of the improved PSO-ACO algorithm proposed in this paper in energy scheduling, simulation experiments were conducted on the improved PSO-ACO algorithm, ACO algorithm, MMAS algorithm, PSO algorithm, and PSO update algorithm, respectively. The simulation environment is 20 cm × 20 cm, there are 10 sites for energy dispatching. Different locations are set for the 10 sites, which can form different experimental scenarios. The simulation experiment is based on the HP Pavilion personal computer (Intel (R) Core (TM) I7-9700F CPU, 3.0 GHz, 8 GB memory; NVIDIA Geforce GTX 1080 GPU).


## 5.1.2. Improved PSO-ACO Parameter

In the improved PSO-ACO algorithm proposed in this paper, the parameters are set as follows: the number of particlesmp is 80, maximum PSO iterations Tmax is 2000, current optimal learning factor c1 is 1.5, global optimal learning factor c2 is 1.5, vitality factor c3 is 2, maximum inertia weight coefficient ωmax is 0.9, minimum inertia weight coefficient ωmin is 0.3, number of ants ma is 20, maximum ACO Iterations Fmax is 2000, heuristic factor α is 1, expectation heuristic factor β is 7, angle guidance factor γ is 8, weight coefficient λ is 1, and the other weight coefficient μ is 3.


## 5.1.3. Comparison Algorithm Parameter

The four comparison algorithms are as follows:ACO [42], a solution space search method suitable for finding optimal routes on graphsMMAS [43], a search method that sets the maximum and minimum pheromone intervals and adopts elite rulesPSO [44], a solution search method based on information sharing among groups and evolving from disorder to orderPSO update [45], a PSO optimization method for constantly updating particle position and velocityIn the experiment, different parameters of the algorithm may lead to different experimental results, and the same basic parameters of the algorithm can ensure the fairness of the algorithm comparison. In principle, the four comparison algorithms and the improved PSO-ACO algorithm should be set with the same parameters as much as possible.According to the parameters of the improved PSO-ACO algorithm, we set the parameters of ACO and MMAS as follows: the number of ants is set to 20, the maximum iterations number is set to 2000, the heuristic factor is set to 1, the expectation heuristic factor is set to 7, and the pheromone volatilization rate is set to 0.3. In addition, the lower limit of pheromone concentration of MMAS is set to 0.1, and the upper limit of pheromone concentration is 1000.We set the parameters of PSO and PSO update as follows: The number of particles is set to 80, the maximum iterations number is set to 2000, the inertia weight coefficient is set to 0.8, the current optimal learning factor is 1.5, and the global optimal learning factor is 1.5.For the rest of the parameters in the comparison algorithms, we adopt the default settings suggested in the corresponding literature.


## 5.2. Simulation Experiment

### 5.2.1. Experimental Scenario 1

On the premise of setting 10 sites at different locations, multiple sets of simulation experiments were carried out for the 5 algorithms, respectively. In scenario 1, the energy dispatching routes of five algorithms are shown in Figure2.Figure 2
Energy dispatching routes of five algorithms in scenario 1. (a) Improved PSO-ACO algorithm energy dispatching route; (b) MMAS algorithm energy dispatching route; (c) ACO algorithm energy dispatching route; (d) PSO update algorithm energy dispatching route; (e) PSO algorithm energy dispatching route.
(a)(b)(c)(d)(e)In Figure2, the energy dispatching route length of the improved PSO-ACO algorithm is 58.05 cm, and the coincidence point is 0. The energy dispatching route length of the MMAS algorithm is 66.57 cm, and the coincidence point is 1. The energy dispatching route length of the ACO algorithm is 71.28 cm, and the coincidence point is 2. The energy dispatching route length of the PSO update algorithm is 73.01 cm, and the coincidence point is 1. The energy dispatching route length of the PSO algorithm is 97.63 cm, and the coincidence point is 2.Because pheromone is unique to ACO algorithm, pheromone can only exist in ACO algorithm and its optimization algorithm, so there is no pheromone in both PSO algorithm and PSO update algorithm. Based on this, only the improved PSO-ACO algorithm, MMAS algorithm, and ACO algorithm have pheromone in the above five algorithms. The pheromone situation of the three algorithms is shown in Figure3.Figure 3
Pheromones of three algorithms in scenario 1. (a) Improved PSO-ACO algorithm pheromone; (b) MMAS algorithm pheromone; (c) ACO algorithm pheromone.
(a)(b)(c)In Figure3, the pheromone of the improved PSO-ACO algorithm is concise and clear, while the pheromone of the MMAS algorithm and the ACO algorithm is more complex.


### 5.2.2. Experimental Scenario 2

In scenario 2, the energy dispatching routes of five algorithms are shown in Figure4.Figure 4
Energy dispatching routes of five algorithms in scenario 2. (a) Improved PSO-ACO algorithm energy dispatching route; (b) MMAS algorithm energy dispatching route; (c) ACO algorithm energy dispatching route; (d) PSO update algorithm energy dispatching route; (e) PSO algorithm energy dispatching route.
(a)(b)(c)(d)(e)In Figure4, the energy dispatching route length of the improved PSO-ACO algorithm is 64.29 cm, and the coincidence point is 0. The energy dispatching route length of the MMAS algorithm is 69.09 cm, and the coincidence point is 1. The energy dispatching route length of the ACO algorithm is 76.93 cm, and the coincidence point is 2. The energy dispatching route length of the PSO update algorithm is 80.42 cm, and the coincidence point is 2. The energy dispatching route length of the PSO algorithm is 90.23 cm, and the coincidence point is 3.The pheromone situations of the three algorithms are shown in Figure5.Figure 5
Pheromones of three algorithms in scenario 2. (a) Improved PSO-ACO algorithm pheromone; (b) MMAS algorithm pheromone; (c) ACO algorithm pheromone.
(a)(b)(c)In Figure5, the pheromone of the improved PSO-ACO algorithm is concise and clear, while the pheromone of the MMAS algorithm and the ACO algorithm is more complex.


### 5.2.3. Experimental Scenario 3

In scenario 3, the energy dispatching routes of five algorithms are shown in Figure6.Figure 6
Energy dispatching routes of five algorithms in scenario 3. (a) Improved PSO-ACO algorithm energy dispatching route; (b) MMAS algorithm energy dispatching route; (c) ACO algorithm energy dispatching route; (d) PSO update algorithm energy dispatching route; (e) PSO algorithm energy dispatching route.
(a)(b)(c)(d)(e)In Figure6, the energy dispatching route length of the improved PSO-ACO algorithm is 72.74 cm, and the coincidence point is 0. The energy dispatching route length of the MMAS algorithm is 74.21 cm, and the coincidence point is 1. The energy dispatching route length of the ACO algorithm is 84.60 cm, and the coincidence point is 2. The energy dispatching route length of the PSO update algorithm is 90.03 cm, and the coincidence point is 1. The energy dispatching route length of the PSO algorithm is 102.71 cm, and the coincidence point is 6.The pheromone situations of the three algorithms are shown in Figure7.Figure 7
Pheromones of three algorithms in scenario 3. (a) Improved PSO-ACO algorithm pheromone; (b) MMAS algorithm pheromone; (c) ACO algorithm pheromone.
(a)(b)(c)In Figure7, the pheromone of the improved PSO-ACO algorithm is concise and clear, while the pheromone of the MMAS algorithm and the ACO algorithm are more complex.


## 5.2.1. Experimental Scenario 1

On the premise of setting 10 sites at different locations, multiple sets of simulation experiments were carried out for the 5 algorithms, respectively. In scenario 1, the energy dispatching routes of five algorithms are shown in Figure2.Figure 2
Energy dispatching routes of five algorithms in scenario 1. (a) Improved PSO-ACO algorithm energy dispatching route; (b) MMAS algorithm energy dispatching route; (c) ACO algorithm energy dispatching route; (d) PSO update algorithm energy dispatching route; (e) PSO algorithm energy dispatching route.
(a)(b)(c)(d)(e)In Figure2, the energy dispatching route length of the improved PSO-ACO algorithm is 58.05 cm, and the coincidence point is 0. The energy dispatching route length of the MMAS algorithm is 66.57 cm, and the coincidence point is 1. The energy dispatching route length of the ACO algorithm is 71.28 cm, and the coincidence point is 2. The energy dispatching route length of the PSO update algorithm is 73.01 cm, and the coincidence point is 1. The energy dispatching route length of the PSO algorithm is 97.63 cm, and the coincidence point is 2.Because pheromone is unique to ACO algorithm, pheromone can only exist in ACO algorithm and its optimization algorithm, so there is no pheromone in both PSO algorithm and PSO update algorithm. Based on this, only the improved PSO-ACO algorithm, MMAS algorithm, and ACO algorithm have pheromone in the above five algorithms. The pheromone situation of the three algorithms is shown in Figure3.Figure 3
Pheromones of three algorithms in scenario 1. (a) Improved PSO-ACO algorithm pheromone; (b) MMAS algorithm pheromone; (c) ACO algorithm pheromone.
(a)(b)(c)In Figure3, the pheromone of the improved PSO-ACO algorithm is concise and clear, while the pheromone of the MMAS algorithm and the ACO algorithm is more complex.


## 5.2.2. Experimental Scenario 2

In scenario 2, the energy dispatching routes of five algorithms are shown in Figure4.Figure 4
Energy dispatching routes of five algorithms in scenario 2. (a) Improved PSO-ACO algorithm energy dispatching route; (b) MMAS algorithm energy dispatching route; (c) ACO algorithm energy dispatching route; (d) PSO update algorithm energy dispatching route; (e) PSO algorithm energy dispatching route.
(a)(b)(c)(d)(e)In Figure4, the energy dispatching route length of the improved PSO-ACO algorithm is 64.29 cm, and the coincidence point is 0. The energy dispatching route length of the MMAS algorithm is 69.09 cm, and the coincidence point is 1. The energy dispatching route length of the ACO algorithm is 76.93 cm, and the coincidence point is 2. The energy dispatching route length of the PSO update algorithm is 80.42 cm, and the coincidence point is 2. The energy dispatching route length of the PSO algorithm is 90.23 cm, and the coincidence point is 3.The pheromone situations of the three algorithms are shown in Figure5.Figure 5
Pheromones of three algorithms in scenario 2. (a) Improved PSO-ACO algorithm pheromone; (b) MMAS algorithm pheromone; (c) ACO algorithm pheromone.
(a)(b)(c)In Figure5, the pheromone of the improved PSO-ACO algorithm is concise and clear, while the pheromone of the MMAS algorithm and the ACO algorithm is more complex.


## 5.2.3. Experimental Scenario 3

In scenario 3, the energy dispatching routes of five algorithms are shown in Figure6.Figure 6
Energy dispatching routes of five algorithms in scenario 3. (a) Improved PSO-ACO algorithm energy dispatching route; (b) MMAS algorithm energy dispatching route; (c) ACO algorithm energy dispatching route; (d) PSO update algorithm energy dispatching route; (e) PSO algorithm energy dispatching route.
(a)(b)(c)(d)(e)In Figure6, the energy dispatching route length of the improved PSO-ACO algorithm is 72.74 cm, and the coincidence point is 0. The energy dispatching route length of the MMAS algorithm is 74.21 cm, and the coincidence point is 1. The energy dispatching route length of the ACO algorithm is 84.60 cm, and the coincidence point is 2. The energy dispatching route length of the PSO update algorithm is 90.03 cm, and the coincidence point is 1. The energy dispatching route length of the PSO algorithm is 102.71 cm, and the coincidence point is 6.The pheromone situations of the three algorithms are shown in Figure7.Figure 7
Pheromones of three algorithms in scenario 3. (a) Improved PSO-ACO algorithm pheromone; (b) MMAS algorithm pheromone; (c) ACO algorithm pheromone.
(a)(b)(c)In Figure7, the pheromone of the improved PSO-ACO algorithm is concise and clear, while the pheromone of the MMAS algorithm and the ACO algorithm are more complex.


## 5.3. Simulation Results and Analysis

In order to ensure the effectiveness of the algorithm, we set up 20 experimental scenarios and carried out 20 sets of simulation experiments on five algorithms, respectively. The experimental data are shown in Table3.Table 3
Experiment results of intelligent algorithm energy dispatching.
SIPSO-ACOACOMMASPSOPSO updateL (cm)T (s)PL (cm)T (s)PL (cm)T (s)PL (cm)T (s)PL (cm)T (s)P158.052.89071.284.73266.573.8197.634.75273.013.851264.293.14076.934.42269.093.5190.234.87380.424.212372.743.35084.604.55174.213.841102.714.67690.033.881463.503.08072.764.5170.593.86078.894.94270.674.071578.983.53086.174.65182.423.910114.154.683100.344.272662.592.68075.194.16165.903.87194.504.54578.993.912764.413.29080.084.27272.123.78193.584.63384.214.052858.742.97068.904.23260.363.99172.154.35268.223.931961.132.78070.734.12367.073.93176.294.12370.703.8621064.872.82069.714.06168.673.6174.934.76271.013.9411179.352.92090.434.94281.833.931117.454.64695.273.9811266.653.26070.794.38267.513.63177.234.84270.853.8521362.123.05069.494.03165.613.74077.114.59270.873.7611464.433.04074.054.28270.293.61179.984.96271.394.1211575.083.35086.864.64177.483.72096.664.67285.434.0511666.862.92082.244.43270.993.83188.034.79382.564.0801761.043.02071.984.13165.833.67076.834.92273.614.1111860.942.98068.554.11163.563.78183.264.99579.484.0721962.63.06067.694.09163.633.84099.514.93668.673.9522072.933.26087.804.24279.563.97190.804.91280.784.091In Table3, S represents the sites, L represents the route length, T represents the route time, and P represents the route coincidence point.It can be seen from Table3 that in 20 experiments, the energy dispatching route length range of the improved PSO-ACO algorithm is from 58.05 cm to 79.35 cm, the time-consuming range is from 2.68 s to 3.53 s, and the coincidence point is always 0. The energy dispatching route length range of the MMAS algorithm is from 60.36 cm to 82.42 cm, the time-consuming range is from 3.50 s to 3.99 s, and the coincidence point is 0 or 1. The energy dispatching route length range of the ACO algorithm is from 67.69 cm to 90.43 cm, the time-consuming range is from 4.03 s to 4.94 s, and the coincidence point range is from 1 to 3. The energy dispatching route length range of the PSO update algorithm is from 68.22 cm to 100.34 cm, the time-consuming range is from 3.76 s to 4.27 s, and the coincidence point range is from 0 to 2. The energy dispatching route length range of the PSO algorithm is from 72.15 cm to 117.45 cm, the time-consuming range is from 4.12 s to 4.99 s, and the coincidence point range is from 2 to 6.In order to better observe the experimental results, the experimental data are visualized and compared. The visualization effects of 20 experiments are shown in Figure8.Figure 8
Intelligent algorithm simulation visualization results. (a) Intelligent algorithm dispatching route length; (b) intelligent algorithm dispatching route time; (c) intelligent algorithm route coincidence point.
(a)(b)(c)It can be seen from Figure8 that under 20 different energy dispatching experimental scenarios, the improved PSO-ACO algorithm has the shortest dispatching route, the least time-consuming, and no route overlap. MMAS algorithm, ACO algorithm, PSO update algorithm have longer dispatching routes, more time-consuming, and more coincidence points. PSO algorithm has the longest dispatching route, the most time-consuming, and the most coincidence points. The simulation results show that the improved PSO-ACO algorithm proposed in this paper is effective and superior in energy dispatching.Meanwhile, according to the comprehensive performance indicators such as energy dispatching route length, route time, and route coincidence points, 20 sets of experimental data are comprehensively analyzed, and the average performance indicators of five algorithms can be obtained, as shown in Table4.Table 4
Average performance indicators of five intelligent algorithms.
AlgorithmAverage route length (cm)Average time (s)Average coincidence pointIPSO-ACO66.073.070ACO76.314.351.55MMAS70.163.790.7PSO80.104.733.15PSO update78.334.001.35Based on the average performance indicators of the five algorithms, the following conclusions can be reached.(1)
In Table4, the average route length of the improved PSO-ACO algorithm proposed in this paper in the energy dispatching simulation experiment is 66.07 cm, the average time is 3.07 s, and the average route coincidence point is 0.(2)
It can be seen from Table4 that the improved PSO-ACO algorithm proposed in this paper has the shortest route. The average route length is 10.24 cm, 4.09 cm, 14.03 cm, and 12.26 cm less than the ACO algorithm, MMAS algorithm, PSO algorithm, and PSO update algorithm, respectively.(3)
It can be seen from Table4 that the improved PSO-ACO algorithm proposed in this paper has the shortest time. The average time is 1.28 s, 0.72 s, 1.66 s, and 0.93 s less than the ACO algorithm, MMAS algorithm, PSO algorithm, and PSO update algorithm, respectively.(4)
It can be seen from Table4 that the improved PSO-ACO algorithm proposed in this paper has the fewest coincidence points. The average coincidence point is 1.55, 0.7, 3.15, and 1.35 less than ACO algorithm, MMAS algorithm, PSO algorithm, and PSO update algorithm respectively.(5)
In conclusion, the improved PSO-ACO algorithm proposed in this paper is a successful multiobjective optimization algorithm, which can complete the safest and shortest energy dispatching route with the shortest time and the least energy consumption.


## 6. Conclusion and Future Work

This paper proposes an improved PSO-ACO algorithm combining PSO algorithm and ACO algorithm. It makes full use of the fast convergence ability of PSO algorithm and the robustness of ACO algorithm, which can improve the overall performance of energy dispatching, realize the safe, accurate and rapid energy dispatching, and effectively solve the problem of energy waste.The improved PSO-ACO algorithm can obtain a better global optimal route in energy dispatching. Compared with ACO algorithm, MMAS algorithm, PSO algorithm, and PSO update algorithm, it has the shortest route length, less running time, no coincidence, and highest safety performance.We verified the effectiveness and feasibility of the improved PSO-ACO algorithm through 20 sets of simulation experiments under different scenarios and proved that it is a successful algorithm that can be used to solve multiobjective optimization problems.In the future, we can also consider other hybrid algorithms and combine the advantages of various algorithms to solve the multiobjective optimization problem of energy dispatching. In addition, we can continuously improve the complexity of energy dispatching scenarios, so that the optimization algorithm can quickly and accurately plan the optimal route in any working scenarios.



---

*Source: 3160184-2023-02-20.xml*