## 2 Methods
### Improved A* Algorithm for Path Analysis of Hybrid Networks
#### 2.2.2 Implementation Steps of the Improved A* Algorithm for Path Analysis of Hybrid Network  
The relationships between nodes and lines, as well as the road centerline, are established for the restricted network. On this basis, the improved A* algorithm for path analysis of the restricted network, as described in Section 2.1.4, is expanded to develop path analysis algorithm based on a hybrid network. The main steps of the improved A* algorithm for hybrid network path analysis are outlined below, as shown in Figure 6.  
1. Steps 1-3 are identical to those outlined in the algorithm for path analysis of the restricted network in Section 2.1.4.
2. Following the expansion of node \(M\), assess whether M corresponds to a P&R parking and transfer station. If not, the following algorithm is the same as that in Section 2.1.4. Otherwise, load data from the unrestricted network.
3. Determine which node of the starting node and ending node of the travel route may be the driving node. It is the starting node or destination of the traveler's driving. According to the P&R transfer characteristics, the driving node is generally located in the suburbs of the city. Thus, if neither the starting node nor the ending node is in the suburbs, or if both are, select a city center point, and judge which node is farther away from the city center point, designating it as the driving node.
4. Calculate and record the best path from \(O\) to \(M\) in the unrestricted network if the starting node \(O\) is the driving node. In this step, the number of transfers in the multivariate heuristic function does not work for unrestricted networks and the number of transfers is negligible. \(H(N)\) is chosen as the distance, time, and cost  
Figure 5: The topological relationship between restricted and unrestricted networks. (**a**) Diagram of rail transit line(R\({}_{1}\)) and urban bus line(R\({}_{2}\)) network; (**b**) Urban road centerline network and rail transit line network; (**c**) Urban road centerline network and bus line network; (**d**) Unrestricted network and restricted network. (Figures (**b–d**) show the relationship between unrestricted networks and restricted networks. The black grid line and the red bold are the diagrams of the unrestricted network and that of the restricted network, respectively. Arrows indicate the forward direction of the line).  
consumption between two nodes to estimate the cost from \(N\) to ending point \(D\) in the future. \(G(N)\) represents the cost already paid from \(O\) to \(N\), e.g., the total consumption of traversing each path. The next algorithm steps are identical to the algorithm 4-6 steps in Section 2.1.4.
5. Calculate and record the optimal path from \(M\) to \(D\) in the unrestricted network, which is the road network, if the ending node D is the driving node.
6. Output the travel plan from \(O\) to \(D\) and conclude the algorithm.  
In summary, the switching between restricted and unrestricted networks in hybrid network is accomplished via the P&R transfer point and the topological relationship between unrestricted and restricted networks. Meanwhile, the multivariate heuristic function realizes the different needs of travelers in restricted and unrestricted networks by prioritizing the control of each evaluation criterion. The A* algorithm is used to search for the respective optimal path and, finally, a complete optimal path based on hybrid networks is obtained.