# Improved AND/OR Tree Search Algorithm in Analysis of Stochastic and Time-Dependent Shortest Path Problem

Authors: Zhi-ying Xie; Yuan-Rong He; Yuan-tong Jiang; Chih-Cheng Chen
Journal: Scientific Programming
 (2021)

---

## Abstract

Real-time vehicle guidance effectively reduces traffic jams and improves the operational efficiency of urban transportation. The trip time on a route is considered as a random process that changes with time, and the shortest path selection requires a random dynamic model and the solution of a decision-making problem. Thus, the shortest trip time is the criterion to determine the dynamic path selection by a random dynamic programming (DP) model which discretizes the trip times in the continuous segments on the route. In this study, a numerical model of random dynamic programming is established by using a probability tree model and an AND/OR (AO∗) algorithm to select the path of the shortest trip time. The results show that the branches of the probability tree are only accumulated on the “quantity” and do not cause a “qualitative” change. The inefficient accumulation of “quantity” affects the efficiency of the algorithm, so it is important to separate the accumulation of “quantity” from node expansion. The accumulation of “quantity” changes the trip time according to the entering time into a segment, which demands an improved AO∗ algorithm. The new AO∗ algorithm balances between efficiency and the trip time and provides the optimal real-time vehicle guidance on the road.


---

## Body

## 1. Introduction

Vehicle-to-everything (V2X) and Internet of Things (IoT) collect a large amount of observation data of traffic from multisource sensors and devices and require big data technology [1–4]. The collected data may be used to provide the optimal path for vehicles, especially unmanned vehicles. In unmanned driving, dynamic path planning is required in two aspects: global path planning [5] and obstacle avoidance [6]. The algorithms of obstacle avoidance in path planning [7–9] and global path planning [10–12] are attracting considerable interest. However, the randomness of the traffic data from the variable traffic network environment complicates the algorithms, which still need more research than before.The trip time in a segment of a vehicle path is regarded as a time-dependent random variable, and its probability distribution depends on the entering time of a vehicle to the road segment [13]. Thus, the problem to obtain the shortest time of the vehicle’s trip in the segment is the shortest path problem of a stochastic time-dependence (STD) network. Hall [14] stated that a label setting (LS) or a label correcting (LC) algorithm was not suitable for the shortest path as Bellman’s optimality principle does not hold randomness [15].The optimal path selection is not a simple shortest path problem, but an adaptive decision-making problem with time. The adaptive decision-making problem cannot be solved by a fixed shortest path method. The optimal path selection strategy from a starting to the next target node considers the time to move between them. The path selection is not only needed from the starting node but from each decision point (intersection) to reach the target node in the shortest time. The optimal path must be selected to have the shortest trip time to the target node or intersection, and the subsequent selection will be no longer affected by the previous selection process. For this type of decision-making, dynamic programming is regarded to be appropriate. Thus, a problem of stochastic and time-dependent shortest path (STDSP) requires a model of dynamic programming.This study aims to suggest an AND/OR (AO∗) algorithm to solve an STDSP problem in finding the optimal path with the shortest trip time between nodes or intersections. The complexity of the shortest path problem in an STD network was analyzed by using a probability tree diagram and a first in first out (FIFO) algorithm based on the nonsatisfaction and nonuniqueness of the trip times. Then, a model of stochastic dynamic programming for dynamic path selection was applied to the estimation of the minimum trip times. Based on the heuristic function and the two-point discretization of the trip time between segments (between nodes or intersections), an AO∗ algorithm, a heuristic search algorithm was proposed to solve the STDSP problem by using the STD programming model with the consideration of the balances between the efficiency and the optimal trip. With the results, the STDSP problem was defined with the analysis of the complexity of the STDSP problem. Then, the algorithm was validated with real-time observation data. Finally, the proposed AO∗ algorithm was improved again for suggesting the final algorithm.


## 2. Theoretical Background

Bellman’s optimality principle is used to find the shortest path between any of the two nodes in a network and applied to a static shortest path algorithm. When the trip time between the nodes is constant, that is, the path is time-independent, an efficient labeling algorithm solves the shortest path problem. Wu et al. demonstrated [16] that the Bellman optimal principle in the static network is also applicable to the STD and FIFO networks. In the FIFO network, the algorithm of the shortest path in the static network can be used for solving the shortest path in a dynamic network. Thus, LS or LC algorithms solve such shortest path problems. When a trip time is regarded as a random variable with a known probability distribution with the objective function, the random shortest path problem is transformed into a deterministic one for obtaining a desired shortest path. However, a random trip time can be obtained by an efficient labeling algorithm by solving the expected shortest path problem [17]. The shortest time is obtained as the solution of an objective function of the path between nodes, which does not consider the random characteristics of the network [18].In the actual traffic, the minimum trip time, as well as the minimum risk, is considered [19]. Therefore, the minimum expectation-mean square error [20] and α-reliable path problem need to be considered [21]. The path objective function of the minimum expectation-mean-square error path is a linear combination of the expected value and the mean square error. Thus, the proportional coefficient of the linear combination needs an artificial setting that is arbitrary and cannot uniformly explain the path selection.Dynamic programming is appropriate for multistage decision-making problems. Steinmetz et al. [22] modeled a dynamic path selection as a Markov decision process (MDP) and believed that each segment on the road corresponded to blocking and nonblocking. When the current state of each segment is known, an intersection to pass is selected. Hall [14] suggested the use of dynamic programming to solve the time-dependent path selection and proposed the algorithm that combined a k-shortest path and a branch and bound method. This algorithm had low operating efficiency and could not satisfy the requirement in real time. When Wu et al. [16] summarized the rules for solving STDP problems using the LC algorithm which had randomness. They believed that replacing the definite value with the expected value of a random variable allowed similar results to the definite situation by assuming consistency. However, the assumption is not applicable in the actual transportation network as the real situation has randomness.Fu and Rilett [23] regarded a random time-dependence problem of the pate selection by Hall [14] to be a continuous random process. They transformed the time-dependence problem into an extreme value problem to estimate the trip time on the path. Based on the trip time and its variance in each segment, a series of probability-based approximation models (PAMs) were established by using the k-shortest path. Then, a heuristic algorithm was used to solve the STDSP problem. Fu [24] proposed an adaptive strategy and used dynamic programming for the PAM. However, his adaptive LC algorithm did not adopt the nondifferentiability of the extreme value problem in the use of Rosenblueth’s two-point estimation.Global path planning is based on an algorithm of optimal path selection which is divided into intelligent and graph search algorithms. Graph search algorithms [10] include Dijkstra’s algorithm and A∗ algorithm. As an A∗ algorithm uses heuristic estimation, it reduces the amount of search, improves efficiency, and guarantees the optimality of the path. However, the efficiency is lower in a complex environment of a large scale. Intelligent algorithm [11, 12] simulates the biological evolution and biomimetic nature of insect foraging and nesting, mainly including genetic algorithm, ant colony algorithm, particle swarm optimization, etc. This is appropriate for solving and optimizing complex problems by having the characteristics of potential parallelism but has slow operation speed and premature solution and does not consider randomness and time dependence.Previous studies proposed good solutions for the shortest path problem with randomness but not for the problems of time dependence. A problem of randomness with time dependence requires a different approach to obtain the solution. Therefore, this study aims to find a solution to the trip time and path selection by considering the random processes that change with time, that is, time-dependent. Thus, the shortest path problem is considered as a segmented decision-making problem by using dynamic programming.


