# Research on Intelligent Guidance Optimal Path of Shared Car Charging in the IOT Environment

Authors: Yuefang Sun; Kangkang Jin; Zhaozhuang Guo; Chen Zhang; Hao Wang
Journal: Wireless Communications and Mobile Computing
 (2020)

---

## Abstract

In recent years, with the improvement of Internet of Things (IOT) technology, a “shared” service concept has appeared in people’s life. In the limited available resources, it is of great value to study the optimal path of charging pile selection for shared cars. With the help of Internet of Things technology and through analyzing the collected data, this paper introduces three path optimization methods, the Dijkstra algorithm, heuristic algorithmA∗, and improved particle swarm optimization (PSO) algorithm; establishes relevant convergence conditions; and takes the actual path cost as the criterion to judge the optimal path. In addition, this paper studies the optimal path from the shared car to the charging pile. Through the simulation experiment, the results show that compared with the traditional optimal path algorithm, the improved particle swarm optimization algorithm has strong parallelism and better search effect for optimal path selection in the case of large number of traffic path nodes and complex paths, which fully reflects the performance advantage of the algorithm.


---

## Body

## 1. Introduction

As a long-term problem, air pollution has not been fully improved, and automobile exhaust is an important cause of air pollution. Based on this, with the support of IOT technology, it is of great significance to study the optimal path from shared cars to charging piles.In order to distribute traffic network reasonably and improve traffic operation efficiency, the United States began to study the Intelligent Transportation IOT in the 1960s. In 1991, the United States Congress passed the Integrated Land Transportation Efficiency Act (ISTEA) [1]. The simulation results showed that once the ISTRA scheme was adopted, the capacity of the US road network would be increased by 20%~30% [2]. The intelligent transportation system (ITS) was first used in the parking lot vehicle guidance system. The earliest foreign parking guidance system appeared in Aachen, Germany, in 1971. Then it was first widely used in Britain and other European countries, Japan, and other developed countries [3, 4]. In China, Beijing [5, 6], Shanghai, Guangzhou [7], and other cities take the lead in introducing the parking guidance system, effectively alleviating traffic congestion. More and more cities have begun to use the parking guidance system [8]. More and more cities are applying parking guidance systems. The rise of domestic shared electric vehicles, combined with the development of domestic and international urban parking guidance systems, has pointed out the development goals and directions for the study of the optimal path from shared electric cars to charging piles.The core of DRGS is the path guidance algorithm, but the current path guidance is mostly based on static information. In order to obtain the shortest path in the formerN trips and reduce the complexity to the polynomial order, Wei et al. [10] proposed the generalized shortest path by using the improved Dijkstra algorithm. Xiaolei [11] combined the Dijkstra algorithm with genetic algorithm and studied the method of obtaining the optimal path quickly without the restriction of the network condition. In 2009, in order to avoid a single algorithm falling into the local optimal defect and improving the optimization efficiency, van der Zijpp and Catalano [12] proposed a shortest path optimization algorithm based on simulated annealing algorithm and genetic algorithm. The traditional path guidance method was only limited to the optimal path for one individual to find the starting point and the end point, which could not take into account the overall road impact factors and realize the path dynamic induction [13]. Therefore, it was necessary to design an optimal path in the sharing of electric car charging, so as to improve the utilization ratio of the shared car and alleviate the traffic pressure of traffic congestion [14].Dynamic route guidance system (DRGS) was first studied in the United States, the United Kingdom, Japan, and other developed countries. Other path guidance systems based on DRGS have achieved some results [9]. The core of DRGS is path guidance algorithm, but the current path guidance is mostly based on static information. Wei et al. [10] proposed the generalized shortest path, using the improved Dijkstra algorithm to find the shortest path in the front N routes and reduce the complexity to a polynomial order. Xiaolei [11] used the method of combining the Dijkstra algorithm with genetic algorithm to find the optimal path without the restriction of road network conditions. van der Zijpp and Catalano [12] proposed a shortest path optimization algorithm based on simulated annealing algorithm and genetic algorithm in 2009, which avoided the defect that a single algorithm was easy to fall into local optimum and improved the optimization efficiency. The traditional route guidance method was limited to an individual to find the optimal path of the starting point and the end point and could not take into account the overall impact of road factors to achieve dynamic route guidance [13]. Therefore, it is necessary to design an optimal path when sharing electric car needs to charge, which can not only improve the utilization rate of the shared car but also alleviate traffic congestion and other traffic pressures [14].The above researches on parking guidance system and urban route guidance based on IOT have certain limitations, and there are few researches on the path planning of guiding shared cars to charging piles at home and abroad, because of the complexity of urban traffic network, the uncertain situation of vehicles in road network, the real time of vehicles, and roads situation. When we use real-time updated traffic data to search the path, higher requirements are put forward for the optimal path selection.


## 2. IOT Technology

IOT is an important part of the new generation of information technology, which is called the third wave of development of the world information industry after the computer and the Internet. The early IOT was put forward based on the background of a logistics system, and the radio frequency identification (RFID) technology was used as the substitute of bar code identification to realize the intelligent management of the logistics system. The concept of “Internet of Things” was formally proposed at the 2005 ITU World Summit on the Information Society in Tunis. The report noted that the IOT was a new dimension of communication in the world of information and communication technology (shown in Figure1), which extended any time, any place, and connection any person to connect any object. The connection of all things forms the IOT [15].Figure 1
Connection dimension in the IOT.The introduction of the ITU report makes the IOT more and more important in the world. Workers in all related fields have studied the IOT from different aspects. However, different workers have different points of view on the IOT, and the description of the IOT is different. Therefore, the concept of IOT is not reaching a consensus.Here, we only introduce a concept, which is widely recognized. The definition of “Internet of Things Technology” is [16] a network technology through the RFID, infrared sensors, the global positioning system (GPS), laser scanners, and other information-sensing equipment. In order to achieve intelligent identification, positioning, tracking, monitoring, and management, any items connected with the Internet for information exchange and communication can be called Internet technology [17] according to the agreement. Its core and foundation is still “Internet technology”; it is a kind of network technology that extends and expands on the basis of Internet technology. The clients expand and extend to any goods and objects, exchange information, and communicate with each other [18].For a clearer description of the key links in the IOT, according to the perspective of information science, the information function model of the IOT is abstracted around the flow process of information, as shown in Figure2.Figure 2
The information function model of the IOT.


### 2.1. Three Key Technologies in IOT Applications

There are four levels of general IOT architecture: the perceptive layer, the network layer, the data intelligent processing layer, and the application layer. The perceptive layer is like the human skin and the senses, which is used to identify objects and collect information. The network layer is like a human neural network that transmits information to the brain for processing. The data intelligent processing layer is the core technology, which is realized data-centric. The application layer includes the application support layer and various specific object-networking applications. The IOT includes three key technologies in the application, and its technical architecture is shown in Figure3.
(1)
Sensor technology: the collected signal is analog signal, which can be processed by computer only if the analog signals are converted into digital signal
(2)
RFID tag technology: the integration of radio frequency identification and embedded technology, which has a broad application prospects in automatic identification, goods logistics management
(3)
Embedded system technology: a composite technologies, which integrates computer hardware and software technology, sensor technology, integrated circuit technology, electronic application technologyFigure 3
Technology system of IOT.


