Qiang Xiao , Guoqing Song and Ziyi WangA Improved A* Algorithm for the Path Planning Problem of Urban Taxi-CarpoolingAbstract: In order to address the issue of taxi carpooling path planning on urban roads, this study suggests an improved A* algorithm and a model based on node weight. The path planning model enables us to implement carpool path planning after carpool passengers, taxi passengers, and taxi drivers have gathered. It uses a vector city traffic road network, city road vector map topology, dynamic road weight functions, node weight tables of the road, and an improved A* algorithm. Our evaluation of the model involves comparing its path planning computation time and total travel time with the traditional A* algorithm using Nanjing taxi trajectory data. The comparison shows that the proposed algorithm significantly outperforms the traditional A* algorithm. Results show that the taxi path planning model proposed in this paper can provide a reference for carpool passengers, taxi passengers, and taxi drivers in choosing a carpool. Keywords: Improved A* Algorithm , Path Planning , Taxi Carpool , Traffic Road Network 1. IntroductionUrban areas are experiencing increased traffic congestion and environmental degradation due to rapid urbanization, which has caused widespread concern. To alleviate urban traffic congestion, many cities have implemented a variety of traffic measures. One such measure is taxi carpooling, which is being used in many cities, including Beijing, Shanghai, and Guangzhou. The waiting time of taxi arrival and the probability problem are worth studying. Research on these topics can provide a reference for establishing rapid and convenient carpooling, increase the carpooling income of city taxi drivers, improve the efficiency of city taxi carpooling, and contribute to alleviating urban congestion and reducing environmental impacts [1]. The path problem is the key problem in vehicle navigation systems. To tackle this problem, several algorithmic strategies have been created. Traditional shortest path algorithms mainly include the Dijkstra algorithm, A* algorithm, Floyd’s algorithm and other extended or improved algorithms. Although these algorithms each have unique benefits, they also exhibit limitations. The Dijkstra algorithm is relatively perfect in application theory and strong practical performance. However, current road traffic is becoming increasingly complicated, leading to slightly low computational efficiency, low applicability and high space and time complexity of the algorithm and preventing path search. At present, the rapid development of artificial intelligence technology, ant colony algorithm, and genetic algorithm provide new ideas for solving the shortest path problem. The new simulated evolutionary ant colony algorithm was proposed by Dorigo. The ant colony algorithm has good parallelism and positive. In the ant colony algorithm, cooperating ants find the shortest path between the nest and the food. The ant colony foraging behavior is similar to the shortest path search problem. Thus, the ant colony algorithm is introduced to search for the shortest path to improve search efficiency and accuracy. Most studies on vehicle path planning use the block method to improve the data reading efficiency and reduce the number of nodes [2-5]. For emergency rescue operations, fire escape, and other unique path planning problems, Rajagopalan and Mehrotra [6] suggested a hierarchical path planning algorithm. Finding high-level abstract graphs is at the heart of the algorithm. The graph’s nodes correspond to pre-estimated risk estimates, the search space is calculated by drastically cutting the path, and the cumulative risk value linked to each node determines the path's quality. In order to increase the efficiency of data reading, Song and Wang [7] employed the block method to decrease the number of nodes for navigation system path planning. Nordbeck and Rystedt [8] proposed the shortest path ellipse algorithm, which considers only the nodes within the ellipse range. The nodes outside the ellipse do not participate in the operation, and the elliptic algorithm can reduce the computation significantly. Hirtle and Jonides [9] proposed a data model for road network decomposition and classification. Car and Frank [10] used the hierarchical strategy to plan paths in large-scale street networks and proved that using a hierarchical structure can lead to finding the fastest path. Sanders and Schultes [11] proposed acceleration techniques for path planning and computed more accurate shortest paths with an inherent hierarchical structure. Goodchild [12] proposed the concept of hierarchical space. Sanders and Schultes [13] introduced the idea of hierarchical network reprocessing to deal with the low computational efficiency of large-scale road networks. In the 1990s, Maniezzo and Colorni [14] developed the ant system. Dorigo and Gambardella [15] solved the problems of low efficiency, local optimal solution and slow convergence of the ant colony algorithm. By comparing the Dijkstra algorithm’s and the ant colony algorithm’s use in a vehicle navigation system from different angles, Dramski [16] was able to ascertain the relative advantages of each algorithm. Cong et al. [17] applied the ant colony algorithm in the path planning problem of freeways and reported the advantage of high-grade road networks in four aspects due to the use of this algorithm. In situations involving taxi path planning, artificial intelligence algorithms like the ant colony, particle swarm, and genetic algorithms have proven useful. However, artificial intelligence algorithms require complex calculations and can easily fall into local optima. As a result, they can theoretically implement path planning and passenger matching for taxis and carpools. However, they are difficult to apply in actual road navigation. Modern navigation apps like Uber, Google Maps, and Baidu Maps plan their routes using the Dijkstra, Floyd, and A* algorithms. When it comes to finding practical and ideal routes across discrete road network topologies, these algorithms demonstrate strong search capabilities [18]. In the current work, given the Dijkstra algorithm, the Floyd algorithm for network topology multi-node network calculation and the disadvantages of high complexities and long operation times, the path planning problem of a selected taxi is solved using the A* algorithm. In urban taxi carpool path planning, the carpool starting position, carpool destination, taxi passenger’s current location, taxi passenger’s destination, location factors of the city road network and dynamic traffic status analysis must be considered [19,20]. According to a vector map structure of an urban road network electronic map, the dynamic road weighting function is combined with the improved A* algorithm to formulate a specialized urban taxi carpool path planning model. The remainder of this paper is organized as follows. Section 2 introduces the urban taxi carpool path planning mode, and the improved A* algorithm model methodology is proposed. Experiments based on taxi dataset are shown in Section 3, and a comparison with conventional A* approaches is provided. The conclusion and future work are presented in the last section. 2. Urban Taxi Carpool Path Planning Model2.1 Urban Road Weight Index Construction2.1.1 Analysis of the influencing factors of urban road dynamic path planning The dynamic planning of urban road path is mainly affected by the following factors. Length of road section: Vehicle travel time in a city is determined by the length of the road between road nodes. The longer the road between nodes, the longer the vehicle travel time. Speed of vehicle: In the city, the travel time is shortened by increased vehicle speed. Likewise, vehicle speed, road vehicle density, travel time, weather, traffic accidents and other related factors affect the travel time. During peak traffic periods, vehicle speed is low, and the running time is long. In addition, road traffic accidents affect vehicle speed. Thus, vehicle speed determines the transport time. Grade of road: Expressways, trunk roads, secondary roads, and branches are the four tiers into which urban road networks are divided. Different road grades have different driving speeds and road widths. Generally speaking, a high road grade corresponds to high vehicle traffic speeds and short travel times. Waiting time at intersections: Traffic lights at intersections regulates vehicular flow to prevent congestion. The frequency of the change in traffic lights is decided by the running time of the vehicle. The vehicle waiting time is long for central city roads and road intersections, and the city road carpool should focus on the effect of traffic lights on path planning. Other factors: In addition to the preceding factors, road construction, temporary traffic control, and major natural disasters affect the running speed of vehicles. However, these factors are not considered in the road resistance function model because of their uncertainty. 2.1.2 Urban road weight model The analysis of the factors that affect vehicle speed shows that the planning of urban road path is mainly affected by the length of the road between nodes, the speed of vehicles on the road, the grade of the road, and the traffic lights, and the establishment of the road weight model is shown in Formula (1):
[TeX:] $$W_{i j}$$ represents the weight value between the nodes on the road, [TeX:] $$L_{i j}$$ represents the length of the road between nodes i and j, [TeX:] $$G_{i j}$$ is the grade of road between the nodes i and j, [TeX:] $$V_{i j}$$ is the average speed of the vehicle between the nodes i and j, and [TeX:] $$T_{i j}$$ is the average waiting time at traffic lights between the nodes i and j. Parameters [TeX:] $$\alpha, \beta, \gamma, \eta$$ represent the weights of the different influencing factors. Definition: The smaller the [TeX:] $$W_{i j}$$ value, the better the vehicle passing ability, and the larger the [TeX:] $$W_{i j}$$ value, the worse the vehicle passing ability. Therefore, carpooling path planning does not take the traditional distance and time as the basic path planning index. Instead, the path weight, which we compute using the road dynamic traffic information through the road weight function, is taken as the path planning index to achieve the path planning of the urban taxi after the carpool. 2.1.3 Determination of road index weight Subjective, objective, and combination weighting are the primary methods used in the current process of determining the weight of indicators. However, the complex systems engineering required to determine index weights for urban traffic segments makes it vulnerable to subjective elements like experience, policy, and environment [21,22]. Furthermore, it is challenging to quantify the weights of the indicators using the aforementioned method for determining the weights of the indicators because human thought is inherently ambiguous and uncertain. To prevent the influence of subjective factors in determining the index weight, the entropy method is employed in this study. To determine index weights, the entropy method assesses system-intrinsic factors and their interactions. If the information entropy is small, which indicates that the variation degree index value is large, more information is provided and its weight is larger. On the contrary, if the information entropy is large, the variation degree index value is small, the amount of information available is low, and its weight is small. The index weight is determined by assessing the variation in the index value, and the concrete calculation process is as follows: Data standardization The definitions of the four road indices: [TeX:] $$X_1$$ is the road length, [TeX:] $$X_2$$ is the vehicle average speed in road, [TeX:] $$X_3$$ is road grade, and [TeX:] $$X_4$$ is the traffic light waiting time at the intersection. [TeX:] $$X_1=\left\{l_{11}, l_{12} \cdots l_{n m}\right\}, X_2=\left\{v_{11}, v_{12} \cdots v_{n m}\right\}, X_3=\left\{g_{11}, g_{12} \cdots g_{n m}\right\}, X_4=\left\{t_{11}, t_{12} \cdots t_{n m}\right\},$$ we establish the road weight index matrix [TeX:] $$R_{i j} .$$
(2)[TeX:] $$R_{i j}=\left[\begin{array}{llll} l_{11} & v_{11} & g_{11} & t_{11} \\ l_{12} & v_{12} & g_{12} & t_{12} \\ & \ldots & & \\ l_{n m} & v_{n m} & g_{n m} & t_{n m} \end{array}\right]=\left[\begin{array}{llll} x_{11} & x_{21} & x_{31} & x_{41} \\ x_{12} & x_{22} & x_{32} & x_{42} \\ & \ldots & & \\ x_{1 m} & x_{2 m} & x_{3 m} & x_{4 m} \end{array}\right] .$$In the standardized processing of each index in matrix [TeX:] $$R_{i j}$$, we obtain the road index weight matrix [TeX:] $$\tilde{R}_{i j} .$$
(3)[TeX:] $$\tilde{R}_{i j}=\left[\begin{array}{cccc} y_{11} & y_{21} & y_{31} & y_{41} \\ y_{12} & y_{22} & y_{32} & y_{42} \\ & \ldots & & \\ y_{1 m} & y_{2 m} & y_{3 m} & y_{4 m} \end{array}\right] \text {. }$$In Formula (3), [TeX:] $$y_{i j}=\frac{\max x_{i j}-x_{i j}}{\max x_{i j}-\min x_{i j}}, 1 \leq i \leq 4,1 \leq j \leq m .$$ Solving the entropy weight of index According to the definition of entropy in information theory, the index entropy can be expressed by Formula (4).
In Formula (4), [TeX:] $$p_{i j}=\frac{y_{i j}}{\sum_{j=1}^m y_{i j}} \text {, when } p_{i j}=0, \ln p_{i j}$$ is meaningless, thus [TeX:] $$p_{i j} \ln p_{i j}=0 .$$ The weight coefficient of each index was determined The entropy of each index calculated using the information entropy Formula (4), is [TeX:] $$E_1, E_2, E_3, E_4,$$ and the weight coefficient of each index is calculated using Formula (5):
For [TeX:] $$\alpha=f_1, \beta=f_2, \gamma=f_3, \eta=f_4,$$ the weights of urban roads are calculated using Formula (6):
2.2 Improved A* Algorithm Model2.2.1 A* algorithm model A* algorithm is a fast search method for shortest path in static road networks. As a heuristic algorithm, it primarily employs the A* heuristic function, f(n)=g(n)+h(n) to estimate and solve the shortest path [23,24]. f(n) represents the estimated distance from state n to the destination, g(n) represents the actual distance from the initial state to the state n, and h(n) represents the optimal path distance estimation from state n to destination, the algorithm flow chart is shown in Fig. 1. A) Initialize the OPEN table and store starting point S in OPEN. B) Create the CLOSE table, which is initially empty. C) Determine whether the OPEN table is empty and exit when it is empty. If not empty, select the OPEN table of the node deleted and stored in the CLOSE table. If the selected point is the target point, exit E, otherwise, select and calculate the adjacent node set V of the node g(v). D) Determine whether the node is in the OPEN table, and update the G in the node V if it is in the OPEN table, and as a new parent node. If the node is not in the OPEN table, then judge whether it is in the CLOSE, if not in the CLOSE table, then put the node set V into the OPEN table, and calculate the estimated value of the node, and return to C. If the node is in the CLOSE table, update its G value in the new node V, remove it from the CLOSE table, add it to the OPEN table, expand it, and return to C. E) Sort the last remaining nodes in the OPEN table, and determine the shortest path. The flow chart of the A* algorithm illustrates that the algorithm relies on the A* heuristic function estimation. However, the process shows that the A* algorithm usually estimates the distance between the target point and the point of state using the Euclidean distance. As a result, a large number of pointless nodes are examined and searched, increasing the algorithm's execution time. Additionally, the repeated traversal of the OPEN table further increases the search time. In this study, an improved A* algorithm based on the weight table query between nodes is proposed to achieve the effective path search, in conjunction with the features of carpool path planning. 2.2.2 Improved A* algorithm based on inter node weight matrix To eliminate the repeated traversal issue in the A* algorithm’s search process, the A* algorithm based on the weight table query between the link nodes is proposed, that is, the evaluation value of the A* heuristic function is substituted with the weight table between queried nodes. To decrease computation and search time and increase path search efficiency, we can assess the weights of the initial state to the state point and the state point to the target point. 1) Weight matrix between any two nodes Definition: G=(V,E,W) represents a directed topological network structure in urban road networks, [TeX:] $$V=\{1,2, \cdots n\}$$ represents the set of nodes in a graph, [TeX:] $$E \subseteq V \times V$$ denotes the edge set of the directed topological graph, and W denotes the weight of the directed edges between the nodes i and j. We construct the direct weight matrix (L) of the directed topological graph.
(7)[TeX:] $$L= \begin{cases}w_{i j} & \left(v_i, v_j\right) \in E, i \neq j \\ 0 & \left(v_i, v_j\right) \in E, i=j \\ \infty & \left(v_i, v_j\right) \notin E\end{cases}$$L denotes the direct weight matrix between the nodes of the directed graph, and [TeX:] $$w_{ij}$$ denotes the weight between nodes i and j. If [TeX:] $$v_i \text { and } v_j$$ are adjacent nodes, the weight is [TeX:] $$w_{ij}$$ If the [TeX:] $$v_i \text { and } v_j$$ are the same nodes, the weight is 0. If the [TeX:] $$v_i \text { and } v_j$$ are non-adjacent nodes, the weights are infinite. Definition operation rules: · ⊕ operation rules
The objects of the operation are the two sets [TeX:] $$L_1 \text { and } L_2$$, which are both elements of the set of matrices n×m. This means that [TeX:] $$L_1 \text { and } L_2$$ can be seen as a matrix of numbers in n rows and m columns. The operator symbol is ⊕, and this symbol here represents a specific operation rule, not the traditional addition, subtraction, or multiplication. The result of this operation is another set, [TeX:] $$L_3,$$, which also belongs to the set of n×m matrices. Operation rule: For each corresponding element x(i,j) and y(i,j) in the two sets [TeX:] $$L_1 \text { and } L_2$$, the result of operation ⊕ is to take the smaller value of the two elements, that is, the corresponding element z(i,j) in the set [TeX:] $$L_3,$$ is equal to min(x(i,j),y(i,j)). · ⊗ operation rules
(11)[TeX:] $$\vee L_1 \in L^{n \times m}, L_2 \in L^{m \times s}, L_1 \otimes L_2=L_3 \in L^{n \times s}$$
z(i,j) means that the weight of the road is calculated, and each corresponding element x(i,j) and y(i,j) in the two sets [TeX:] $$L_1 \text { and } L_2$$ is multiplied first, and then the minimum value is taken according to the ⊕ operation rule. · Power operation rule
· The direct weight matrix realizes the minimum weight matrix between any two points by k steps, and obtains the shortest weight matrix [TeX:] $$L_k.$$ After k iteration, the Formula (17) is obtained:
· Any two nodes weight matrix L is defined by Formula (18):
[TeX:] $$L_k$$ represents the shortest weight matrix between any two nodes in a directed graph and is stored in the database as the result of direct query in the heuristic function evaluation of the improved A* algorithm. 2) Improved A* algorithm flow Based on node weights, the results of the weight matrix table query between linked nodes are used in the improved A* algorithm to replace the estimated value of the A* heuristic function. The improved algorithm reduces the A* algorithm’s search time and increases path efficiency. The flow chart for the algorithm is displayed in Fig. 2, and the particular steps are as follows: A) Determine the starting and end points. Starting point S is stored in OPEN, while the CLOSE table is established. B) Determine whether the OPEN table is empty. If it is empty, then quit to I. C) Save the new nodes in the OPEN table into the CLOSE table. D) Determine whether the OPEN table contains the target node. If it does, then go to H; otherwise, go to the next step. E) If a neighbor node exists in the CLOSE table, go to the next step; otherwise, quit to I. F) Establish neighbor node set V. The node weight matrix table is called, and the corresponding results of [TeX:] $$g\left(v_1\right), g\left(v_2\right), \ldots, g\left(v_n\right) \text { and } h\left(v_1\right), h\left(v_2\right), \ldots, h\left(v_n\right)$$ in adjacent nodes are searched. G) Calculate adjacent node [TeX:] $$f\left(v_1\right), i=1,2, \ldots, n .$$ Store the node corresponding to the min[TeX:] $$f\left(v_1\right),$$ which is a new parent node, and store it in the OPEN table. Then, go B. H) Sort the nodes in the OPEN table and determine the path. I) End of search. 2.2.3 Comparative analysis of two algorithms 1) The two algorithms differ in the calculation method and search efficiency of the heuristic function estimate. The core principle of the A* algorithm is to evaluate paths based on the A* heuristic function. The heuristic function f(n) in the A* algorithm typically has two parts, g(n) and h(n), where g(n) is the actual distance between the initial state and state n and h(n) is the optimal path estimated distance between state n and the target state. During the search process, the A* algorithm must calculate the estimated value from each node to the target node, which usually involves calculating the Euclidean distance. Since nodes in the OPEN table must be traversed and evaluated multiple times, the A* algorithm can exhibit prolonged search times when dealing with a large number of nodes. The improved A* algorithm avoids the repeated computations and node traversals that are present in the A* algorithm’s search procedure. The improved A* algorithm uses the query result of the weight matrix table between the nodes to replace the estimate of the A-inspired function. By calculating and storing the weight matrix between any two nodes beforehand, the improved A* algorithm eliminates the need to calculate Euclidian distance and repeatedly traverse nodes by allowing the weight matrix table to be directly queried during the search process to determine the weight value between nodes. This improvement improves the search efficiency. 2) The difference between the two algorithms in terms of operational efficiency. Throughout the search process, A* algorithm must determine the estimate from each node to the target node and repeatedly iterate and update the nodes in the OPEN table. When working with a large number of nodes, the A* algorithm may display prolonged search times due to the use of Euclidean distance calculations and repeated node traversals, which results in decreased efficiency. In contrast, the improved A* algorithm replaces the estimate of the A*inspired function by using the result of the query of the weight matrix table between the nodes, which avoids the calculation of Euclidean distance and repeated traversal of nodes. This improvement enables the improved A* algorithm to find the optimal path faster in the search process, thus improving the operation efficiency. Therefore, the improved A* algorithm is typically more advantageous than the A* algorithm in situations where the shortest path needs to be found quickly. 3. Experimental Analysis3.1 Experimental DataIn this study, the experimental data for the city taxi in Nanjing on September 16, 2014 after the arrival of the carpool passengers, passengers can carpool taxi matching scheme, as shown in Fig. 3. Fig. 3 illustrates that P1 and P2 are the starting point and destination of the carpool, respectively. The following taxi numbers are available for carpooling close to P1: 1, 2, 7, 10, 16, 18, 20, 24, 26, and 30. The taxi at destination P2 annex is the destination of the taxi driving near the P1 point. From the point of view of distribution, taxi No.10, No.16, and No. 24 are relatively far away from the destination of P2, and we think the travelling destination near the two taxi and carpool passengers; Taxis at each point are relatively close to the P2 destination, and we think that the taxi and carpool passengers have the same purpose. In order to implement carpool path planning, we use the MAPINFO software to digitize the coordinate system and the urban road in Nanjing in Fig. 3, as illustrated in Fig. 4. Fig. 4 shows that ★ represents the destination and destination of the carpool passenger, and ▲ taxi’s driving point at the P1 annex and the destination of the taxi driving near P2. The thickness of a line in a graph indicates the grade of a road, that is, the thicker the line is, the higher the grade of the road is, and the thinner the line is, the lower the grade of the road is. Taxis 1 to 133 in the figure correspond to road segment node numbers. According to the function of the table in the MAPINFO database, the table structure is established, and the type and range of the related fields are defined, as shown in Table 1. Table 1. Urban road database table
Table 1 presents a city road database table that details various road attributes. The columns in Table 1 are defined as follows: route number indicates the number of each road; road grade indicates the grade of the road, such as the main road and secondary road; origin indicates the area or place where the road starts; destination indicates the area or place where the road ends; distance indicates the distance between the start point and the end point; two way road indicates a two-way road; average speed indicates the average speed of vehicles traveling on this road; and waiting time for traffic lights specifies the average time vehicles spend waiting at traffic lights. 3.2 Experimental ParametersTable 1 shows that the MAPINFO database table stores the following data: road number, road grade, road length, and road signal waiting time. Using these parameters and the entropy weight method to determine the parameters of the road weight model, we can obtain road weight Formula (19):
The road weight data of the urban road is calculated, and the weight matrix table between any nodes is established, as shown in Table 2. Table 2 illustrates the weights between any two nodes, with the weight value signifying the strength of the relationship between nodes. By analyzing these weights, we can evaluate nodal connectivity strength and enable the identification of critical nodal junctions or optimal pathways in transportation networks. Due to space limitations, the weight relationship between some nodes is not listed. Therefore, Table 2 uses ellipsis to mark (...). The weights of each node that arrives at its destination can be queried from Table 2. Based on the weights, we can determine the optimal path. This table is used as the basis for improving the A* algorithm to select the intermediate segment in the segment estimation process, and is called directly by the A* algorithm through the database query. Table 2. Weight table between any two nodes of road
3.3 Experimental Result Analysis3.3.1 Quantitative comparison of algorithm efficiency When determining the shortest path between the starting and end points, the traditional A* algorithm and other extended A* algorithms (like the bidirectional A* algorithm, multi-level landmark based A* algorithm, etc.) mainly consider distance. These algorithms will also look into and search some useless nodes during the calculation, which will make the algorithm run too long. Road segment length, vehicle speed within road nodes, road grade, and traffic light impact are the factors that the algorithm presented in this paper uses to create a road weight function. This function generates road weight values, which are stored in a database. In the improved A* algorithm, the road weight value of the sorted nodes can be directly sorted to obtain the optimal path and reduce the running time of the algorithm. In the experiment, we randomly selected five sets of data on the destination to destination distance in the map: 1 km, 3 km, 6 km, 10 km, and 15 km. Based on this data, we use algorithm A* and improved A* algorithm for path planning. Table 3. Time-consuming comparison table of A* algorithm and improved A* algorithm
To compare the A* algorithm with the proposed algorithm, the effectiveness of the proposed algorithm is verified using VB6.0 to write two algorithms. We conduct experimental verification in the WINXP system on a 3.1 GHZ main frequency, 2.9 GB memory platform. Table 3 demonstrates that the improved A* algorithm exhibits shorter computation times than the traditional A* algorithm. This is due to the fact that the traditional A* algorithm usually calculates the Euclidean distance between the target point and the current state. The traditional A* algorithm inspects and searches for many useless nodes, thereby extending the run time. To show the contrast effect clearly, a time-consuming contrast diagram between A* algorithm and improved A* algorithm is established, as shown in Fig. 5. The path planning and travel time of five groups of experimental data are computed using the traditional A* algorithm and the improved A* algorithm, respectively, based on the length of road nodes, the traffic light waiting time, and the average driving speed of vehicles in Table 1. Since the traditional A* algorithm relies solely on distance for path calculations, whereas the improved A* algorithm incorporates comprehensive road weights. It can be seen from Table 4 that the improved A* algorithm is superior to the traditional A* algorithm in travel time. Especially in the upper distance travel, the improved A* algorithm is obviously superior to the traditional A* algorithm. Table 4. Travel time comparison of A* algorithm and improved A* algorithm
3.3.2 Empirical comparison of algorithms By comparing the A* algorithm and the improved A* algorithm under the same test environment and conditions, the improved A* algorithm is superior to the traditional A* algorithm in computing efficiency and time dimension, which proves the effectiveness of the proposed algorithm in considering time cost. In order to further verify the practical applicability of the proposed algorithm, this paper selected the No. 2 taxi from the experimental data, and used the two algorithms to plan and calculate the combined route, and obtained the calculation results as shown in Fig. 6. The variations in route selection between the two algorithms are shown in Fig. 6. According to the road vector diagram, the driving path of the traditional A* algorithm can be seen as follows: 55→53→54→126→127→108→109→34→33→32→31→24→9→6, the driving distance is 5.045 km, and the driving time is about 24 minutes. The driving path of the improved A* algorithm is: 55→53→54→126→127→108→109→34→38→28→23→12→9→6, the driving distance is 5.667 km, and the driving time is about 21 minutes. In terms of time cost, the algorithm proposed in this paper is superior to the traditional A* algorithm, because the traditional A* algorithm only considers the shortest path in the path planning process, and does not consider the actual situation of the road. The algorithm proposed in this paper no longer takes the distance or time as the basic path planning index. Instead, the dynamic road traffic information obtained in real time in the city, such as road length, vehicle speed on node roads, road grade and traffic lights in the road, is calculated by the road weight function and its road weight value is used as the path planning index to realize the path re-planning after the city taxis share the ride. Therefore, the improved A* algorithm turns out to be more efficient in terms of both time efficiency and practical application. 5. ConclusionThe network topology of urban roads is constructed by the layer method, an electronic map is established, and the urban road network database is constructed. We calculated the road weights of the data on the road network database using the road weighting function, combined the improved A* algorithm to determine the weight table between nodes and achieved a carpool path planning. Using VB6.0 and MAPINFO, we created the urban taxi ride path planning simulation experiment platform based on the improved A* algorithm model. According to the simulation results, the suggested algorithm can be a useful guide for taxi drivers and carpool passengers when it comes to planning the best routes. Future studies will further optimize the road weight index and offer a useful reference for carpooling passengers by combining the findings of this study with other factors that affect taxi carpooling, such as cost, distance, load balance between passengers, etc., to investigate the application of multi-objective optimization (e.g., time and cost) or combined objective function. FundingThis paper is supported by the National Natural Science Foundation of China (Grant No. 52062026 and 52162041) and Educational Commission of Gansu Province of China (Grant No. 2019A-041) and Double-First Class Major Research Programs, Educational Department of Gansu Province (No. GSSYLXM-04) and top Talent Program for Basic Research of Lanzhou Jiaotong University (No. 2022JC56). BiographyQiang Xiaohttps://orcid.org/0000-0002-6696-7041He received M.S. degrees in School of electronic information and electrical engineering from Lanzhou Jiaotong University in 2007, and Ph.D. degree in School of Traffic and Transportation from Lanzhou Jiaotong University in 2017. He is currently a professor in School of Economics and Management, Lanzhou Jiaotong University, Gansu, China. His research interests include data mining and data analysis. BiographyBiographyReferences
|