## 3. Problem Descriptions

The real-time navigation of a vehicle requires planning an optimal path from the current to the target position (node) based on real-time information. By updating the trip times in each segment, the guidance strategy shows the shortest path with an appropriate algorithm. When the strategy does not consider the variability of a driving route, it only proposes a suboptimal path. Variability is solved with dynamic programming that decomposes a complex problem into a series of simple problems. The optimal path of a route is obtained by decomposed into segments between the nearest two nodes. For the shortest path problem of the nodes, the principle of stochastic dynamic programming is considered for dynamic path selection.


### 3.1. Definition of STDSP

The real-time navigation of a vehicle requires planning an optimal path from the current to the target position (node) based on real-time information. By updating the trip times in each segment, the guidance strategy shows the shortest path with an appropriate algorithm. When the strategy does not consider the variability of a driving route, it only proposes a suboptimal path. Variability is solved with dynamic programming that decomposes a complex problem into a series of simple problems. The optimal path of a route is obtained by decomposed into segments between the nearest two nodes. For the shortest path problem of the nodes, the principle of stochastic dynamic programming is considered for dynamic path selection.The traffic network is a spatiotemporal network. The spatiotemporal network is expressed as(1)GT=VT,AT,where VT=i,t|i∈V,t∈T and AT=i,t,j,t+τijt|i,j∈V,t,t+τijt∈T.Here,i,t refers to a point of (space, time). The defined GT does not have a closed-loop and avoids a cyclic search. When the successor node is defined as Γi,t, the next node is Γ−1i,t. Xat represents the trip time in a segment at time t, andμat, σat, respectively, represent the expectation and variance at time t. fXatx represents a probability density function.There are three possible directions at the intersections: going straight, turning left, and turning right. The signal control system develops from the point control of “single point fixed cycle” to the direction of line control and surface control. The signal cycle of intersection will be adjusted according to the traffic flow. Due to its complexity, most intersections are still controlled by point control in reality, so this article only studies the situation that the signal cycle does not change.The problem is represented by the average of past historical data asdijt which means the delay of intersection with the next node j on node i at time t. Then, the strategy of the path selection problem is defined as(2)p:VT⟶V,pi,t∈Γi,t.It is a mapping strategy from the node of a spatiotemporal network to the node of a nontemporal network. Whennk is the k-th node to arrive, and its corresponding arrival time is tk, then nk+1,tk+1=pnk,tk. ((nk, tk), (nk+1, tk+1)) is random due to the randomness of the trip time of tk+1 to node nk+1. It can be used as a predicted value of the time to reach nk+1 and from node nk.


### 3.2. The Complexity Caused by the Branch of Probability

Since the trip times on a route are random, the time to reach a certain node is uncertain. Thus, total trip time is decomposed into several arrival times with the probability of different shortest paths.Figure1 shows an example. If the departure time from node 1 is 0, the probability to reach node 2 at t = 10 and t = 45 is 0.5, respectively. There are five routes from node 1 to node 6 to choose from. The probability to reach node 6 at t = 25 and t = 60 is 0.5, respectively, and the expected trip time is 42.5 s.Figure 1
An STD net.Path (1, 2, 3, 6) is the same as path (1, 2, 4, 6) but has a different probability and expected trip time of 57.5. The expected trip times of path (1, 3, 6), path (1, 3, 2, 4, 6), and path (1, 5, 6) are 95, 75, and 70, respectively. The paths are not the optimal trip from node 1 to node 6. The trip from node 1 att = 0 to node 2 at t = 10, node 3 at t = 15, and node 6 at t = 20 sequentially has the probability of 0.5. For some reason, when the trip reaches node 2 at t = 45 due to the entry time limit on the road section (3, 6) and changes its path to node 4 at t = 50 and then to node 6 at t = 60, the probability is also 0.5 and the expected trip time from node 1 to node 6 is 40. This path has the shortest time, but it is not the same as the path in the static state that is expressed as a path (1, 2, 3,6|4,6).In this case, the search process of the shortest path from node 1 to node 6 can be resolved by using an AND/OR tree. The decomposition needs to define the state representation of the problem. The problem has two types of states. One is the state when it reaches a certain node, and the other is the selection state when starting from a certain node. The two types of states alternately make a pair. The decomposition process of the original problem is shown in Figure2. The numbers in gray and white ellipses represent (node, arrival time) and (node, arrival tine, next node). The search process starting from node 1 at time 0 includes the subprocesses to nodes 2, 3, and 5, which requires “OR” node. Starting from node 1 to node 2 at time 0, due to the randomness, there are two arrival times to node 2. When there is the shortest path from node 2 to node 6, it is indicated with a certain probability, and the shortest trip time from node 1 to node 6 can be calculated. In this case, this process needs an AND node, and the trip time is the sum of that between the previous nodes. Through AND/OR tree decomposition, every feasible path from node 1 to node 6 can be found, and the optimal path by dynamic path selection at node 2 can also be found by a thick line in Figure 2.Figure 2
STD AND/OR graph decomposition of the shortest path problem.In decomposing the STD shortest path, the AND nodes are not appearing in the static shortest path problem. If dynamic path selection is not performed at node 2, the optimal route is (1,2,4,6), and the estimated trip time is 42.5 that is longer than that of the optimal path (1,2,3,6|4,6) with the trip time of 40. This shows that the STD problem is complicated due to time correlation although the estimated trip time is used as the optimal evaluation criterion.


### 3.3. FIFO Complexity Caused by Unsatisfactory Conditions

Kaufman and Smith [16] defined the FIFO condition when solving the time-dependent shortest path, that is, for any (i, j) ∈ A, s + dij(s) ≤ t + dij(t) for all s, t ∈ T, when s ≤ t is always true. As long as the FIFO conditions are met, efficient labeling algorithms solve the shortest time-dependent path problem.Since the time-dependent trip time of the (2,3) section does not meet the FIFO condition (2 + 4 is not less than 3 + 2), the shortest path trip time is 6 if the Dijkstra algorithm is used (Figure3). However, the trip from nodes 1 to 3 has the shortest trip time of 5, which means that nodes 1 to 2 are not the shortest path. This does not conform to the Bellman optimality principle. When the FIFO condition is met (Figure 3(a)), the Bellman optimality principle is also satisfied. Miller-Hooks and Mahmassani [17] extended the FIFO condition with the time-dependency and defined it as(3)∀i,j∈Α,Probs+τijs≤t+τijt=1,∀s≤t,where τijt is the trip time on i,j. This implies that the STD network with an independent trip time is calculated with the assumption of consistency between the paths.Figure 3
Time-dependent dynamic network. (a) FIFO definition. (b) Non-FIFO definition.
(a)(b)In Figure4(b), since the trip time of (2,3) section does not meet the extended FIFO condition, the expected shortest path from nodes 1 to 3 at time 0 is 5, and its route is ((1,0), (2,3)&&(2,4), (3,5)); the expected shortest path from nodes 1 to 2 at time 0 is 2.5, and its route is ((1,0), (2, 2)&&(2,3)). The shortest path from nodes 1 to 2 is inconsistent with that from nodes 1 to 3, which means that the expected trip time is not simply equal to the expected trip time. The situation that does not meet the definition of the extended FIFO is common in STD networks. Thus, it is unreasonable that the non-FIFO section of the shortest path is excluded.Figure 4
Simple random time-dependent net. (a) Meet the definition of extended FIFO. (b) Non-FIFO definition.
(a)(b)