### 2.2. Features of the IOT

The IOT is based on the Internet, which not only has many characteristics of the Internet but also extends its own more prominent features. The basic characteristics of the network of things are perception, reliability, and intelligence, which are mainly reflected in the following three aspects:


#### 2.2.1. Perception

This is mainly embodied in the identification and communication of the IOT. In the entire IOT, there is a large number of sensors. Each sensor is a source of information. The sensor receives the information and identifies the information through a specific protocol. Today, with the rapid development of our science and technology information, information data is constantly being updated, so that the sensors must constantly perceive the data and update the information.


#### 2.2.2. Reliability

Reliability is mainly reflected in the reliability of information transmission, through the Cloud computing; fuzzy recognition technology, corresponding to the change of various things; reliable transmission; and sending of instructions in time.


#### 2.2.3. Intelligence

The IOT is the communication between things and things, without the interference of human beings. In other words, this is not through the authorization of the human, but the person is only a kind of consciousness control. The IOT can transmit, analyze, and process information through various technologies. Finally, intelligent decisions can be made through intelligent control.Thus, comprehensive perception, reliable transmission, and intelligent processing are the three important features of the IOT. In the “smart planet,” the importance of the IOT has been involved, which embodies the profound perception, comprehensive interconnection, and the powerful intelligence of the IOT.


### 2.3. The System Architecture of the IOT

Here, we introduce one of the architectures of the IOT, which includes the underlying network distribution, converged gateway access, Internet convergence, and terminal-user application. The structure is showed in Figure4.Figure 4
The architecture of IOT.In Figure4, a large number of the underlying network systems are selectively distributed in the physical space, according to their respective characteristics, which forms the network distribution. The underlying network collects the exchange information of barter and transfers it to intelligent converged gateway via RFID, WSNs, WLAN, and so on [19]. Through the intelligent convergence gateway, the network is connected to the network fusion system. Finally, the network approach, which includes radio and television network, Internet, and telecommunication network, is used to reach the terminal user application system. At the same time, the terminal user can influence the underlying network to different applications through subjective behavior, so as to realize material association information interaction between human and things, things to things, and things to human. The underlying network distribution including heterogeneous networks, such as WSNs, RFID system, and WLAN, allows the system to identify the properties of the objects and collects and captures the information, through the information interaction of heterogeneous network, which can realize the object’s perception of the external physical environment. From the view of network function, the underlying network should have the dual functions of information acquisition and routing, while the underlying heterogeneous networks need to collaborate with each other to accomplish specific tasks.Converged gateway access mainly completes the information collected from the underlying network smoothly access to the transmission network. The access technology includes the wired access methods and the wireless access methods. The intelligent convergence gateway usually has the powerful storage, processing, and the communication capabilities. The key is combined with the underlying network and smoothly access to the integrated network upward. The optimized network system includes the radio and television, Internet, and telecommunication network, which mainly completes the long-distance transmission of the information [20]. The terminal user application system mainly completes the information related service discovery and the application function.


## 2.1. Three Key Technologies in IOT Applications

There are four levels of general IOT architecture: the perceptive layer, the network layer, the data intelligent processing layer, and the application layer. The perceptive layer is like the human skin and the senses, which is used to identify objects and collect information. The network layer is like a human neural network that transmits information to the brain for processing. The data intelligent processing layer is the core technology, which is realized data-centric. The application layer includes the application support layer and various specific object-networking applications. The IOT includes three key technologies in the application, and its technical architecture is shown in Figure3.
(1)
Sensor technology: the collected signal is analog signal, which can be processed by computer only if the analog signals are converted into digital signal
(2)
RFID tag technology: the integration of radio frequency identification and embedded technology, which has a broad application prospects in automatic identification, goods logistics management
(3)
Embedded system technology: a composite technologies, which integrates computer hardware and software technology, sensor technology, integrated circuit technology, electronic application technologyFigure 3
Technology system of IOT.


## 2.2. Features of the IOT

The IOT is based on the Internet, which not only has many characteristics of the Internet but also extends its own more prominent features. The basic characteristics of the network of things are perception, reliability, and intelligence, which are mainly reflected in the following three aspects:


### 2.2.1. Perception

This is mainly embodied in the identification and communication of the IOT. In the entire IOT, there is a large number of sensors. Each sensor is a source of information. The sensor receives the information and identifies the information through a specific protocol. Today, with the rapid development of our science and technology information, information data is constantly being updated, so that the sensors must constantly perceive the data and update the information.


### 2.2.2. Reliability

Reliability is mainly reflected in the reliability of information transmission, through the Cloud computing; fuzzy recognition technology, corresponding to the change of various things; reliable transmission; and sending of instructions in time.


### 2.2.3. Intelligence

The IOT is the communication between things and things, without the interference of human beings. In other words, this is not through the authorization of the human, but the person is only a kind of consciousness control. The IOT can transmit, analyze, and process information through various technologies. Finally, intelligent decisions can be made through intelligent control.Thus, comprehensive perception, reliable transmission, and intelligent processing are the three important features of the IOT. In the “smart planet,” the importance of the IOT has been involved, which embodies the profound perception, comprehensive interconnection, and the powerful intelligence of the IOT.


## 2.2.1. Perception

This is mainly embodied in the identification and communication of the IOT. In the entire IOT, there is a large number of sensors. Each sensor is a source of information. The sensor receives the information and identifies the information through a specific protocol. Today, with the rapid development of our science and technology information, information data is constantly being updated, so that the sensors must constantly perceive the data and update the information.


## 2.2.2. Reliability

Reliability is mainly reflected in the reliability of information transmission, through the Cloud computing; fuzzy recognition technology, corresponding to the change of various things; reliable transmission; and sending of instructions in time.


## 2.2.3. Intelligence

The IOT is the communication between things and things, without the interference of human beings. In other words, this is not through the authorization of the human, but the person is only a kind of consciousness control. The IOT can transmit, analyze, and process information through various technologies. Finally, intelligent decisions can be made through intelligent control.Thus, comprehensive perception, reliable transmission, and intelligent processing are the three important features of the IOT. In the “smart planet,” the importance of the IOT has been involved, which embodies the profound perception, comprehensive interconnection, and the powerful intelligence of the IOT.


## 2.3. The System Architecture of the IOT

