TRANSIT ROUTE PLANNING FOR MEGACITIES BASED ON DEMAND DENSITY OF COMPLEX NETWORKS

The aim of this work is to investigate the simplification of public transport networks (PTNs) for megacities and the optimisation of route planning based on the demand density of complex networks. A node deletion rule for network centre areas and a node merging rule for network border areas in the PTN are designed using the demand density of complex networks. A transit route planning (TRP) model is established, which considers the demands of direct passengers, transfer passengers at the same stop and transfer passengers at different stops, and aims at maximising the transit demand density of a PTN. An optimisation process for TRP is developed based on the ant colony optimisation (ACO). The proposed method was validated through a sample application in Handan City in China. The results indicate that urban PTNs can be simplified while retaining their local attributes to a great extent. The hierarchical structure of the network is more obvious, and the layer-by-layer planning of routes can be effectively used in TRP. Moreover, the operating efficiency and service level of urban PTNs can be enhanced effectively.


INTRODUCTION
The planning level of public transport networks (PTNs) will directly affect the operating efficiency and service level of the network [1]. As the main part of PTN planning, transit route planning (TRP) has been extensively studied [2], where the meth-od of "one-by-one wiring, optimised for network" method adopted by Zhou K. et al. in [3] has been widely used because of its simple operation. For megacity PTNs, the "layer-by-layer, route-byroute" method proposed by Carrese et al. in [4] has been widely used. However, the overall planning of a PTN is highly inefficient because of the complexity and time-consuming nature of the route searching phase, especially for megacities with huge public transport systems. To enhance the efficiency, many heuristic algorithms have been developed, e.g. the alternating objective genetic algorithm [5], tabu search heuristic algorithm [6], and improved ant colony optimisation (ACO) algorithm [7]. However, with the maturity of the algorithm, it becomes difficult to continuously improve planning efficiency, especially megacity PTN planning. It is generally known that the complexity of a path search algorithm is directly proportional to the number of nodes in the network [8]. Therefore, it is feasible to reduce the number of nodes and edges to simplify the network (reduce network size) by studying the network topology.
Complex networks are widely used to describe and study a variety of systems in the real world, including the Internet, neural networks, traffic, and transportation [9]. For megacity public transport systems, network complexity analysis and its evolution, e.g. robustness and cascading failure characteristics, have been widely studied [10]. Moreover, some detour strategies have been studied aiming to avoid congestion nodes in the network reasonably in the route planning process [11]. Several studies less than the passenger acceptable walking distance, i.e., 0.3 km, and after one node of a pair is deleted, the retained node undertakes its passenger transit demand.
For a megacity with a large population, the key to TRP is meeting the travel demands of different passengers and optimising the PTN structure [25]. Therefore, the TRP process is divided into three stages according to the features of transit routes [21]. It aims to maximise the number of travellers per unit length, i.e., the transit demand density, according to the route length and the number of travellers on the route [26]. The skeleton routes are first planned according to the transit trip origin-destination (OD). Then, the trunk routes are planned according to the transit trip OD left by the planned skeleton routes. Lastly, the transit trip OD left by the above planned routes will be covered by planning the coverage routes as possible. In TRP, this is difficult to achieve through classical optimisation techniques [27]. Both the TRP process and the ant foraging process are the probability selection problem [28], hence, an optimisation solution process based on ACO is proposed.
Due to the above analysis, a simplification method for a megacity PTN is proposed, which considers both the transit demand and the transit distance between nodes. The network centre areas are simplified by deleting nodes. The network border areas are simplified by merging nodes into super-nodes, and the location relationship between super-node and other nodes is defined. On the simplified network, TRP will be carried out with the goal of maximising the total transit demand density on the route. The total transit demand density on the route is calculated by dividing the total transit demand by the route length, where the total transit demand includes the direct trips, the transfers at the same stop, and especially the transfers at the different stops. Based on the ACO, the transit routes will be planned in the order of skeleton routes, trunk routes, and coverage routes. The proposed method will be verified through simulation experiments.
The remainder of this paper is organised as follows. In Section 2, the simplification rules of the PTN are presented. Section 3 establishes the TRP model and Section 4 provides a concrete optimisation algorithm based on the ACO. An application is provided in Section 5. Finally, the conclusions of the study are summarised. have shown that these methods are feasible for improving network operation efficiency. Based on the missing link prediction and the spurious existing link identification, Zhang et al. proposed a framework of the auxiliary optimisation method for the transit network [12]. Jia et al. developed a model based on betweenness to optimise the transportation network [13]; however, this has not been further studied due to complex network theory.
Simplifying the complex network is an efficient method for understanding, analysing, and visualising networks of large real-world systems [14]. Several authors have proposed a broad collection of simplification methods that can be classified into two general types: sampling methods [15] and merging methods [16]. Blagus et al. tested different simplification methods on 30 real-world networks, and found that the sampling method has low computational complexity and strong adjustability, but it also causes damage to network connectivity, whereas the merging method does the opposite [17]. The cluster-growing renormalisation (CG) method employed by Callos et al. in [18] and the balanced propagation (BP) method used by Subelj et al. in [19] have both been proved well in reducing the network size while maximising the network self-similarity [20]. In previous studies, the simplification methods for megacity PTNs were limited. The main idea of the established methods is to delete the node pairs whose node spacing is less than the specified value (i.e., 0.3 km) [20]. Little attention has been paid to the transit demand between nodes. If the TRP is carried out on the simplified PTN, all the actual transit demand will not be satisfied in the final planned network. Therefore, a simplified method based on the transit demand density on the edge of the network [21] is employed to simplify the PTN.
The distribution of stops in the PTN of a megacity has the characteristics of dense centres and sparse borders [22]. In network centre areas, the service scope of two bus stops often overlaps [23]. The bus stops in network border areas are very important for residents to travel, which cannot be ignored in the process of TRP [24]. Therefore, there are two ways to simplify the PTN. The first is to simplify network border areas by merging nodes into super-nodes, where the connection relationship between merged nodes is relatively fixed. The second is to delete nodes based on the node deletion rule to simplify the network centre areas. The node deletion rule is aimed at the node pairs whose bus stops spacing is km (Figure 2c), then deleting node j and its passenger transmission function is replaced by node i. If 6l kj <0.8 km and 6l ih <0.8 km (Figure 2d), it is necessary to calculate the average increase in transit demand density on the solid edges around another node when a node is deleted, and this can be calculated by Equation 1.
where P ij (the unit is person) denotes the number of passengers between stops i and j. k i is the node degree of i. L mn (the unit is kilometer) represents the delay distance. l mn , Q mn , and C mn represent the actual distance (the unit is kilometer), traffic volume (the unit is person), and capacity (the unit is person) of the road section mn, respectively. x mn is a binary variable that represents whether there are bus lanes on mn, if so, it is set to 0, otherwise it is set to 1. a and b are adjustment parameters. If η i >η j , then the node i is deleted, otherwise, the node j is deleted. If η i =η j , then any node can be deleted. Meanwhile, the O-D matrix must be updated after deleting a node. Take deleting the node i in Figure 2d as an example to explain the updating process of the O-D matrix. First, the P ij is divided into k j equal portions and added to P jk . Then, the row and column corresponding to node i are added to those of node j, respectively, and the row and column of node i are deleted to obtain the updated O-D matrix.