## 3.1. Definition of STDSP

The real-time navigation of a vehicle requires planning an optimal path from the current to the target position (node) based on real-time information. By updating the trip times in each segment, the guidance strategy shows the shortest path with an appropriate algorithm. When the strategy does not consider the variability of a driving route, it only proposes a suboptimal path. Variability is solved with dynamic programming that decomposes a complex problem into a series of simple problems. The optimal path of a route is obtained by decomposed into segments between the nearest two nodes. For the shortest path problem of the nodes, the principle of stochastic dynamic programming is considered for dynamic path selection.The traffic network is a spatiotemporal network. The spatiotemporal network is expressed as(1)GT=VT,AT,where VT=i,t|i∈V,t∈T and AT=i,t,j,t+τijt|i,j∈V,t,t+τijt∈T.Here,i,t refers to a point of (space, time). The defined GT does not have a closed-loop and avoids a cyclic search. When the successor node is defined as Γi,t, the next node is Γ−1i,t. Xat represents the trip time in a segment at time t, andμat, σat, respectively, represent the expectation and variance at time t. fXatx represents a probability density function.There are three possible directions at the intersections: going straight, turning left, and turning right. The signal control system develops from the point control of “single point fixed cycle” to the direction of line control and surface control. The signal cycle of intersection will be adjusted according to the traffic flow. Due to its complexity, most intersections are still controlled by point control in reality, so this article only studies the situation that the signal cycle does not change.The problem is represented by the average of past historical data asdijt which means the delay of intersection with the next node j on node i at time t. Then, the strategy of the path selection problem is defined as(2)p:VT⟶V,pi,t∈Γi,t.It is a mapping strategy from the node of a spatiotemporal network to the node of a nontemporal network. Whennk is the k-th node to arrive, and its corresponding arrival time is tk, then nk+1,tk+1=pnk,tk. ((nk, tk), (nk+1, tk+1)) is random due to the randomness of the trip time of tk+1 to node nk+1. It can be used as a predicted value of the time to reach nk+1 and from node nk.


## 3.2. The Complexity Caused by the Branch of Probability

Since the trip times on a route are random, the time to reach a certain node is uncertain. Thus, total trip time is decomposed into several arrival times with the probability of different shortest paths.Figure1 shows an example. If the departure time from node 1 is 0, the probability to reach node 2 at t = 10 and t = 45 is 0.5, respectively. There are five routes from node 1 to node 6 to choose from. The probability to reach node 6 at t = 25 and t = 60 is 0.5, respectively, and the expected trip time is 42.5 s.Figure 1
An STD net.Path (1, 2, 3, 6) is the same as path (1, 2, 4, 6) but has a different probability and expected trip time of 57.5. The expected trip times of path (1, 3, 6), path (1, 3, 2, 4, 6), and path (1, 5, 6) are 95, 75, and 70, respectively. The paths are not the optimal trip from node 1 to node 6. The trip from node 1 att = 0 to node 2 at t = 10, node 3 at t = 15, and node 6 at t = 20 sequentially has the probability of 0.5. For some reason, when the trip reaches node 2 at t = 45 due to the entry time limit on the road section (3, 6) and changes its path to node 4 at t = 50 and then to node 6 at t = 60, the probability is also 0.5 and the expected trip time from node 1 to node 6 is 40. This path has the shortest time, but it is not the same as the path in the static state that is expressed as a path (1, 2, 3,6|4,6).In this case, the search process of the shortest path from node 1 to node 6 can be resolved by using an AND/OR tree. The decomposition needs to define the state representation of the problem. The problem has two types of states. One is the state when it reaches a certain node, and the other is the selection state when starting from a certain node. The two types of states alternately make a pair. The decomposition process of the original problem is shown in Figure2. The numbers in gray and white ellipses represent (node, arrival time) and (node, arrival tine, next node). The search process starting from node 1 at time 0 includes the subprocesses to nodes 2, 3, and 5, which requires “OR” node. Starting from node 1 to node 2 at time 0, due to the randomness, there are two arrival times to node 2. When there is the shortest path from node 2 to node 6, it is indicated with a certain probability, and the shortest trip time from node 1 to node 6 can be calculated. In this case, this process needs an AND node, and the trip time is the sum of that between the previous nodes. Through AND/OR tree decomposition, every feasible path from node 1 to node 6 can be found, and the optimal path by dynamic path selection at node 2 can also be found by a thick line in Figure 2.Figure 2
STD AND/OR graph decomposition of the shortest path problem.In decomposing the STD shortest path, the AND nodes are not appearing in the static shortest path problem. If dynamic path selection is not performed at node 2, the optimal route is (1,2,4,6), and the estimated trip time is 42.5 that is longer than that of the optimal path (1,2,3,6|4,6) with the trip time of 40. This shows that the STD problem is complicated due to time correlation although the estimated trip time is used as the optimal evaluation criterion.


## 3.3. FIFO Complexity Caused by Unsatisfactory Conditions

Kaufman and Smith [16] defined the FIFO condition when solving the time-dependent shortest path, that is, for any (i, j) ∈ A, s + dij(s) ≤ t + dij(t) for all s, t ∈ T, when s ≤ t is always true. As long as the FIFO conditions are met, efficient labeling algorithms solve the shortest time-dependent path problem.Since the time-dependent trip time of the (2,3) section does not meet the FIFO condition (2 + 4 is not less than 3 + 2), the shortest path trip time is 6 if the Dijkstra algorithm is used (Figure3). However, the trip from nodes 1 to 3 has the shortest trip time of 5, which means that nodes 1 to 2 are not the shortest path. This does not conform to the Bellman optimality principle. When the FIFO condition is met (Figure 3(a)), the Bellman optimality principle is also satisfied. Miller-Hooks and Mahmassani [17] extended the FIFO condition with the time-dependency and defined it as(3)∀i,j∈Α,Probs+τijs≤t+τijt=1,∀s≤t,where τijt is the trip time on i,j. This implies that the STD network with an independent trip time is calculated with the assumption of consistency between the paths.Figure 3
Time-dependent dynamic network. (a) FIFO definition. (b) Non-FIFO definition.
(a)(b)In Figure4(b), since the trip time of (2,3) section does not meet the extended FIFO condition, the expected shortest path from nodes 1 to 3 at time 0 is 5, and its route is ((1,0), (2,3)&&(2,4), (3,5)); the expected shortest path from nodes 1 to 2 at time 0 is 2.5, and its route is ((1,0), (2, 2)&&(2,3)). The shortest path from nodes 1 to 2 is inconsistent with that from nodes 1 to 3, which means that the expected trip time is not simply equal to the expected trip time. The situation that does not meet the definition of the extended FIFO is common in STD networks. Thus, it is unreasonable that the non-FIFO section of the shortest path is excluded.Figure 4
Simple random time-dependent net. (a) Meet the definition of extended FIFO. (b) Non-FIFO definition.
(a)(b)