Here, we introduce one of the architectures of the IOT, which includes the underlying network distribution, converged gateway access, Internet convergence, and terminal-user application. The structure is showed in Figure4.Figure 4
The architecture of IOT.In Figure4, a large number of the underlying network systems are selectively distributed in the physical space, according to their respective characteristics, which forms the network distribution. The underlying network collects the exchange information of barter and transfers it to intelligent converged gateway via RFID, WSNs, WLAN, and so on [19]. Through the intelligent convergence gateway, the network is connected to the network fusion system. Finally, the network approach, which includes radio and television network, Internet, and telecommunication network, is used to reach the terminal user application system. At the same time, the terminal user can influence the underlying network to different applications through subjective behavior, so as to realize material association information interaction between human and things, things to things, and things to human. The underlying network distribution including heterogeneous networks, such as WSNs, RFID system, and WLAN, allows the system to identify the properties of the objects and collects and captures the information, through the information interaction of heterogeneous network, which can realize the object’s perception of the external physical environment. From the view of network function, the underlying network should have the dual functions of information acquisition and routing, while the underlying heterogeneous networks need to collaborate with each other to accomplish specific tasks.Converged gateway access mainly completes the information collected from the underlying network smoothly access to the transmission network. The access technology includes the wired access methods and the wireless access methods. The intelligent convergence gateway usually has the powerful storage, processing, and the communication capabilities. The key is combined with the underlying network and smoothly access to the integrated network upward. The optimized network system includes the radio and television, Internet, and telecommunication network, which mainly completes the long-distance transmission of the information [20]. The terminal user application system mainly completes the information related service discovery and the application function.


## 3. Question-Making and Analysis

### 3.1. Propose the Problem of Optimizing Guide Path

With the development of urbanization and industrialization, the problem of urban traffic congestion is becoming more and more serious. The role of shared cars in relieving traffic congestion pressure is more and more obvious. But as the scope of the application of shared cars increases, how to guide it to find the optimal charging pile routing problem has plagued the managers of electric vehicle charging. With the development of the IOT, the traffic monitoring and control equipment in the city can do the illegal snapping, the flow control, and so on. The Traffic Management Center can use the sensor or monitor the video processing technology, so that the real-time monitoring of each vehicle. The path guidance becomes possible. The real-time traffic data of the city is updated rapidly, and in front of the dynamic traffic flow information, a higher requirement is put forward on how to find the optimal route of charging pile quickly.


### 3.2. Analysis of Path Influencing Factors

The optimal path problem in real-time traffic is not equal to the shortest path research in theory. Combined with traffic laws and regulations, one-way road traffic, turn restrictions, and so on, we guide the optimal path of the electric vehicle to charge pile by taking the shortest driving distance of electric vehicle to the charging pile, the least driving time and the lowest power consumption and other optimization criteria as the goal. The related influence factors mainly come from several aspects.(1)
Real-time traffic conditions
In real traffic, if multiple electric cars choose the same optimal path, exceeding the traffic capacity of the road, it will definitely result in the worst-case scenario. Therefore, when choosing the optimal path, according to the traffic flow on the channel, driving speed and other factors on the road congestion degree quantification, which can be expressed as unimpeded, general congestion, congestion, and serious congestion, the real-time traffic information collected through the vehicle traveling recorder, the intersection electronic surveillance, and so on can be used to analyze and quantify the traffic conditions.
(2)
Intersection delay time
In the theoretical research, the delay time between nodes are ignored when the optimization algorithm is used to study the optimal path, and the delay time of the subjective judgment section has no effect on the time optimization. In actual traffic, traffic signal (traffic light) is the most obvious time delay for intersection and has great influence on optimization time.
(3)
The impact of road one-way street
In the actual road, the traffic management department will set up a one-way street on some specific roads, while the traditional path optimization methods are both two-way alley at the default node. This optimization mode does not conform to the actual traffic path.


### 3.3. The Intelligent Transportation System Model of IOT

According to the system structure of the IOT and the functional requirements of the intelligent transportation system, the model of intelligent traffic system based on IOT is proposed. The intelligent traffic system is layered to realize the analysis and description of the function and properties of the model.In the perceptual layer, the application of intelligent traffic based on the IOT is built on vehicles, personnel, environment, and other related infrastructure. The information collection is completed by the beacon, the roadmap sensor, and other basic sensing tools. In the network layer, the intelligent traffic system based on IOT emphasizes the sharing and utilization of information, through satellite, computer network, wireless mobile communication, and other related technologies to complete the transmission of traffic information in the network layer. In addition, the storage and processing of information can be provided different information according to different service. The application layer, which can realize the service of adjusting signal lights according to traffic flow and providing traffic information in real time, and carry out different traffic management and control according to different service fields, feedbacks the realization in time and constantly expands more intelligent service functions.In a word, the intelligent traffic system based on the IOT is a network system that realizes the collection, transmission, control, and application of traffic information. With the development of the technology of IOT, the service level of the intelligent transportation system will continue to expand and serve the traveler better.


## 3.1. Propose the Problem of Optimizing Guide Path

With the development of urbanization and industrialization, the problem of urban traffic congestion is becoming more and more serious. The role of shared cars in relieving traffic congestion pressure is more and more obvious. But as the scope of the application of shared cars increases, how to guide it to find the optimal charging pile routing problem has plagued the managers of electric vehicle charging. With the development of the IOT, the traffic monitoring and control equipment in the city can do the illegal snapping, the flow control, and so on. The Traffic Management Center can use the sensor or monitor the video processing technology, so that the real-time monitoring of each vehicle. The path guidance becomes possible. The real-time traffic data of the city is updated rapidly, and in front of the dynamic traffic flow information, a higher requirement is put forward on how to find the optimal route of charging pile quickly.


## 3.2. Analysis of Path Influencing Factors

The optimal path problem in real-time traffic is not equal to the shortest path research in theory. Combined with traffic laws and regulations, one-way road traffic, turn restrictions, and so on, we guide the optimal path of the electric vehicle to charge pile by taking the shortest driving distance of electric vehicle to the charging pile, the least driving time and the lowest power consumption and other optimization criteria as the goal. The related influence factors mainly come from several aspects.(1)
Real-time traffic conditions
In real traffic, if multiple electric cars choose the same optimal path, exceeding the traffic capacity of the road, it will definitely result in the worst-case scenario. Therefore, when choosing the optimal path, according to the traffic flow on the channel, driving speed and other factors on the road congestion degree quantification, which can be expressed as unimpeded, general congestion, congestion, and serious congestion, the real-time traffic information collected through the vehicle traveling recorder, the intersection electronic surveillance, and so on can be used to analyze and quantify the traffic conditions.
(2)
Intersection delay time
In the theoretical research, the delay time between nodes are ignored when the optimization algorithm is used to study the optimal path, and the delay time of the subjective judgment section has no effect on the time optimization. In actual traffic, traffic signal (traffic light) is the most obvious time delay for intersection and has great influence on optimization time.
(3)
The impact of road one-way street
In the actual road, the traffic management department will set up a one-way street on some specific roads, while the traditional path optimization methods are both two-way alley at the default node. This optimization mode does not conform to the actual traffic path.


## 3.3. The Intelligent Transportation System Model of IOT

According to the system structure of the IOT and the functional requirements of the intelligent transportation system, the model of intelligent traffic system based on IOT is proposed. The intelligent traffic system is layered to realize the analysis and description of the function and properties of the model.In the perceptual layer, the application of intelligent traffic based on the IOT is built on vehicles, personnel, environment, and other related infrastructure. The information collection is completed by the beacon, the roadmap sensor, and other basic sensing tools. In the network layer, the intelligent traffic system based on IOT emphasizes the sharing and utilization of information, through satellite, computer network, wireless mobile communication, and other related technologies to complete the transmission of traffic information in the network layer. In addition, the storage and processing of information can be provided different information according to different service. The application layer, which can realize the service of adjusting signal lights according to traffic flow and providing traffic information in real time, and carry out different traffic management and control according to different service fields, feedbacks the realization in time and constantly expands more intelligent service functions.In a word, the intelligent traffic system based on the IOT is a network system that realizes the collection, transmission, control, and application of traffic information. With the development of the technology of IOT, the service level of the intelligent transportation system will continue to expand and serve the traveler better.