Merging rule of network border areas
Owing to the sparse distribution of nodes at the network border area and that the order of connections between multiple nodes is relatively fixed, merging these nodes into super-nodes is feasible. The nodes contained in the super-node are denoted as set ω. As shown in Figure 3, the super nodes k 1 and

SIMPLIFICATION OF PTN
A megacity PTN was used as the researched object (Figure 1), the set of network nodes N consists of the existing bus stops, l ij represents the road distance between two stops. If l ij <0.3 km, the node pair is connected by a dashed line. If 0.3 km<l ij <0.8 km, the node pair is connected by a solid line [21]. E 1 and E 2 represent the set of dashed and solid edges, respectively. Figure 1 is a sample network, in which 1, 2, 7, and 8 are the terminal nodes (bus stations), and 3, 4, 5, and 6 are intermediate nodes (bus stops).

Simplification rule of network centre areas
For the node pair linked by dashed lines in the network centre areas, a node deletion rule is instituted and described by Figure 2.
The set of nodes connected to nodes i and j by solid lines are Ω i and Ω j , respectively, where the node k is in Ω i and the node h is in Ω j . If 7l kj >0.8 km and 7l ih >0.8 km (Figure 2a), then neither node is deleted. If 6l kj <0.8 km and 7l ih >0.8 km (Figure 2b), then deleting node i and its passenger transmission function is replaced by node j. Similarly, if 7l kj >0.8 km and 6l ih <0.8 (the unit is person) denote the number of direct trips, the number of transfer passengers at the same stop, and the number of transfer passengers at different stops, respectively. y ij Rod indicates whether the stops i and j are on route R od , if so, it is set to 1, otherwise, it is set to 0. z , ij R R od mn represents whether the trip from stop i to stop j (assume that stops i and j are on the routes R od and R mn , respectively) requires transfer, if so, the value is 1, otherwise, it is 0. Figure 4a shows the process of passengers transfer at the same stop. On the right side of Equation 7, the first and second parts in brackets describe the transfer process shown in Figures 4b and c, respectively. Δ indicates whether the travel distance that passengers transfer at different stops is shorter than that transfer at same stop, if so, it is set to 1, otherwise, it is set to 0.
denotes whether there are intersections between the routes R od and R mn , if so, it is set to 0, otherwise, it is set to 1. u u 1 2 c denotes whether the distance between Figure 3b are generated by merging the nodes in Figure 3a, and the node sets ω 1 ={j 1 ,j 2 ,…,j n-1 ,j n } and ω 2 ={j n+1 ,j n+2 ,…,j n+x } are generated.
To reduce the impact of merging nodes on the overall network structure, the location identification of the super-node is defined. Such as in Figure 3b, the location of super-nodes k 1 and k 2 corresponds to the location of nodes j n and j n+x in Figure 3a, respectively. The transit demand between nodes and super nodes in the network can be calculated using Equation 3. The transit demand between super nodes can be calculated by Equation 4. When updating the O-D matrix, delete the rows and columns of nodes that have been merged, and add the rows and columns of the super nodes to the matrix.