## 4. Dynamic Programming Model and AO∗ Algorithm

### 4.1. Dynamic Programming Model

An optimal strategyp∗i,t∈Γi,t of the path from a node to the target node in the shortest trip time is described as follows:(4)p∗i,t∈argminμat+v∗j,t+dijt+Xat+dijt|∀a=i,t,j,t+dijt+Xatandj,t+dijt+Xat∈Γi,t,where v∗i,t is the shortest trip time t from nodes i to d at time t. Then,(5)v∗i,t=EYit,(6)Yit=minv∗j,t+dijt+Xat+Xat+dijt|∀a=i,t,j,t+dijt+Xatandj,t+dijt+Xat∈Γi,t,with boundary conditions v∗d,⋅=0, the recursive process of dynamic programming is used to solve equations (5) and (6). However, obtaining the random variable is difficult as the extreme function. Yit has at least one random variable. The statistics F(y) is defined as(7)FYity=1−1−FXa1ty1−FXa2ty⋯1−FXaΓi,tty,where Γi,t represents the out-degree of the spatiotemporal node (i, t). Although the trip time in each independent segment follows an asymptotically normal distribution [25], the random variables do not meet the requirements of independent and identical distribution:(8)EYit=∫−∞+∞ydFYity.By equation (8), it is very difficult to solve EYit. Fu [24], based on Rosenblueth's two-point estimation method, calculates the expectation and variance of random variable function from the expectation and variance of random variable, so as to effectively avoid solving the distribution of random variable function. However, the correctness of the equation is questionable as the extreme values were not differentiable, and Rosenblueth used a series to expand and approximate the first few terms for approximation. As we do not assume the dependence of road trip time on time, the time of entering a segment does not have to be considered for recursing. This study starts from the Rosenblueth two-point estimation method [26] to study the discrete method of solving EYit.


### 4.2. Numerical Stochastic Dynamic Programming Model

The density of the random variableX is defined as the function fXx and the random variable Z = h(X), a function of the random variable. The two-point estimation method uses the probability of two points to express fXx, and the probability of these two points meets the first three moments of fXx. EZk,k=1,2, is calculated from two discrete values if Z=hX1,X2,…,Xn is a function of n random variables. Then, EZk,k=1,2, is calculated from 2n discrete values.Figure5 depicts the typical situation of a route selection when the vehicle is at node (i, t). At the node, there are three possibilities to move to the next node: going straight, turning left, and turning right.Figure 5
Dynamic path choice at node (i, t).WhenYikt is defined as the loop variable with the minimum value of Yit and the number of loops of k, equation (6) is written as follows:(9)Yi1t=v∗j1,t+τij1+Xij1t+dij1t+dij1t,(10)Yikt=minYik−1t,v∗jk,t+τijk+Xijkt+dijkt+dijkt,k=2,...,Γi,t.The expected calculation corresponding to equations (9) and (10) is then(11)vk∗i,t=EYikt=EminYik−1t,v∗jk,t+τijk+Xijkt+dijkt+dijkt=minvk−1∗i,t,v∗jk,t+τijk+EXijkt+dijkt+dijkt,k=2,…,Γi,t,(12)v1∗i,t=EYi1t=v∗j1,t+τij1+EXij1t+dij1t+dij1t.The trip time of the shortest path from nodesi to d at time t is calculated as(13)v∗i,t=EYit=vΓi,t∗i,t.Equations (10) and (11) describe the reverse recursive process of dynamic programming. In the dynamic path selection, the trip time in a segment Xat is calculated in a continuous random process. The time t changes continuously, and thus the unrestricted boundary condition v∗d,⋅=0 to determine that t has the arbitrariness of the time during the recursion. However, this reverse recursion does not meet the requirement in this study. Thus, the sequential recursive process is adopted.However, if the trip time in a segment is calculated by a heuristic function instead ofv∗jk,t+τijk, a sequential recursive process for the path can be obtained from equation (11). If the appropriate heuristic function is used, the optimal path for the search can be determined. Then, when the boundary conditions are reached, v∗jk,t+τijk is deduced along the path, and then v∗i,t is deduced inversely.Rosenblueth’s two-point estimation method discretizes the continuous distribution of random variableZ into a simple two-point distribution and is expressed as(14)p1=PZ=μZ−σZ=12,p2=PZ=μZ−σZ=12,where μZ is the expectation and σZ is the standard deviation.The trip timeXat of a segment is discretized into a simple two-point distribution using Rosenblueth’s two-point estimation method. That is,(15)p1=PXat=μXat+σXat=12,p2=PXat=μXat−σXat=12,where hj,t represents the heuristic trip time in the segment of (j, t) with the probability of 0.5. See(16)ci,t,j=μXijt+dijt+dijt.Equation (11) is discretized as(17)vk∗i,t=minvk−1∗i,t,ci,t,jk+12∑m=1,2hjk,t+ci,t,jk+−1m⋅σXijkt+dijkt,k=2,…,Γi,t.Similarly, equation (11) is discretized as(18)v1∗i,t=EYi1t=ci,t,j1+12∑m=1,2hj1,t+ci,t,j1+−1m⋅σXij1t+dij1t.Equations (17) and (18) with boundary condition v∗d,⋅=0 constitute a numerical model of stochastic dynamic programming. The solutions of equations (10) and (11) need the selection of heuristic trip times that are modified when the boundary conditions are reached. Dynamic programming is not an algorithm [27], but a modeling method. Based on the heuristic trip time, the AO∗ algorithm is effective for solving the random dynamic programming models.


### 4.3. AO∗ Algorithm

With the complexity of the STD shortest path problem, an AND/OR tree is used to decompose its solution process. The AND/OR tree inversely calculates the trip time from a precursor node to a successor node in a dynamic programming model that uses equations (17) and (18). The AO∗ algorithm accompanies an AND/OR graph search in artificial intelligence. Bander and White [28] first applied the algorithm to a nonstatic random shortest path problem and constructed a solution graph. The result was appropriate for a dynamic selection model, as the path was not a single one but a hyperpath. Different path options are decided by the time of entering into a segment.


#### 4.3.1. Graph Heuristic Search and Agreement with AND/OR Graph