## 4. Research Scheme of Optimal Path in Urban Network

The urban traffic route map is abstracted as a direction graph. The electric car parking point is compared to the starting point, and the destination is compared to the endpoint. According to the conditions such as path length, traffic signal, and two-way traffic and other conditions, the starting point, the end point, and the intersection are defined as the nodes in the traffic network, and the road between the two nodes is defined as the path between two points. Give weight to these information to determine the degree of traffic congestion, then we find the best path to guide the electric vehicle to the charging pile.The traditional optimal path selection can be divided into the following kinds of problems according to the node, the path characteristic, and the weight value assigned by the path, as shown in Figure5.Figure 5
The classification of the optimal path.


### 4.1. The Dijkstra Algorithm [21]

The Dijkstra algorithm is an algorithm that solves the weights of all paths in network graph greater than zero. At present, the research of this algorithm is more mature, and its biggest disadvantage is that it ignores the characteristic of the independent individuals in the network topology model, so that the algorithm runs for a long time. There is a certain effect on the selection of the optimal path of local small samples; however, its high time complexity has great limitation in the selection of the optimal path in a large scale.Basic implementation steps:The Dijkstra algorithm is an algorithm that solves the weights of all paths greater than zero in network graph and calculates the optimal path in the network which is the shortest path. Taking Figure6 as an example, we briefly introduce the steps to solve the shortest path. Figure 7 is a tree structure of the network structure.Figure 6
Network structure.Figure 7
The tree diagram.The implementation process of the algorithm is as shown in Table1:Table 1
Algorithm implementation process.
Order
V
S
i
di
Optimal path
1
{2,3,4,5}
{1}
3
2
1⟶3
2
{2,4,5}
{1,3}
2
5
1⟶2
3
{4,5}
{1,2,3}
4
8
1⟶3⟶4
4
{5}
{1,2,3,4}
5
15
1⟶2⟶5
(1) SetV: store the optimal path node not found; set S: store the shortest path node found; i represents the node in the set V which is the shortest distance from the set S; di represents the distance of the shortest path. (2) Store point 1 in set S; store the points 2, 3, 4, and 5 in set V. (3) Find the nearest point in set V, that is, point 3; move point 3 from V to S, and get d3=2. (4) Iterate to guide all points to set S. At this point, the shortest distance between point 1 and other points can be obtained.


### 4.2. Heuristic AlgorithmΑ∗

The shortest path problem has many meanings. In the heuristic algorithm, the optimal path selection refers to the functionhn defined on the node of a search tree, which is used to evaluate the optimal selection of the path from this node to the target node. Heuristic is a searching algorithms with the most abundant resource data. Α∗ is a classical heuristic search algorithm, which can effectively find the optimal path in the static road network. The formula (1) is the basis for selecting the lowest cost node:
(1)fn=gn+hn,where fn is the objective function of the optimal path from the starting node to the current node, hn is the price within acceptable estimates, and gn represents the actual path of the initial node to node n.


### 4.3. The Floyd Algorithm

The Floyd algorithm is an algorithm [22] to solve the shortest path between any two points, which can correctly deal with the shortest path problem of the directed graph or negative power (but not the negative power loop), and is also used to compute the transitive closure of the directed graph.When calculating the shortest path of each vertex in graphG=V,E by the Floyd algorithm, two matrices need to be introduced. The element ai,j in matrix S represents the distance from vertex i (i−thvertex) to vertex j (j−thvertex). The element bij in the matrix p represents the vertices of the vertex ito the vertex j after the value recorded by bi,j.Assuming that the number of vertices in graphG is N, then the matrix D and the matrix p need to be updated N times. At first, the distance of vertex a in matrix D is the weight of vertex i to vertex j, and if i and j are not adjacent, then ai,j=0, the value of the matrix p is the value of j of vertex bi,j. The next step is the N times update of the matrix D. In the first update, if the “the distance of ai,j” is greater than “ai,0+a0,j, which represents the distance through the first vertex between i and j,” update ai,j to “ai,0+a0,j” and update bi,j to bi,0. Similarly, when the k-th update, if “the distance of ai,j” is greater than “ai,k−1+ak−1,j,” then update ai,j to “ai,k−1+ak−1,j” and update bi,j to bi,k−1. Iterative operation N times and the program ends.The Floyd algorithm is a kind of exhaustive algorithm. When calculating the shortest path between any two points, the Floyd algorithm needs to calculate the point with connectivity on the way. However, there are many nodes in the urban traffic road network, so the time complexity is high and it is not suitable for this algorithm.


## 4.1. The Dijkstra Algorithm [21]

The Dijkstra algorithm is an algorithm that solves the weights of all paths in network graph greater than zero. At present, the research of this algorithm is more mature, and its biggest disadvantage is that it ignores the characteristic of the independent individuals in the network topology model, so that the algorithm runs for a long time. There is a certain effect on the selection of the optimal path of local small samples; however, its high time complexity has great limitation in the selection of the optimal path in a large scale.Basic implementation steps:The Dijkstra algorithm is an algorithm that solves the weights of all paths greater than zero in network graph and calculates the optimal path in the network which is the shortest path. Taking Figure6 as an example, we briefly introduce the steps to solve the shortest path. Figure 7 is a tree structure of the network structure.Figure 6
Network structure.Figure 7
The tree diagram.The implementation process of the algorithm is as shown in Table1:Table 1
Algorithm implementation process.
Order
V
S
i
di
Optimal path
1
{2,3,4,5}
{1}
3
2
1⟶3
2
{2,4,5}
{1,3}
2
5
1⟶2
3
{4,5}
{1,2,3}
4
8
1⟶3⟶4
4
{5}
{1,2,3,4}
5
15
1⟶2⟶5
(1) SetV: store the optimal path node not found; set S: store the shortest path node found; i represents the node in the set V which is the shortest distance from the set S; di represents the distance of the shortest path. (2) Store point 1 in set S; store the points 2, 3, 4, and 5 in set V. (3) Find the nearest point in set V, that is, point 3; move point 3 from V to S, and get d3=2. (4) Iterate to guide all points to set S. At this point, the shortest distance between point 1 and other points can be obtained.


## 4.2. Heuristic AlgorithmΑ∗

The shortest path problem has many meanings. In the heuristic algorithm, the optimal path selection refers to the functionhn defined on the node of a search tree, which is used to evaluate the optimal selection of the path from this node to the target node. Heuristic is a searching algorithms with the most abundant resource data. Α∗ is a classical heuristic search algorithm, which can effectively find the optimal path in the static road network. The formula (1) is the basis for selecting the lowest cost node:
(1)fn=gn+hn,where fn is the objective function of the optimal path from the starting node to the current node, hn is the price within acceptable estimates, and gn represents the actual path of the initial node to node n.