TRP MODEL
The TRP model proposed in this study was developed to maximise the total transit demand density of the route, which is the number of transit demands divided by the distance. Total transit demand includes direct passengers, transfer passengers at the same stop and transfer passengers at different stops, which can be calculated by Equations 5,6,and 7, respectively. The transit distance is the delay length of the route, and assumes that the road section is equally divided between stops. In the planning process, R od denotes the route being constructed, and R mn denotes the route in the optimised transit network.

Figure 4 -Examples of transfer at the same and different stops
there are no routes in the network. In the initial network, it is necessary to set an initial weight to each edge, that is, to initialise the pheromone matrix, and the value of each element τ 0 in the matrix is the same constant that is not equal to 0.
Step 2. Choosing the OD pair Before searching the route, a feasible OD pair must be selected. If all routes between an OD pair cannot meet the constraints, then the OD pair will not be considered.

Step 3. Search route
In the process of searching routes, the ant chooses the next node by taking account into both the pheromone intensity τ ij and the visibility value F ij of the corresponding links. The intensity of pheromone is related to the planning objective [27]. The visibility value is calculated by gravity. The probability that the kth ant on node i moves to the node j is given by Equation 13.
where c i denotes the node weight. α and β are parameters. tabu i is the set of nodes that the kth ant on node i cannot access, including the nodes that have been accessed by the kth ant and the nodes that cannot satisfy the distance constraint.
Step 4. Updating the pheromone When determining a route, it is necessary to update the network pheromone at the same time, and the updating process of the network pheromone can be divided into two parts. The first part simulates the reduction of pheromone due to natural volatilisation. The second part is the pheromone increments of the edge due to ants passing by, which is related to the optimisation objective. The pheromone updating equation is as follows: where τ ij denotes the existing pheromones intensity in edge (i, j). τ' ij denotes the intensity of the pheromone in edge (i, j) after updating. ρ is a constant, representing the speed of volatilisation. Δτ k ij denotes the pheromone increment on the edge (i, j) of the the stops u 1 and u 2 (assume that stops u 1 and u 2 are on the routes R od and R mn , respectively) is within the acceptable walking distance of passengers, if so, the value is 1, otherwise, it is 0. ij transfer, * d indicates whether the distance between two stops is too far, if so, it is set to 0, otherwise, it is set to 1. Dis ij (the unit is kilometer) denotes the shortest distance between stops i and j. The upper limit of / l Dis ij ij transfer, * is determined by the actual situation of China, and it is set to 3. Rod r and Rmn r denote the node set that the route R od and R mn pass through, respectively.
According to different constraints, TRP can be divided into three stages: skeleton routes, trunk routes, and coverage routes planning. To maximise the total transit demand density of the route, the proposed model can be formulated as follows: where R is a set of all possible routes. DR od (the unit is person/km) denotes the total transit demand density on route R od . w 1 and w 2 are used to reflect the importance of transfers at the same and different stops in terms of total transit demands, respectively. s is the set of origins and destinations. QR od (the unit is person) represents the total transit demand, and Q min (the unit is person) is the minimum total transit demand on the route.