The heuristic search algorithm for AND/OR graphs was formally named AO∗ by Nilsson in 1980 [28]. Whether a node on the AND/OR graph is solved is determined by its successor nodes. An “AND” node becomes solvable only when all its successor nodes are solvable. An “OR” node is solvable when one of the successor nodes is solvable. In the growth process of the graph as the search process, nodes are continuously added to the AND/OR graph. The generated graph is denoted as GT′ and then GT′⊆GT. The demarking process is a retrospective recursive process in which the precursor nodes are solvable by the solvable successor nodes. These are used repeatedly in the search process of the AND/OR graph until a node is marked as a solvable or unsolvable node.The result of the heuristic search of the AND/OR graph finds the optimal solution graph with the least cost (shortest time). For the AND/OR graph, the nodes that are expected to be part of the optimal solution graph for expansion must be selected. The AND/OR graph with the solvable successor and their precursor nodes is called the hope graph (potential solution graph). In the search process, as new nodes join, the trip time is constantly changing. Therefore, the graph is also constantly changing with the constant graph of heuristic search.The total cost (time) of the heuristic search of the AND/OR graph is obtained by calculating the trip time in the graph. Withci,t,j, the trip time from a node (i, t) to a successor node (j, tj), the trip time is calculated as follows:(1)
If the node (i, t) is the target (successor) node, its trip time is a function fi,t=0.(2)
If the node (i, t) is an AND node, its trip time is a function as follows:(19)fi,t=∑k=1Γi,tcci,t,jk+fjk,tjk,jk,tjk∈Γi,t.(3)
If the node (i,t) is an OR node, its trip time is a function as follows:(20)fi,t=minci,t,jk+fjk,tjk,jk,tjk∈Γi,t.(4)
If (i, t) is not scalable and it is not the target node; then, its trip time is defined as fi,t=∞.The trip time of the precursor node is deduced from that of the successor node. Thus, with the optimal solution graph, the trip times from successor nodes to the precursor node are obtained, which is repeated layer by layer, and finally, the starting node can be found. This process solves equations (17) and (18).


#### 4.3.2. Algorithm

With the random variables of the trip time in continuous segments by using the Rosenblueth two-point estimation method, the solution of the random dynamic programming model is regarded as the search process of the AND/OR graph. The flowchart of the AO∗ algorithm is shown in Figure 6. It includes two processes: generating the successor nodes and the reverse correction of the trip time.Figure 6
Heuristic AND/OR graph search flowchart. (a) General flowchart. (b) Node expansion process. (c) Reverse correction process.
(a)(b)(c)In the algorithm,qi,t represents the trip time from a node (i, t). hi,t represents the heuristic function of the node (i, t). We use the Euclidean distance from a node (i, t) to the target successor node and the maximum free flow velocity in each segment. When the flow speed is zero at the starting node (i, t),(21)hi,t=Disti,du0.Meuleau et al. [29] proved that the AO∗ algorithm must be able to terminate on the optimal solution when the heuristic function calculates the shorter trip time than the real trip time and there is an optimal solution. As the heuristic function in this study satisfies this condition, the optimal decision p∗i,t∈Γi,t at the node (i, t) is found by the AO∗ algorithm, which presents the path of the shortest trip time from nodes s to d.The AO∗ algorithm does not allow loops in the search process. Finding the following successor nodes requires operating on the nodes that are not the precursors. Due to the monotonicity of time, there is no possibility of loops in the spatiotemporal traffic network GT. The heuristic search does not find all nodes on GT but those in the optimal path. The search is processed based upon heuristic information, so the algorithm is efficient in finding the optimal path.


### 4.4. Improving AO∗ Algorithm

Since the increased number of successor nodes affects the efficiency of the algorithm, the probability tree diagram is necessary to consider during the search process. When the variance of the trip times in segments is not large, the conditional probability has little effect on the final optimal path selection. In some segments, the past trip times are almost constant. In this case, the conditional probability does not affect significantly. When the variance becomes large, the conditional probability of the branches is considered, which simplifies the process significantly with a less number of nodes and the improvement of the efficiency of the algorithm. Figure7 shows diagrams on how to judge for expanding the nodes increasing the number of nodes) based on the variance of trip times. The branch in Figure 7(a) has the multilevel expansion of the nodes, while that in Figure 7(b) limits the expansion. In each node (circle), the trip times and the variance of them are shown. Figure 7(b) shows that limiting the expansion only needs the nodes with either the longest or the shortest trip time with the estimated trip time unchanged when compared to Figure 7(a) that has the expansion of the odes. Based on this result, the flowchart in Figure 6 is modified and shown in Figure 8.Figure 7
Judging the node expansion diagram based on the variance and trip time. (a) Multilevel expansion of the nodes. (b) Limiting the expansion.
(a)(b)Figure 8
The flowchart for the limited expansion search process.


## 4.1. Dynamic Programming Model

An optimal strategyp∗i,t∈Γi,t of the path from a node to the target node in the shortest trip time is described as follows:(4)p∗i,t∈argminμat+v∗j,t+dijt+Xat+dijt|∀a=i,t,j,t+dijt+Xatandj,t+dijt+Xat∈Γi,t,where v∗i,t is the shortest trip time t from nodes i to d at time t. Then,(5)v∗i,t=EYit,(6)Yit=minv∗j,t+dijt+Xat+Xat+dijt|∀a=i,t,j,t+dijt+Xatandj,t+dijt+Xat∈Γi,t,with boundary conditions v∗d,⋅=0, the recursive process of dynamic programming is used to solve equations (5) and (6). However, obtaining the random variable is difficult as the extreme function. Yit has at least one random variable. The statistics F(y) is defined as(7)FYity=1−1−FXa1ty1−FXa2ty⋯1−FXaΓi,tty,where Γi,t represents the out-degree of the spatiotemporal node (i, t). Although the trip time in each independent segment follows an asymptotically normal distribution [25], the random variables do not meet the requirements of independent and identical distribution:(8)EYit=∫−∞+∞ydFYity.By equation (8), it is very difficult to solve EYit. Fu [24], based on Rosenblueth's two-point estimation method, calculates the expectation and variance of random variable function from the expectation and variance of random variable, so as to effectively avoid solving the distribution of random variable function. However, the correctness of the equation is questionable as the extreme values were not differentiable, and Rosenblueth used a series to expand and approximate the first few terms for approximation. As we do not assume the dependence of road trip time on time, the time of entering a segment does not have to be considered for recursing. This study starts from the Rosenblueth two-point estimation method [26] to study the discrete method of solving EYit.


## 4.2. Numerical Stochastic Dynamic Programming Model