## 4.3. The Floyd Algorithm

The Floyd algorithm is an algorithm [22] to solve the shortest path between any two points, which can correctly deal with the shortest path problem of the directed graph or negative power (but not the negative power loop), and is also used to compute the transitive closure of the directed graph.When calculating the shortest path of each vertex in graphG=V,E by the Floyd algorithm, two matrices need to be introduced. The element ai,j in matrix S represents the distance from vertex i (i−thvertex) to vertex j (j−thvertex). The element bij in the matrix p represents the vertices of the vertex ito the vertex j after the value recorded by bi,j.Assuming that the number of vertices in graphG is N, then the matrix D and the matrix p need to be updated N times. At first, the distance of vertex a in matrix D is the weight of vertex i to vertex j, and if i and j are not adjacent, then ai,j=0, the value of the matrix p is the value of j of vertex bi,j. The next step is the N times update of the matrix D. In the first update, if the “the distance of ai,j” is greater than “ai,0+a0,j, which represents the distance through the first vertex between i and j,” update ai,j to “ai,0+a0,j” and update bi,j to bi,0. Similarly, when the k-th update, if “the distance of ai,j” is greater than “ai,k−1+ak−1,j,” then update ai,j to “ai,k−1+ak−1,j” and update bi,j to bi,k−1. Iterative operation N times and the program ends.The Floyd algorithm is a kind of exhaustive algorithm. When calculating the shortest path between any two points, the Floyd algorithm needs to calculate the point with connectivity on the way. However, there are many nodes in the urban traffic road network, so the time complexity is high and it is not suitable for this algorithm.


## 5. Research on Optimal Induction Path Based on PSO Algorithm

### 5.1. Optimal Path Calculation Process

When the electric vehicle charging administrator starts the car, the destination information is entered into the vehicle terminal device. The technology of IOT can perceive traffic congestion degree, traffic management information, and other real-time traffic information. The transmission layer transmission network is sent to the data processing center, and the received information is processed and analyzed through the network layer. The most reasonable selection scheme of charging pile and the optimal induction path are calculated, and then the real-time traffic information and system decision scheme are sent to the administrator through the transmission layer to achieve the goal of the optimal induction path. The overall traffic guidance process is shown in Figure8.Figure 8
Traffic guidance flow chart.


### 5.2. Identification of Traffic State

The traffic status of cities can be divided into fluent, basic smooth, mild congestion, moderate congestion, and serious congestion. The selection of the optimal guide path depends on the status of the traffic status of each section and predicts the traffic status of each possible road section.The identification steps of traffic condition include the extraction and selection of traffic features, the classification of traffic status, and the prediction of traffic status. Traffic status recognition is mainly achieved the traffic volume, line length, road saturation, average speed, vehicle density, and other detectable characteristics by sensing equipment. Then we can classify the traffic state based on the traffic characteristics. Finally, according to the real-time traffic data, we can predict the traffic state of the road that may be selected in the near future.


### 5.3. The Calculation of the Optimal Path

According to the purpose of the profit of the shared car managers and the storage of electric vehicles after using, the main content of this research is to use the particle swarm optimization algorithm to select the optimal path from the parking point to the charging pile for the shared car need to be charged.


#### 5.3.1. The Basic Idea of PSO Algorithm

The particle swarm algorithm was proposed by Eberhart, an expert in computational intelligence research in the United States, and Dr. Kennedy, a psychologist research specialist in 1995 [23–25]. The algorithm is a random search algorithm based on the regularity of bird activity and the swarm intelligence. In this algorithm, the bird is regarded as a particle and only retains the bird’s flight function and the group behavior. Therefore, the particles in the algorithm are abstracted into the birds flying at a certain speed and dynamically adjusts according to the flight experience. The position of the particle can be used to represent the solution of the optimization problem, the direction and distance of particle movement can be controlled by velocity, and the pros and cons of each particle can be evaluated by a fitness function.In solving the optimization problem, the particle swarm algorithm assumed that the size of the particle swarm isM and extends to the N-dimensional space, where the particle i is represented as a vector Xi=x1,x2,⋯,xN in the N-dimensional space, and the flight velocity is Vi=v1,v2,⋯,vN. Each particle has a fitness value determined by the objective function and knows the best position (pbest) and the present position of Xithat it has found so far. This can be seen as the particle’s own flight experience. In addition, each particle also knows the best location (gbest) of all particles found in this group so far (gbest is the optimal value in pbest). This can be seen as the experience of the peer group. Particles determine the next movement through their experience and the best experience of their peers. After finding (pbest, gbest) the two optimal values, the particle uses the following formula to update its speed and position.
(2)vijt+1=ωvijt+c1randpij−xijt+c2randpgj−xijt(3)xijt+1=xijt+vijt+1Among them,ω is called the inertia weight, which is the ability to search for new search space of particles, t is the current iteration number, c1 and c2 are the learning factors, c1regulates the individual experience part, c2 regulates the social cognition part and generally sets them to the same value, and rand() is a random number between (0, 1). In each dimension, the particle has a maximum limiting speed Vmax, and if one dimension speed exceeds Vmax, the velocity of this dimension is limited to Vmax. The motion principle of the particles is shown in Figure 9.Figure 9
The principle of particle motion.Its algorithm flow is shown in Figure10.Figure 10
Algorithm flow chart.


#### 5.3.2. Optimal Path Selection Based on Ant Colony Algorithm