OPTIMISATION ALGORITHM BASED ON ACO
The specific steps of the algorithm are as follows: Step 1. Initialisation At the beginning of TRP, it is necessary to initialise the network and the pheromone matrix. For a simplified network, it is necessary to identify the terminal nodes and intermediate nodes, ensure that infinite waiting time is set for the section that has reached or exceeded the capacity limit to ensure that it is no longer selected for the future assignment.
Step 7.3.3. Repeat Steps 7.3.1-7.3.2, until the current part is assigned to the network.
Step 7.4. Repeat Step 7.3 until assigning the entire O-D matrix.
Step 7.5. Update the frequencies of the N+1 routes.

Step 8. Conditions for ending the search
If there is no route that meets the constraints, stop and go to Step 10. Otherwise return to Step 2.
Step 9. Node resetting Expand the super nodes in the optimal network and reset the merged nodes to their positions before merging.

APPLICATION ANALYSIS
The public transport system data of the city of Handan in China, with a population of 2.2 million, was used for the test. The data (from Planning and Design Institute of Handan City) includes 96 bus lines, 97 bus stations, and 1006 bus stops. When establishing the PTN, the stops with the same name but different geographical positions are different nodes. The PTN contains 1108 nodes, 3169 solid edges, and 544 dashed edges. In the experiment, when planning the skeleton routes, trunk routes, and coverage routes, the values of Q min are 6000, 4000, and 2000, respectively, and other parameter value settings are listed in Table 1.

Simplifying the PTN
After simplification, 17 nodes were deleted, and 179 nodes were merged to form 57 super-nodes; the network contains 912 nodes, 2911 route that searched by the kth ant. M is the total number of ants. The ant-cycle method is selected to calculate the pheromone increment as follows [28]: where μ is a constant. DR k od denotes the objective function value of the route discovered by the kth ant.
Step 5. Generating the set of alternative routes When all ants in the network have finished the route searching, the route with maximum transit demand density between the OD pair is determined as the alternative route. The route searching between the current OD pair is end, and return to Step 2 selects the next feasible OD pair. Repeat Steps 2-5 until all alternative routes are found. The set of the alternative routes is expressed as S.
Step 6. Selecting and adding route to the network Select the route with maximum transit demand density in the set S, add it to the network, and delete the others.