The density of the random variableX is defined as the function fXx and the random variable Z = h(X), a function of the random variable. The two-point estimation method uses the probability of two points to express fXx, and the probability of these two points meets the first three moments of fXx. EZk,k=1,2, is calculated from two discrete values if Z=hX1,X2,…,Xn is a function of n random variables. Then, EZk,k=1,2, is calculated from 2n discrete values.Figure5 depicts the typical situation of a route selection when the vehicle is at node (i, t). At the node, there are three possibilities to move to the next node: going straight, turning left, and turning right.Figure 5
Dynamic path choice at node (i, t).WhenYikt is defined as the loop variable with the minimum value of Yit and the number of loops of k, equation (6) is written as follows:(9)Yi1t=v∗j1,t+τij1+Xij1t+dij1t+dij1t,(10)Yikt=minYik−1t,v∗jk,t+τijk+Xijkt+dijkt+dijkt,k=2,...,Γi,t.The expected calculation corresponding to equations (9) and (10) is then(11)vk∗i,t=EYikt=EminYik−1t,v∗jk,t+τijk+Xijkt+dijkt+dijkt=minvk−1∗i,t,v∗jk,t+τijk+EXijkt+dijkt+dijkt,k=2,…,Γi,t,(12)v1∗i,t=EYi1t=v∗j1,t+τij1+EXij1t+dij1t+dij1t.The trip time of the shortest path from nodesi to d at time t is calculated as(13)v∗i,t=EYit=vΓi,t∗i,t.Equations (10) and (11) describe the reverse recursive process of dynamic programming. In the dynamic path selection, the trip time in a segment Xat is calculated in a continuous random process. The time t changes continuously, and thus the unrestricted boundary condition v∗d,⋅=0 to determine that t has the arbitrariness of the time during the recursion. However, this reverse recursion does not meet the requirement in this study. Thus, the sequential recursive process is adopted.However, if the trip time in a segment is calculated by a heuristic function instead ofv∗jk,t+τijk, a sequential recursive process for the path can be obtained from equation (11). If the appropriate heuristic function is used, the optimal path for the search can be determined. Then, when the boundary conditions are reached, v∗jk,t+τijk is deduced along the path, and then v∗i,t is deduced inversely.Rosenblueth’s two-point estimation method discretizes the continuous distribution of random variableZ into a simple two-point distribution and is expressed as(14)p1=PZ=μZ−σZ=12,p2=PZ=μZ−σZ=12,where μZ is the expectation and σZ is the standard deviation.The trip timeXat of a segment is discretized into a simple two-point distribution using Rosenblueth’s two-point estimation method. That is,(15)p1=PXat=μXat+σXat=12,p2=PXat=μXat−σXat=12,where hj,t represents the heuristic trip time in the segment of (j, t) with the probability of 0.5. See(16)ci,t,j=μXijt+dijt+dijt.Equation (11) is discretized as(17)vk∗i,t=minvk−1∗i,t,ci,t,jk+12∑m=1,2hjk,t+ci,t,jk+−1m⋅σXijkt+dijkt,k=2,…,Γi,t.Similarly, equation (11) is discretized as(18)v1∗i,t=EYi1t=ci,t,j1+12∑m=1,2hj1,t+ci,t,j1+−1m⋅σXij1t+dij1t.Equations (17) and (18) with boundary condition v∗d,⋅=0 constitute a numerical model of stochastic dynamic programming. The solutions of equations (10) and (11) need the selection of heuristic trip times that are modified when the boundary conditions are reached. Dynamic programming is not an algorithm [27], but a modeling method. Based on the heuristic trip time, the AO∗ algorithm is effective for solving the random dynamic programming models.


## 4.3. AO∗ Algorithm

With the complexity of the STD shortest path problem, an AND/OR tree is used to decompose its solution process. The AND/OR tree inversely calculates the trip time from a precursor node to a successor node in a dynamic programming model that uses equations (17) and (18). The AO∗ algorithm accompanies an AND/OR graph search in artificial intelligence. Bander and White [28] first applied the algorithm to a nonstatic random shortest path problem and constructed a solution graph. The result was appropriate for a dynamic selection model, as the path was not a single one but a hyperpath. Different path options are decided by the time of entering into a segment.


### 4.3.1. Graph Heuristic Search and Agreement with AND/OR Graph

The heuristic search algorithm for AND/OR graphs was formally named AO∗ by Nilsson in 1980 [28]. Whether a node on the AND/OR graph is solved is determined by its successor nodes. An “AND” node becomes solvable only when all its successor nodes are solvable. An “OR” node is solvable when one of the successor nodes is solvable. In the growth process of the graph as the search process, nodes are continuously added to the AND/OR graph. The generated graph is denoted as GT′ and then GT′⊆GT. The demarking process is a retrospective recursive process in which the precursor nodes are solvable by the solvable successor nodes. These are used repeatedly in the search process of the AND/OR graph until a node is marked as a solvable or unsolvable node.The result of the heuristic search of the AND/OR graph finds the optimal solution graph with the least cost (shortest time). For the AND/OR graph, the nodes that are expected to be part of the optimal solution graph for expansion must be selected. The AND/OR graph with the solvable successor and their precursor nodes is called the hope graph (potential solution graph). In the search process, as new nodes join, the trip time is constantly changing. Therefore, the graph is also constantly changing with the constant graph of heuristic search.The total cost (time) of the heuristic search of the AND/OR graph is obtained by calculating the trip time in the graph. Withci,t,j, the trip time from a node (i, t) to a successor node (j, tj), the trip time is calculated as follows:(1)
If the node (i, t) is the target (successor) node, its trip time is a function fi,t=0.(2)
If the node (i, t) is an AND node, its trip time is a function as follows:(19)fi,t=∑k=1Γi,tcci,t,jk+fjk,tjk,jk,tjk∈Γi,t.(3)
If the node (i,t) is an OR node, its trip time is a function as follows:(20)fi,t=minci,t,jk+fjk,tjk,jk,tjk∈Γi,t.(4)
If (i, t) is not scalable and it is not the target node; then, its trip time is defined as fi,t=∞.The trip time of the precursor node is deduced from that of the successor node. Thus, with the optimal solution graph, the trip times from successor nodes to the precursor node are obtained, which is repeated layer by layer, and finally, the starting node can be found. This process solves equations (17) and (18).


### 4.3.2. Algorithm

With the random variables of the trip time in continuous segments by using the Rosenblueth two-point estimation method, the solution of the random dynamic programming model is regarded as the search process of the AND/OR graph. The flowchart of the AO∗ algorithm is shown in Figure 6. It includes two processes: generating the successor nodes and the reverse correction of the trip time.Figure 6
Heuristic AND/OR graph search flowchart. (a) General flowchart. (b) Node expansion process. (c) Reverse correction process.
(a)(b)(c)In the algorithm,qi,t represents the trip time from a node (i, t). hi,t represents the heuristic function of the node (i, t). We use the Euclidean distance from a node (i, t) to the target successor node and the maximum free flow velocity in each segment. When the flow speed is zero at the starting node (i, t),(21)hi,t=Disti,du0.Meuleau et al. [29] proved that the AO∗ algorithm must be able to terminate on the optimal solution when the heuristic function calculates the shorter trip time than the real trip time and there is an optimal solution. As the heuristic function in this study satisfies this condition, the optimal decision p∗i,t∈Γi,t at the node (i, t) is found by the AO∗ algorithm, which presents the path of the shortest trip time from nodes s to d.The AO∗ algorithm does not allow loops in the search process. Finding the following successor nodes requires operating on the nodes that are not the precursors. Due to the monotonicity of time, there is no possibility of loops in the spatiotemporal traffic network GT. The heuristic search does not find all nodes on GT but those in the optimal path. The search is processed based upon heuristic information, so the algorithm is efficient in finding the optimal path.