The problem of optimal path selection is similar to the law of birds foraging. The shared car docking point is set as the starting point. The destination is that the charging pile is regarded as a food source for birds to find. The shared car need to pass through a section, node from the starting point to the location of the charging pile. In the path selection process, the shared car will choose the desired path according to its own judgment. The whole network is a directed graph, the vehicle is an artificial birds with intelligent behavior, and the artificial birds just find the path from the starting point to the point of termination and does not return to the original start point. Through the abstraction of the traffic process, the actual cost of traffic is taken as the heuristic information, so that an artificial bird swarm system with optimal path selection can be established.In the actual traffic, we should not only consider the length of the path, but also take into account the real-time traffic, the delay time of intersection, and the influence of one-way street. Here we set up the comprehensive cost as the best reference standard. The formula is as follows:(4)Rn=∑i−1ndi⋅λ/1−φiWhereλ represents the cost parameters of the road section and φ indicates the reliability coefficient of the road section.Through experimental simulation, the data of path labelR, marking of starting and ending points, length between starting and ending points (m) are arranged as shown in Table 2. The Dijkstra algorithm, heuristic algorithm A∗, and particle swarm optimization method are used to calculate the optimal path, respectively, in which the cost parameter and the reliability coefficient among the section are calculated according to the actual situation. Assuming that there are 26 nodes in a city and numbered with the number of Arabia digital 1-26, and the distribution of nodes is shown in Figure 11; we should calculate the comprehensive cost of each path, respectively. Here, we use the Dijkstra algorithm, heuristic algorithm, and particle swarm algorithm to obtain the optimal path from node 7 (shared car initial point) to node 22 (shared car charging pile). Their shortest routes are 7⟶8⟶6⟶18⟶19⟶21→22, 7⟶8⟶6⟶18⟶19⟶21⟶22, and 7⟶6⟶18⟶19⟶21⟶22. The details are shown in dashed lines in Figure 12, Figure 13, and Figure 14. The remaining any two nodes can use the same method to solve the optimal path.Table 2
Units for magnetic properties.
(a)
Path labelR
Marking of starting and ending points
Length between starting and ending points (m)
R1
(1,5)
1192
R2
(2,5)
1145
R3
(2,21)
668
R4
(3,25)
242
R5
(4,5)
216
R6
(5,18)
676
R7
(18,6)
842
R8
(18,19)
511
R9
(6,7)
1900
R10
(6,8)
634
R11
(7,8)
639
R12
(8,10)
607
R13
(10,11)
672
R14
(10,9)
255
R15
(8,11)
902
R16
(11,17)
409
R17
(11,12)
675
R18
(11,14)
367
R19
(12,13)
140
R20
(14,15)
622
R21
(14,16)
825
R22
(17,19)
534
R23
(19,21)
695
R24
(19,20)
600
R25
(20,22)
1500
R26
(20,16)
651
(b)
Path labelR
Credibilityφ
Cost coefficientλ
Comprehensive cost
R1
0.92
0.90
136.22
R2
0.88
0.92
126.41
R3
0.72
0.94
175.82
R4
0.87
0.91
28.63
R5
0.91
0.96
18.66
R6
0.84
0.89
96.26
R7
0.93
0.85
50.10
R8
0.87
0.84
55.80
R9
0.91
0.87
148.77
R10
0.91
0.88
76.59
R11
0.93
0.93
41.60
R12
0.74
0.95
149.93
R13
0.68
0.97
208.59
R14
0.69
0.81
64.03
R15
0.74
0.82
192.31
R16
0.68
0.84
109.94
R17
0.86
0.82
77.49
R18
0.93
0.80
20.55
R19
0.93
0.83
8.13
R20
0.93
0.94
40.93
R21
0.92
0.95
62.70
R22
0.93
0.93
34.76
R23
0.87
0.92
83.12
R24
0.94
0.91
32.76
R25
0.94
0.94
84.60
R26
0.93
0.90
41.01Figure 11
Location of each node.Figure 12
Dijkstra algorithm simulation results (dashed line).Figure 13
Heuristic algorithm simulation results (dashed line).Figure 14
Particle swarm optimization algorithm simulation results (dashed line).According to the data of Table3, compared with the heuristic algorithm A∗ and the Dijkstra algorithm, the actual path cost of particle swarm optimization algorithm is the lowest, and there is no deviation from the theoretical path cost. However, the actual path cost of heuristic algorithm A∗, and the Dijkstra algorithm is deviated from the theoretical value, indicating that these two algorithms are prone to fall into local optimization in the process of finding the optimal path. At the same time, because the network constructed by simulation is not large enough, it takes longer to adopt particle swarm optimization algorithm than heuristic algorithm A∗ and Dijkstra.Table 3
Experimental results of the algorithm.
Algorithm class
Actual path consumption
Theory path consumption
Theory path consumption
Time spend
PSO
318.76
318.76
0
0.0586
Dijkstra
349.38
318.76
9.60%
0.0361
A∗
349.38
318.76
9.60%
0.0421The principle of the Dijkstra algorithm is to traverse the whole network, which has obvious advantages when the network size is small. Particle swarm optimization is a heuristic algorithm with simple principle. Particles can conduct current search based on previous search information, which greatly reduces the possibility of blind search. Therefore, with the increase of network construction, the advantage of particle swarm optimization algorithm will become more obvious.Particle swarm optimization is a bionic optimization algorithm based on multiple agents. Therefore, the application of particle swarm optimization algorithm to the optimal path selection process can fully reflect the advantages of the algorithm, and the algorithm itself has great development prospects and research value. By selecting different starting and ending points, this paper uses particle swarm optimization algorithm to find the shortest path and calculates credibility, cost coefficient, and comprehensive cost. The sorting results are shown in Table2.


## 5.1. Optimal Path Calculation Process

When the electric vehicle charging administrator starts the car, the destination information is entered into the vehicle terminal device. The technology of IOT can perceive traffic congestion degree, traffic management information, and other real-time traffic information. The transmission layer transmission network is sent to the data processing center, and the received information is processed and analyzed through the network layer. The most reasonable selection scheme of charging pile and the optimal induction path are calculated, and then the real-time traffic information and system decision scheme are sent to the administrator through the transmission layer to achieve the goal of the optimal induction path. The overall traffic guidance process is shown in Figure8.Figure 8
Traffic guidance flow chart.


## 5.2. Identification of Traffic State

The traffic status of cities can be divided into fluent, basic smooth, mild congestion, moderate congestion, and serious congestion. The selection of the optimal guide path depends on the status of the traffic status of each section and predicts the traffic status of each possible road section.The identification steps of traffic condition include the extraction and selection of traffic features, the classification of traffic status, and the prediction of traffic status. Traffic status recognition is mainly achieved the traffic volume, line length, road saturation, average speed, vehicle density, and other detectable characteristics by sensing equipment. Then we can classify the traffic state based on the traffic characteristics. Finally, according to the real-time traffic data, we can predict the traffic state of the road that may be selected in the near future.


## 5.3. The Calculation of the Optimal Path

According to the purpose of the profit of the shared car managers and the storage of electric vehicles after using, the main content of this research is to use the particle swarm optimization algorithm to select the optimal path from the parking point to the charging pile for the shared car need to be charged.


### 5.3.1. The Basic Idea of PSO Algorithm

The particle swarm algorithm was proposed by Eberhart, an expert in computational intelligence research in the United States, and Dr. Kennedy, a psychologist research specialist in 1995 [23–25]. The algorithm is a random search algorithm based on the regularity of bird activity and the swarm intelligence. In this algorithm, the bird is regarded as a particle and only retains the bird’s flight function and the group behavior. Therefore, the particles in the algorithm are abstracted into the birds flying at a certain speed and dynamically adjusts according to the flight experience. The position of the particle can be used to represent the solution of the optimization problem, the direction and distance of particle movement can be controlled by velocity, and the pros and cons of each particle can be evaluated by a fitness function.In solving the optimization problem, the particle swarm algorithm assumed that the size of the particle swarm isM and extends to the N-dimensional space, where the particle i is represented as a vector Xi=x1,x2,⋯,xN in the N-dimensional space, and the flight velocity is Vi=v1,v2,⋯,vN. Each particle has a fitness value determined by the objective function and knows the best position (pbest) and the present position of Xithat it has found so far. This can be seen as the particle’s own flight experience. In addition, each particle also knows the best location (gbest) of all particles found in this group so far (gbest is the optimal value in pbest). This can be seen as the experience of the peer group. Particles determine the next movement through their experience and the best experience of their peers. After finding (pbest, gbest) the two optimal values, the particle uses the following formula to update its speed and position.
(2)vijt+1=ωvijt+c1randpij−xijt+c2randpgj−xijt(3)xijt+1=xijt+vijt+1Among them,ω is called the inertia weight, which is the ability to search for new search space of particles, t is the current iteration number, c1 and c2 are the learning factors, c1regulates the individual experience part, c2 regulates the social cognition part and generally sets them to the same value, and rand() is a random number between (0, 1). In each dimension, the particle has a maximum limiting speed Vmax, and if one dimension speed exceeds Vmax, the velocity of this dimension is limited to Vmax. The motion principle of the particles is shown in Figure 9.Figure 9
The principle of particle motion.Its algorithm flow is shown in Figure10.Figure 10
Algorithm flow chart.