Step 7. Transit passenger assignment
In the process of TRP, when a new route is added to the network, it is necessary to assign the passenger demand at the same time. Assuming that there are N routes in the existing network, when adding the (N+1)th optimal route to the network the specific steps of the assignment are as follows [21].
Step 7.1. Add the (N+1)th optimal route to the network and calculate the departure frequency (the departure frequency value is fixed and is different on different levels of routes).
Step 7.2. Divide the initial O-D matrix into X equal parts, where the larger the value of X is, the closer the assignment result is to the equilibrium assignment method. However, if the value of X is too large, the distribution efficiency will be seriously affected.
Step 7.3. Assign one part of the O-D matrix to the route.
Step 7.3.1. Select any OD pair, and assign the passenger demand to the minimum hyper-path between the OD pair. The hyper-path is determined by calculating the travel time of the path, which includes the running time of the bus and the waiting time of the passengers at stops (the waiting time=1/2·60/frequency).
Step 7.3.2. Recalculate the travel time of each route in the network. Check whether the total transit demand of each section on the route satisfies the capacity limit, if so, turn to Step 7.4. Otherwise, an based on community detection, where super-nodes are identified by communities revealed by balanced propagation (BP) [17]. The number of nodes in the network simplified by CG and BP methods are both less than 40% of the original, and all of them are super-nodes. Although the simplification effect of is better, if the TRP is carried out on the simplified network, the planning result will be abstract. Statistical analysis of the change in local network attributes of the simplified network obtained by different methods are shown in Figure 5. The results show that in comparison with CG and BP the proposed simplification method can effectively reduce the number of network nodes and edges, while retaining the local attributes of the network to a great extent.

Determining the transfer coefficient
To determine the appropriate parameters combination, five groups of transfer coefficients as shown in Table 2 were tested. The results showed that the five different PTNs contained 105, 101, 99, 98, and 94 routes, respectively. The comparison results of solid edges, and 527 dashed edges. In the original network, there are at least two dashed lines around the deleted nodes, and the node degree is less than three. These nodes are all non-hub nodes in the network. Through the OD matrix, it is found that the bus stops corresponding to the deleted nodes have little transit demand in the PTN. After deleting the nodes, the 300m and 500m coverage rate of bus stops in the network centre area decreased from 78.14% to 77.22% and 90.15% to 89.62%, respectively. It can be seen that node deletion has no significant impact on the service level of the PTN. Therefore, the procedure for deleting a node is effective, and the node deletion has little impact on the subsequent TRP.
To verify the applicability of the proposed simplification method, two methods were used to simplify the PTN. The first one is cluster-growing renormalisation (CG), which incrementally grows the super-nodes from seed nodes within a distance no larger than c (in one super-node the distance between two nodes is at most 2·c + 1 steps, in this study, c=1) [18]. The second one is merging nodes  network. The increase in transfer parameters leads to an increase in the non-linear rate and average transit demand density, which shows that the routes are more meandering and can meet higher passenger travel demands. The fourth and the fifth PTNs have the highest non-linear rate and highest average transit demand density of 1.44 and 1.45, 164.24, and 165.76, respectively. Therefore, group 4 was adopted in the TRP.