## 4.3.1. Graph Heuristic Search and Agreement with AND/OR Graph

The heuristic search algorithm for AND/OR graphs was formally named AO∗ by Nilsson in 1980 [28]. Whether a node on the AND/OR graph is solved is determined by its successor nodes. An “AND” node becomes solvable only when all its successor nodes are solvable. An “OR” node is solvable when one of the successor nodes is solvable. In the growth process of the graph as the search process, nodes are continuously added to the AND/OR graph. The generated graph is denoted as GT′ and then GT′⊆GT. The demarking process is a retrospective recursive process in which the precursor nodes are solvable by the solvable successor nodes. These are used repeatedly in the search process of the AND/OR graph until a node is marked as a solvable or unsolvable node.The result of the heuristic search of the AND/OR graph finds the optimal solution graph with the least cost (shortest time). For the AND/OR graph, the nodes that are expected to be part of the optimal solution graph for expansion must be selected. The AND/OR graph with the solvable successor and their precursor nodes is called the hope graph (potential solution graph). In the search process, as new nodes join, the trip time is constantly changing. Therefore, the graph is also constantly changing with the constant graph of heuristic search.The total cost (time) of the heuristic search of the AND/OR graph is obtained by calculating the trip time in the graph. Withci,t,j, the trip time from a node (i, t) to a successor node (j, tj), the trip time is calculated as follows:(1)
If the node (i, t) is the target (successor) node, its trip time is a function fi,t=0.(2)
If the node (i, t) is an AND node, its trip time is a function as follows:(19)fi,t=∑k=1Γi,tcci,t,jk+fjk,tjk,jk,tjk∈Γi,t.(3)
If the node (i,t) is an OR node, its trip time is a function as follows:(20)fi,t=minci,t,jk+fjk,tjk,jk,tjk∈Γi,t.(4)
If (i, t) is not scalable and it is not the target node; then, its trip time is defined as fi,t=∞.The trip time of the precursor node is deduced from that of the successor node. Thus, with the optimal solution graph, the trip times from successor nodes to the precursor node are obtained, which is repeated layer by layer, and finally, the starting node can be found. This process solves equations (17) and (18).


## 4.3.2. Algorithm

With the random variables of the trip time in continuous segments by using the Rosenblueth two-point estimation method, the solution of the random dynamic programming model is regarded as the search process of the AND/OR graph. The flowchart of the AO∗ algorithm is shown in Figure 6. It includes two processes: generating the successor nodes and the reverse correction of the trip time.Figure 6
Heuristic AND/OR graph search flowchart. (a) General flowchart. (b) Node expansion process. (c) Reverse correction process.
(a)(b)(c)In the algorithm,qi,t represents the trip time from a node (i, t). hi,t represents the heuristic function of the node (i, t). We use the Euclidean distance from a node (i, t) to the target successor node and the maximum free flow velocity in each segment. When the flow speed is zero at the starting node (i, t),(21)hi,t=Disti,du0.Meuleau et al. [29] proved that the AO∗ algorithm must be able to terminate on the optimal solution when the heuristic function calculates the shorter trip time than the real trip time and there is an optimal solution. As the heuristic function in this study satisfies this condition, the optimal decision p∗i,t∈Γi,t at the node (i, t) is found by the AO∗ algorithm, which presents the path of the shortest trip time from nodes s to d.The AO∗ algorithm does not allow loops in the search process. Finding the following successor nodes requires operating on the nodes that are not the precursors. Due to the monotonicity of time, there is no possibility of loops in the spatiotemporal traffic network GT. The heuristic search does not find all nodes on GT but those in the optimal path. The search is processed based upon heuristic information, so the algorithm is efficient in finding the optimal path.


## 4.4. Improving AO∗ Algorithm

Since the increased number of successor nodes affects the efficiency of the algorithm, the probability tree diagram is necessary to consider during the search process. When the variance of the trip times in segments is not large, the conditional probability has little effect on the final optimal path selection. In some segments, the past trip times are almost constant. In this case, the conditional probability does not affect significantly. When the variance becomes large, the conditional probability of the branches is considered, which simplifies the process significantly with a less number of nodes and the improvement of the efficiency of the algorithm. Figure7 shows diagrams on how to judge for expanding the nodes increasing the number of nodes) based on the variance of trip times. The branch in Figure 7(a) has the multilevel expansion of the nodes, while that in Figure 7(b) limits the expansion. In each node (circle), the trip times and the variance of them are shown. Figure 7(b) shows that limiting the expansion only needs the nodes with either the longest or the shortest trip time with the estimated trip time unchanged when compared to Figure 7(a) that has the expansion of the odes. Based on this result, the flowchart in Figure 6 is modified and shown in Figure 8.Figure 7
Judging the node expansion diagram based on the variance and trip time. (a) Multilevel expansion of the nodes. (b) Limiting the expansion.
(a)(b)Figure 8
The flowchart for the limited expansion search process.


## 5. Case Studies and Discussion

### 5.1. Application of Improved AO∗ Algorithm

The traffic data in Shenzhen was used to calculate the trip times of each segment on a route with the improved AO∗ algorithm. Figure 7 shows the expected trip times (in parenthesis) on various routes and times in a day. In nonpeak times such as 7:00, 9:30, 14:00, and 20:30, the path was chosen for a smaller number of segments than in peak times such as 8:30, 11:00, 12:30, and 18:00 when the road has traffic congestion. When there are many vehicles in a segment, another segment with fewer vehicles is chosen for a shorter trip time.The calculation result at 12:30 (Figure9(e)) suggested two different choices at node 138. Of course, all the nodes shown in Figure 9 have the same kind of selection as node 138, but the result of selection is the same road segment in space, and the difference is only in time. It can be considered that the difference in time is only the difference in “quantity,” and the accumulation of “quantity” will cause the change in “quality,” such as the appearance of different road segment selection results. If there is no choice for a segment, then this means that the change in “quantity” is not enough to cause that in “quality.” If there are two paths on which it takes 45 (going straight) and 50 seconds (turning right) to reach node 138 from node 28, the optimal path will be the path for a shorter total trip time. Of course, the path choice at node 138 depends on the road condition of the segment (nodes 28-138) and the estimated arrival time at node 138.Figure 9
Path selection result: (a) at 07:00 (292 s), (b) 08:30 (352 s), (c) 09:30 (320 s), (d) 11:00 (340 s), (e) 12:30 (339 s), (f) 14:00 (318 s), (g) 18:00 (343 s), and (h) 20:30 (300 s).
(a)(b)(c)(d)(e)(f)(g)(h)