### 5.3.2. Optimal Path Selection Based on Ant Colony Algorithm

The problem of optimal path selection is similar to the law of birds foraging. The shared car docking point is set as the starting point. The destination is that the charging pile is regarded as a food source for birds to find. The shared car need to pass through a section, node from the starting point to the location of the charging pile. In the path selection process, the shared car will choose the desired path according to its own judgment. The whole network is a directed graph, the vehicle is an artificial birds with intelligent behavior, and the artificial birds just find the path from the starting point to the point of termination and does not return to the original start point. Through the abstraction of the traffic process, the actual cost of traffic is taken as the heuristic information, so that an artificial bird swarm system with optimal path selection can be established.In the actual traffic, we should not only consider the length of the path, but also take into account the real-time traffic, the delay time of intersection, and the influence of one-way street. Here we set up the comprehensive cost as the best reference standard. The formula is as follows:(4)Rn=∑i−1ndi⋅λ/1−φiWhereλ represents the cost parameters of the road section and φ indicates the reliability coefficient of the road section.Through experimental simulation, the data of path labelR, marking of starting and ending points, length between starting and ending points (m) are arranged as shown in Table 2. The Dijkstra algorithm, heuristic algorithm A∗, and particle swarm optimization method are used to calculate the optimal path, respectively, in which the cost parameter and the reliability coefficient among the section are calculated according to the actual situation. Assuming that there are 26 nodes in a city and numbered with the number of Arabia digital 1-26, and the distribution of nodes is shown in Figure 11; we should calculate the comprehensive cost of each path, respectively. Here, we use the Dijkstra algorithm, heuristic algorithm, and particle swarm algorithm to obtain the optimal path from node 7 (shared car initial point) to node 22 (shared car charging pile). Their shortest routes are 7⟶8⟶6⟶18⟶19⟶21→22, 7⟶8⟶6⟶18⟶19⟶21⟶22, and 7⟶6⟶18⟶19⟶21⟶22. The details are shown in dashed lines in Figure 12, Figure 13, and Figure 14. The remaining any two nodes can use the same method to solve the optimal path.Table 2
Units for magnetic properties.
(a)
Path labelR
Marking of starting and ending points
Length between starting and ending points (m)
R1
(1,5)
1192
R2
(2,5)
1145
R3
(2,21)
668
R4
(3,25)
242
R5
(4,5)
216
R6
(5,18)
676
R7
(18,6)
842
R8
(18,19)
511
R9
(6,7)
1900
R10
(6,8)
634
R11
(7,8)
639
R12
(8,10)
607
R13
(10,11)
672
R14
(10,9)
255
R15
(8,11)
902
R16
(11,17)
409
R17
(11,12)
675
R18
(11,14)
367
R19
(12,13)
140
R20
(14,15)
622
R21
(14,16)
825
R22
(17,19)
534
R23
(19,21)
695
R24
(19,20)
600
R25
(20,22)
1500
R26
(20,16)
651
(b)
Path labelR
Credibilityφ
Cost coefficientλ
Comprehensive cost
R1
0.92
0.90
136.22
R2
0.88
0.92
126.41
R3
0.72
0.94
175.82
R4
0.87
0.91
28.63
R5
0.91
0.96
18.66
R6
0.84
0.89
96.26
R7
0.93
0.85
50.10
R8
0.87
0.84
55.80
R9
0.91
0.87
148.77
R10
0.91
0.88
76.59
R11
0.93
0.93
41.60
R12
0.74
0.95
149.93
R13
0.68
0.97
208.59
R14
0.69
0.81
64.03
R15
0.74
0.82
192.31
R16
0.68
0.84
109.94
R17
0.86
0.82
77.49
R18
0.93
0.80
20.55
R19
0.93
0.83
8.13
R20
0.93
0.94
40.93
R21
0.92
0.95
62.70
R22
0.93
0.93
34.76
R23
0.87
0.92
83.12
R24
0.94
0.91
32.76
R25
0.94
0.94
84.60
R26
0.93
0.90
41.01Figure 11
Location of each node.Figure 12
Dijkstra algorithm simulation results (dashed line).Figure 13
Heuristic algorithm simulation results (dashed line).Figure 14
Particle swarm optimization algorithm simulation results (dashed line).According to the data of Table3, compared with the heuristic algorithm A∗ and the Dijkstra algorithm, the actual path cost of particle swarm optimization algorithm is the lowest, and there is no deviation from the theoretical path cost. However, the actual path cost of heuristic algorithm A∗, and the Dijkstra algorithm is deviated from the theoretical value, indicating that these two algorithms are prone to fall into local optimization in the process of finding the optimal path. At the same time, because the network constructed by simulation is not large enough, it takes longer to adopt particle swarm optimization algorithm than heuristic algorithm A∗ and Dijkstra.Table 3
Experimental results of the algorithm.
Algorithm class
Actual path consumption
Theory path consumption
Theory path consumption
Time spend
PSO
318.76
318.76
0
0.0586
Dijkstra
349.38
318.76
9.60%
0.0361
A∗
349.38
318.76
9.60%
0.0421The principle of the Dijkstra algorithm is to traverse the whole network, which has obvious advantages when the network size is small. Particle swarm optimization is a heuristic algorithm with simple principle. Particles can conduct current search based on previous search information, which greatly reduces the possibility of blind search. Therefore, with the increase of network construction, the advantage of particle swarm optimization algorithm will become more obvious.Particle swarm optimization is a bionic optimization algorithm based on multiple agents. Therefore, the application of particle swarm optimization algorithm to the optimal path selection process can fully reflect the advantages of the algorithm, and the algorithm itself has great development prospects and research value. By selecting different starting and ending points, this paper uses particle swarm optimization algorithm to find the shortest path and calculates credibility, cost coefficient, and comprehensive cost. The sorting results are shown in Table2.


## 5.3.1. The Basic Idea of PSO Algorithm