Results and analysis
With the best combination, there are 10 bus skeleton lines, 26 bus trunk lines, and 62 bus coverage lines in the network as shown in Figure 8. The bus skeleton lines mainly pass through commercial and residential areas with large passenger flow, forming an overall structure of "five horizontal and five vertical". The bus trunk lines, with transfer hubs as the supporting point, form the main skeleton of the PTN. The bus coverage lines meander into the community to meet the daily travel and commuting demand of residents.
To test the validation of the proposed TRP, methods for minimising the travel time method and maximising direct transit demand are introduced for comparison and solved by ACO. Table 3 lists the non-linear rate, passenger direct proportion, transit network density, multiple-line coefficient, and transfer coefficient of each planned PTN. In Table 3, the non-linear rate, transit network density, and transfer coefficient of the PTN planned by the proposed method are higher than others. In other words, the method pays more attention to the transfers, which leads to a network with a passenger direct proportion lower than that of other networks. Because the incremental allocation method is used to allocate the transit passenger, the number of bus lines on the road section is effectively controlled, hence, the multiple-line coefficient is the smallest. the passenger direct proportion, transit network density, non-linear rate, and average transit demand density of each network are shown in Figures 6 and 7. Compared with other PTNs, in the first PTN the passenger direct proportion is the highest and the non-linear rate is the smallest. However, the network density and average transit demand density of the first PTN are the smallest. Therefore, the first PTN has the lowest service level. As the transfer parameter value increased, the passenger direct proportion decreased, and the network density increased continuously. The fourth PTN had the highest density, and the passenger direct proportion was 50%, which meets the travel demands of most passengers in the  Passenger direct proportion Transit network density Figure 6 -Passenger direct proportion and transit network density both existing and planned network. Compared with the existing network, the direct passenger proportion was reduced and the non-linear rate increased, which is mainly attributed to the increased attention given to the transfers. In the planned network, the passenger direct proportion of three bus line layers increased and significantly changed between different layers, although there was little change in the existing network. This suggests that the route hierarchy in the planned network is clearer. More than half of the demands carried by bus coverage lines needs to be transferred. The non-linear rate obviously increased, showing that the bus line goes deep into the community, further expanding the coverage and accessibility of the PTN. Overall, the proposed Figure 9 shows the bus lane proportion, passenger direct proportion, transit demand proportion, and non-linear rate carried by three layers of bus lines in the existing and planned network. It is obvious that in each layer of the planned routes, the bus lane proportion gradually increased, while the passenger direct proportion are gradually decreased. The skeleton lines, despite being the least in number, still carried approximately 19.32% of the demand, which is 6.14% higher than that of the existing network. Moreover, the bus lane proportion and the passenger direct proportion improved, and the non-linear rate was reduced, which fully exploits the advantages of fast, direct, and large capacity. The bus trunk lines carried the most demands in   TRP method can effectively increase the service area of the PTN, optimise the network structure, and improve the convenience of operator management.

CONCLUSION
Using the transit demand density of the edge of a network, a network simplification method for PTN for megacities was developed. A TRP model aimed to maximise the transit demand density of the network was established, which considers the transfers, especially the transfer demand of passengers at different stops. The steps in the optimisation solution of the TRP problem were established based on ACO. Under the objective function with different transfer coefficients and constraint conditions, the skeleton routes, trunk routes, and coverage routes were planned layer by layer to form the PTN. The public transport system data of Handan City in China were used for the test. The results show that the simplified PTN retained the local attributes of the original network to a great extent. The TRP method can make the route hierarchy of PTNs clearer to further improve the network service level. However, there are some issues that need to be resolved. This study is devoted to simplifying the PTNs and optimising the network structure, but does not take into account the price of passengers routing selection. Moreover, the incremental assignment method was used as an approximate equilibrium assignment method, which may lead to a deviation between the planning results and the actual situation. Therefore, it is necessary to develop an appropriate equilibrium assignment method in further studies.

ACKNOWLEDGMENTS
The work described in this paper was supported by the National Natural Science Foundation of China (50478088), the Natural Science Foundation of Hebei Province in China (E2015202266), and Transportation Science and Technology Development Plan Project of Tianjin (2018R36). The authors would like to gratefully acknowledge the editor's comments and the referees of the paper who helped to clarify and improve the presentation.