### 5.2. Performance of Improved AO∗ Algorithm

Randomness changes the trip time even in the same segment at the same period. Then, many solution graph nodes need to be considered in the search of the algorithm. Table1 shows the statistics of the AO∗ algorithm search process. When the number of nodes is increased, the number of solution graph nodes and the time for search increased. That is, the efficiency of the search decreased. The expansion of solution graph nodes affects the efficiency of the algorithm based on the probability of each branch (the branch).Table 1
The result of the AO∗ algorithm search.
Number of nodes in an optimal pathNumber of solution graph nodesNumber of generated graph nodesNumber of iterations from the starting nodeTime for search (s)63369170.774591261.1863155292997235594.210100259514.31196187494.71278221518.1131454194717.1142265917834.1152205378149.5162536248951Table2 shows the result from the search process by using the improved algorithm. The increase of the number of nodes does not affect significantly the numbers of the solution graph nodes, the generated nodes, the iteration, and the time for search. This indicates the advantages of the heuristic search and the function used.Table 2
The result from the improved AO∗ algorithm search.
Number of nodes in an optimal pathNumber of solution graph nodesNumber of generated graph nodesNumber of iterations from the starting nodeTime for search (s)671150.2781470.3881570.3991380.310101890.4111118100.4121219110.4131519120.4141420120.4151724140.5161625150.5The data relationship in the two tables is shown in Figure10. It can be clearly seen that the efficiency of the unrestricted algorithm decreases rapidly as the number of road network nodes increases. The efficiency of the improved algorithm does not change much with the increase in the number of road network nodes, which is also the characteristic of heuristic search.Figure 10
The comparison of the efficiency of the original and improved AO∗ algorithm. (a) Comparison of the generated graph nodes. (b) Comparison of iteration from the starting node. (c) Comparison of running time. (d) Comparison of solution graph nodes.
(a)(b)(c)(d)


## 5.1. Application of Improved AO∗ Algorithm

The traffic data in Shenzhen was used to calculate the trip times of each segment on a route with the improved AO∗ algorithm. Figure 7 shows the expected trip times (in parenthesis) on various routes and times in a day. In nonpeak times such as 7:00, 9:30, 14:00, and 20:30, the path was chosen for a smaller number of segments than in peak times such as 8:30, 11:00, 12:30, and 18:00 when the road has traffic congestion. When there are many vehicles in a segment, another segment with fewer vehicles is chosen for a shorter trip time.The calculation result at 12:30 (Figure9(e)) suggested two different choices at node 138. Of course, all the nodes shown in Figure 9 have the same kind of selection as node 138, but the result of selection is the same road segment in space, and the difference is only in time. It can be considered that the difference in time is only the difference in “quantity,” and the accumulation of “quantity” will cause the change in “quality,” such as the appearance of different road segment selection results. If there is no choice for a segment, then this means that the change in “quantity” is not enough to cause that in “quality.” If there are two paths on which it takes 45 (going straight) and 50 seconds (turning right) to reach node 138 from node 28, the optimal path will be the path for a shorter total trip time. Of course, the path choice at node 138 depends on the road condition of the segment (nodes 28-138) and the estimated arrival time at node 138.Figure 9
Path selection result: (a) at 07:00 (292 s), (b) 08:30 (352 s), (c) 09:30 (320 s), (d) 11:00 (340 s), (e) 12:30 (339 s), (f) 14:00 (318 s), (g) 18:00 (343 s), and (h) 20:30 (300 s).
(a)(b)(c)(d)(e)(f)(g)(h)


## 5.2. Performance of Improved AO∗ Algorithm

Randomness changes the trip time even in the same segment at the same period. Then, many solution graph nodes need to be considered in the search of the algorithm. Table1 shows the statistics of the AO∗ algorithm search process. When the number of nodes is increased, the number of solution graph nodes and the time for search increased. That is, the efficiency of the search decreased. The expansion of solution graph nodes affects the efficiency of the algorithm based on the probability of each branch (the branch).Table 1
The result of the AO∗ algorithm search.
Number of nodes in an optimal pathNumber of solution graph nodesNumber of generated graph nodesNumber of iterations from the starting nodeTime for search (s)63369170.774591261.1863155292997235594.210100259514.31196187494.71278221518.1131454194717.1142265917834.1152205378149.5162536248951Table2 shows the result from the search process by using the improved algorithm. The increase of the number of nodes does not affect significantly the numbers of the solution graph nodes, the generated nodes, the iteration, and the time for search. This indicates the advantages of the heuristic search and the function used.Table 2
The result from the improved AO∗ algorithm search.
Number of nodes in an optimal pathNumber of solution graph nodesNumber of generated graph nodesNumber of iterations from the starting nodeTime for search (s)671150.2781470.3881570.3991380.310101890.4111118100.4121219110.4131519120.4141420120.4151724140.5161625150.5The data relationship in the two tables is shown in Figure10. It can be clearly seen that the efficiency of the unrestricted algorithm decreases rapidly as the number of road network nodes increases. The efficiency of the improved algorithm does not change much with the increase in the number of road network nodes, which is also the characteristic of heuristic search.Figure 10
The comparison of the efficiency of the original and improved AO∗ algorithm. (a) Comparison of the generated graph nodes. (b) Comparison of iteration from the starting node. (c) Comparison of running time. (d) Comparison of solution graph nodes.
(a)(b)(c)(d)


## 6. Conclusion

The trip times in the segments on a route by a vehicle are estimated in a random process with randomness. Each node has a different probability of arriving at the target node in the shortest time according to the entry time. To calculate the trip time, a new algorithm of the optimal path selection was proposed and the following were investigated.(1)
The complexity of a random dynamic shortest path problem is necessary to consider. The variability of the trip time between nodes is caused by the insufficiency of FIFO to explain the complexity. The dynamic model of the shortest path selection considers the fact that the shortest trip time on a route is not equal to the sum of the trip times in the segments.(2)
The random shortest path selection is rather a decision-making problem. That is, at each segment, the choice of going straight, turning left, and turning right needs to be made according to the estimated shortest trip time. Stochastic dynamic programming is required to model for the solution of such a stochastic decision-making problem.(3)
The trip times between nodes on a route are not discrete, and that in the shortest path is the extreme value function with random variables. As the calculation of the probability density of the trip times is complicated, this study adopted Rosenblueth’s two-point estimation method. The trip time as a random variable is discretized so that the expectation of the shortest trip time is unchanged.(4)
The probability density affects the “quantity” of the estimation of the trip times, not the “quality.” The “quantity” influences the efficiency of an algorithm. The “quantity” does not mean the increasing number of nodes but possible successor nodes. The increase in the number of selections affects the efficiency of the estimation of the trip time significantly. Therefore, we proposed the improved AO∗ algorithm for enhancing the efficiency for finding the optimal trip time to apply the algorithm to the real data process. The result proves the superiority of the improved AO∗ algorithm and the basis for applying this to the real-time navigation system of a vehicle.



---

*Source: 9922466-2021-07-28.xml*