The particle swarm algorithm was proposed by Eberhart, an expert in computational intelligence research in the United States, and Dr. Kennedy, a psychologist research specialist in 1995 [23–25]. The algorithm is a random search algorithm based on the regularity of bird activity and the swarm intelligence. In this algorithm, the bird is regarded as a particle and only retains the bird’s flight function and the group behavior. Therefore, the particles in the algorithm are abstracted into the birds flying at a certain speed and dynamically adjusts according to the flight experience. The position of the particle can be used to represent the solution of the optimization problem, the direction and distance of particle movement can be controlled by velocity, and the pros and cons of each particle can be evaluated by a fitness function.In solving the optimization problem, the particle swarm algorithm assumed that the size of the particle swarm isM and extends to the N-dimensional space, where the particle i is represented as a vector Xi=x1,x2,⋯,xN in the N-dimensional space, and the flight velocity is Vi=v1,v2,⋯,vN. Each particle has a fitness value determined by the objective function and knows the best position (pbest) and the present position of Xithat it has found so far. This can be seen as the particle’s own flight experience. In addition, each particle also knows the best location (gbest) of all particles found in this group so far (gbest is the optimal value in pbest). This can be seen as the experience of the peer group. Particles determine the next movement through their experience and the best experience of their peers. After finding (pbest, gbest) the two optimal values, the particle uses the following formula to update its speed and position.
(2)vijt+1=ωvijt+c1randpij−xijt+c2randpgj−xijt(3)xijt+1=xijt+vijt+1Among them,ω is called the inertia weight, which is the ability to search for new search space of particles, t is the current iteration number, c1 and c2 are the learning factors, c1regulates the individual experience part, c2 regulates the social cognition part and generally sets them to the same value, and rand() is a random number between (0, 1). In each dimension, the particle has a maximum limiting speed Vmax, and if one dimension speed exceeds Vmax, the velocity of this dimension is limited to Vmax. The motion principle of the particles is shown in Figure 9.Figure 9
The principle of particle motion.Its algorithm flow is shown in Figure10.Figure 10
Algorithm flow chart.


## 5.3.2. Optimal Path Selection Based on Ant Colony Algorithm

The problem of optimal path selection is similar to the law of birds foraging. The shared car docking point is set as the starting point. The destination is that the charging pile is regarded as a food source for birds to find. The shared car need to pass through a section, node from the starting point to the location of the charging pile. In the path selection process, the shared car will choose the desired path according to its own judgment. The whole network is a directed graph, the vehicle is an artificial birds with intelligent behavior, and the artificial birds just find the path from the starting point to the point of termination and does not return to the original start point. Through the abstraction of the traffic process, the actual cost of traffic is taken as the heuristic information, so that an artificial bird swarm system with optimal path selection can be established.In the actual traffic, we should not only consider the length of the path, but also take into account the real-time traffic, the delay time of intersection, and the influence of one-way street. Here we set up the comprehensive cost as the best reference standard. The formula is as follows:(4)Rn=∑i−1ndi⋅λ/1−φiWhereλ represents the cost parameters of the road section and φ indicates the reliability coefficient of the road section.Through experimental simulation, the data of path labelR, marking of starting and ending points, length between starting and ending points (m) are arranged as shown in Table 2. The Dijkstra algorithm, heuristic algorithm A∗, and particle swarm optimization method are used to calculate the optimal path, respectively, in which the cost parameter and the reliability coefficient among the section are calculated according to the actual situation. Assuming that there are 26 nodes in a city and numbered with the number of Arabia digital 1-26, and the distribution of nodes is shown in Figure 11; we should calculate the comprehensive cost of each path, respectively. Here, we use the Dijkstra algorithm, heuristic algorithm, and particle swarm algorithm to obtain the optimal path from node 7 (shared car initial point) to node 22 (shared car charging pile). Their shortest routes are 7⟶8⟶6⟶18⟶19⟶21→22, 7⟶8⟶6⟶18⟶19⟶21⟶22, and 7⟶6⟶18⟶19⟶21⟶22. The details are shown in dashed lines in Figure 12, Figure 13, and Figure 14. The remaining any two nodes can use the same method to solve the optimal path.Table 2
Units for magnetic properties.
(a)
Path labelR
Marking of starting and ending points
Length between starting and ending points (m)
R1
(1,5)
1192
R2
(2,5)
1145
R3
(2,21)
668
R4
(3,25)
242
R5
(4,5)
216
R6
(5,18)
676
R7
(18,6)
842
R8
(18,19)
511
R9
(6,7)
1900
R10
(6,8)
634
R11
(7,8)
639
R12
(8,10)
607
R13
(10,11)
672
R14
(10,9)
255
R15
(8,11)
902
R16
(11,17)
409
R17
(11,12)
675
R18
(11,14)
367
R19
(12,13)
140
R20
(14,15)
622
R21
(14,16)
825
R22
(17,19)
534
R23
(19,21)
695
R24
(19,20)
600
R25
(20,22)
1500
R26
(20,16)
651
(b)
Path labelR
Credibilityφ
Cost coefficientλ
Comprehensive cost
R1
0.92
0.90
136.22
R2
0.88
0.92
126.41
R3
0.72
0.94
175.82
R4
0.87
0.91
28.63
R5
0.91
0.96
18.66
R6
0.84
0.89
96.26
R7
0.93
0.85
50.10
R8
0.87
0.84
55.80
R9
0.91
0.87
148.77
R10
0.91
0.88
76.59
R11
0.93
0.93
41.60
R12
0.74
0.95
149.93
R13
0.68
0.97
208.59
R14
0.69
0.81
64.03
R15
0.74
0.82
192.31
R16
0.68
0.84
109.94
R17
0.86
0.82
77.49
R18
0.93
0.80
20.55
R19
0.93
0.83
8.13
R20
0.93
0.94
40.93
R21
0.92
0.95
62.70
R22
0.93
0.93
34.76
R23
0.87
0.92
83.12
R24
0.94
0.91
32.76
R25
0.94
0.94
84.60
R26
0.93
0.90
41.01Figure 11
Location of each node.Figure 12
Dijkstra algorithm simulation results (dashed line).Figure 13
Heuristic algorithm simulation results (dashed line).Figure 14
Particle swarm optimization algorithm simulation results (dashed line).According to the data of Table3, compared with the heuristic algorithm A∗ and the Dijkstra algorithm, the actual path cost of particle swarm optimization algorithm is the lowest, and there is no deviation from the theoretical path cost. However, the actual path cost of heuristic algorithm A∗, and the Dijkstra algorithm is deviated from the theoretical value, indicating that these two algorithms are prone to fall into local optimization in the process of finding the optimal path. At the same time, because the network constructed by simulation is not large enough, it takes longer to adopt particle swarm optimization algorithm than heuristic algorithm A∗ and Dijkstra.Table 3
Experimental results of the algorithm.
Algorithm class
Actual path consumption
Theory path consumption
Theory path consumption
Time spend
PSO
318.76
318.76
0
0.0586
Dijkstra
349.38
318.76
9.60%
0.0361
A∗
349.38
318.76
9.60%
0.0421The principle of the Dijkstra algorithm is to traverse the whole network, which has obvious advantages when the network size is small. Particle swarm optimization is a heuristic algorithm with simple principle. Particles can conduct current search based on previous search information, which greatly reduces the possibility of blind search. Therefore, with the increase of network construction, the advantage of particle swarm optimization algorithm will become more obvious.Particle swarm optimization is a bionic optimization algorithm based on multiple agents. Therefore, the application of particle swarm optimization algorithm to the optimal path selection process can fully reflect the advantages of the algorithm, and the algorithm itself has great development prospects and research value. By selecting different starting and ending points, this paper uses particle swarm optimization algorithm to find the shortest path and calculates credibility, cost coefficient, and comprehensive cost. The sorting results are shown in Table2.



---

*Source: 3714879-2020-04-24.xml*