Combined mode division and traffic assignment method based on two-stage parallel
By adopting a two-stage parallel method in the computer cluster, combining distributed data structures and adaptive gradient algorithms, the problems of low computing efficiency and large communication burden in large-scale transportation networks are solved, and fast and efficient traffic flow allocation and pattern division are achieved, supporting scientific optimization of traffic planning and management.
Patent Information
- Application Number
- CN202210842568.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-07-18
AI Technical Summary
The existing parallel computing methods have problems of low computing efficiency and high communication burden in traffic distribution in traffic networks, especially on large-scale networks, it is difficult to quickly solve the problems of combining mode division and traffic allocation.
Using a combined mode division and traffic allocation method based on two-stage parallelism, the multi-core processor in the computer cluster is used to optimize the path traffic distribution of the traffic network through the division of labor between the master node and the work node, combined with distributed data structures and adaptive gradient algorithms.
It improves computing efficiency, reduces unnecessary communication time, can quickly and efficiently solve the problems of combining mode division and traffic allocation of large-scale transportation networks, and supports scientific optimization of traffic planning and management.
Smart Images

Figure CN115239116B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic control and the field of distributed parallel computing, and in particular to a combined mode division and traffic assignment method based on two-stage parallelism. Background Art
[0002] The combined mode partitioning and flow assignment problem (CMSTA) for urban road traffic networks is a critical issue in traffic planning, management, and control. It plays a fundamental role in traffic engineering and serves as a crucial tool for scientifically and rationally evaluating traffic management policies, planning schemes, and management measures. The key to solving the combined mode partitioning and flow assignment problem for large-scale traffic networks is rapid solution.
[0003] Developing efficient traffic assignment techniques has been a focus of attention for transportation engineers and scientists for the past few decades. The ever-expanding urban transportation networks and the need for high-precision solutions have motivated researchers to develop more efficient and rapid traffic network flow monitoring techniques for use in traffic network flow assignment. In 1956, Beckmann proposed a mathematical model equivalent to the traffic network flow assignment problem, providing a sound foundation for developing efficient traffic network flow assignment techniques. Although numerous studies have demonstrated reasonable performance for solving the traffic assignment problem (TAP), computational efficiency remains a challenge due to two issues: First, the computational effort increases exponentially with network size, making solving the TAP on practical large-scale transportation networks quite challenging. Second, for transportation planning and management tasks, some complex problems, such as network design and multimodal partitioning, require multiple solutions to the TAP, resulting in a significant computational burden. Therefore, designing an effective and efficient algorithm to find the optimal solution is of great significance to transportation research.
[0004] The rapid development of computing hardware has provided an option for solving TAP in parallel using advanced parallel computing techniques. Typically, using parallel computing techniques, TAP can be decomposed into multiple independent subproblems that can be computed in parallel by multiple processors. Parallel computing techniques can be categorized into shared memory and distributed memory approaches. Existing parallel research on TAP suffers from two issues: First, most existing studies use shared memory approaches, which utilize only a limited number of processors / threads on a single computer and fail to fully utilize the multi-core processing power of computer clusters, resulting in low efficiency for problems such as traffic flow monitoring or traffic allocation in urban road traffic networks. Second, some studies aim to solve TAP using distributed memory approaches using multiple computer clusters. However, distributed memory approaches typically require extensive, high-frequency communication between different computing nodes, significantly increasing the computational burden. Consequently, in some application scenarios, the actual performance of distributed memory parallel computing approaches is even worse than that of single-threaded solutions.
[0005] In response to the problems existing in the above-mentioned parallel computing methods, this paper considers the mode selection and path selection behaviors in the decision-making process of travelers, combines the characteristics of the combined mode division and traffic distribution problem with the structure of the distributed storage cluster, and proposes an innovative customized two-level parallel algorithm. The first level of parallelism of the two-level parallel algorithm uses the processor on a computer, and the second level of parallelism uses multi-machine parallelism, thereby efficiently utilizing the computing resources of distributed computing nodes. In addition, the present invention designs a distributed data structure to quickly collect and distribute unstructured path information in a multi-computer environment, which can customize communication and reduce unnecessary communication time. Therefore, the present invention aims to adopt a distributed parallel method and introduce it into the field of traffic distribution, aiming to further improve the computational efficiency when solving the combined mode division and traffic distribution problems of urban road traffic networks. Summary of the Invention
[0006] The technical problem addressed by this invention lies in the fact that, over the past decade, the rapid development of new technologies such as artificial intelligence, big data, and the Internet of Things has led to the generation of massive amounts of data from various terminals and electronic field equipment. This data has permeated every aspect of the transportation industry, becoming a crucial factor in production. Furthermore, as the scale of transportation networks increases, the computational workload increases exponentially. Therefore, rapidly resolving mode division and traffic flow allocation on large-scale transportation networks presents significant challenges.
[0007] To solve the above technical problems, a two-stage parallel combined mode division and traffic assignment method is provided, which includes the following steps:
[0008] S1, set the cluster parallelism, network topology and basic demand parameters. First, set up two-stage parallelism in the computer cluster. According to the proposed two-stage parallel technology, assume that we have T computers, and each computer has M processors. Set up a master computer, T-1 working computers and T*M-1 working processors. The master node is responsible for calculating the flow adjustment of the entire network path, and the T-1 working nodes are responsible for the shortest path calculation between OD pairs. Then, in terms of inputting the basic parameters of the urban road traffic network, input the distribution of private car and subway travel demand; the basic parameters of the traffic network include the free flow travel time of each section, the traffic flow carrying capacity on the section, the section impedance function, and the traffic allocation accuracy threshold; the travel demand distribution includes the starting and ending points and the traffic volume between the starting and ending points.
[0009] S2, Initialize the path set. On the T-1 worker node, a two-stage parallel technique is used to parallelize the shortest path tree for each starting point. This shortest path tree is used to determine the shortest path between each OD pair. A path set is established for each OD pair. The shortest path between the OD pairs is added as the initial path to the path set corresponding to that OD pair. The travel demand between the OD pairs is then loaded onto the initial path corresponding to that OD pair. Then, on the master node, traffic flow is adjusted between private car mode and subway mode. The traffic flow on the path is superimposed on the road segment in the road network to obtain the segment flow. The segment travel time is then updated based on the updated segment flow. The updated segment travel time is then broadcast to the T-1 worker node.
[0010] S3, augment the path set. On each T-1 worker node, initialize the path set in parallel. For each OD pair on the road traffic network, use a two-stage parallel technique to update the shortest path tree at each starting point based on the updated road segment travel time. Compare the shortest path of each OD pair with all paths in the OD pair's path set. If the shortest path does not exist in the existing path set, add it to the path set and temporarily set the path flow on it to 0. Then, collect the latest shortest path results between ODs calculated by the T-1 worker nodes and transfer them to the master node.
[0011] S4, mode division and traffic flow allocation. The combined block coordinate descent and adaptive gradient algorithm (BCD-AGP) algorithm is applied on the master node to adjust the path flow. For each OD pair on the traffic network, the path set remains unchanged and the BCD-AGP algorithm is used to iteratively compare the shortest path costs of private cars. Running time and cost of subway lines In the first case, Calculate the second order of the objective function and then update the private car path flow and subway line flow. In the second case, The second-order objective function is calculated, and then the private car route flow and subway line flow are updated. This adjusts the traffic flow between the private car mode and the subway mode. If the traffic flow converges, the urban transportation network flow is determined based on the traffic flow on the updated route. Otherwise, the process returns to S3 and broadcasts the updated route costs from the master node to T-1 worker nodes.
[0012] At step S5, the algorithm stops. The relative error in traffic assignment is calculated on the master node. For each OD pair on the traffic network, the set of paths remains unchanged. An iterative algorithm is used to adjust traffic flow between the private car mode and the subway mode. If traffic flow converges, the urban traffic network flow is determined based on the traffic flow on the updated paths. Otherwise, the algorithm returns to step S3 and broadcasts the updated segment costs from the master node to each worker node.
[0013] Specifically, in S1, a two-stage parallel process is set up in the computer cluster, and basic parameters of the urban road traffic network are input to each node. The specific process includes:
[0014] S101, set up two-stage parallelism on a computer cluster:
[0015] We have T compute nodes, each with M threads. Each starting point has index o, and if o%(T×M-1) is equal to a thread i th The index of o, then the shortest path tree based on o has thread i th calculate.
[0016] S102, input the objective function equation and constraints:
[0017]
[0018] Constraints:
[0019]
[0020]
[0021]
[0022] In the formula, the objective function (1) consists of two terms, reflecting the elasticity of congestion effect and OD demand on network service level. Formula (2) is the flow conservation condition. Equations (3)-(4) are non-negative constraints on decision variables (i.e., private car path flow and subway line flow). Where A represents the set of road segments, a∈A; W represents the set of OD pairs, od∈W; P od Represents the path set between OD and od, p∈P od ; represents the traffic on path k between OD pair od; v′ a and v″ aRepresent non-shortest path k and shortest path respectively Traffic flow on the road section; t a (v) represents the impedance function of section a; It represents the relationship matrix between the road segment and the path. When the road segment a is on the k-th path of the OD pair od, the value is 1, otherwise, the value is 0; represents the upper limit of OD's travel demand between od, q od It is the demand for the private car model. It is the demand of subway mode. in is the inverse demand function of OD pair association under the subway mode
[0023] S103, setting the private car road section impedance function t a (v) and the operating costs of the subway lines Where t0 is the free flow travel time, C a is the traffic flow carrying capacity on road section a, α and β are preset parameters, v a It represents the flow rate of road section a. The specific calculation formula is as follows:
[0024]
[0025] The operating cost of a subway line can be expressed using a binary logit function:
[0026]
[0027] In the formula is the metro mode demand between OD pairs; and The difference between represents the flow demand between OD pairs, which is determined by the sum of the path flows of the OD pairs; the discrete parameter γ is a constant, reflecting the sensitivity of demand to travel costs; is the fixed travel time of the subway mode between the OD pairs, which is fixed and reflects the subway operation time; is a constant, which represents the walking time between OD pairs in the subway mode, that is, the sum of the time it takes for passengers to travel from the departure point to the subway station and the time it takes for passengers to travel from the subway station to the destination.
[0028] Specifically, the shortest path trees in S2, S3, and S5 are all solved using a two-stage parallel computing method. In the traffic network, a single-source shortest path algorithm is used in parallel on all starting points on the working node to solve the shortest path tree between a single starting point and other nodes on the network. Between S2 and 3, a distributed data structure is required to transmit (send and receive) data between computer nodes in a one-to-many or many-to-one manner. The specific process includes:
[0029] S201: The first data structure is a global distributed array / matrix. The OD set is divided into T×M-1 OD subsets by T×M-1 threads to generate new paths in parallel. Each row of the matrix is used to store the new path of the OD pair. The total number of rows is equal to the total number of OD pairs. The row length is fixed and predefined, and it selects the path with the maximum length from the paths set when the path is first generated. The distributed matrix collects the paths generated from multiple worker computers (path generation modules) to the main computer (path flow regulation module). In addition, in order to distinguish between the array initialization "0" and the segment index "0", we need to calculate the relative value from 1, so we need to add 1 before the calculation and subtract 1 after the calculation.
[0030] S202: Distributed global dynamic array. When the path flow of each OD pair is adjusted to zero (or close to zero), it should be deleted from the path setting. Although each OD pair has a different number of paths, it is difficult to record the deleted path index on a distributed computing platform. The distributed global dynamic array provides a fixed-length storage space for each OD pair to store the inactive / deleted path index. This global dynamic array stores the path order between OD pairs in the path generation module, and then stores the deleted path settings in the path flow adjustment module in the main loop. After the path flow adjustment module is completed, the global dynamic array storing the deleted paths is broadcast from the main computer to all working computers. Finally, these paths are deleted in parallel before the next path generation module is implemented on the working computer.
[0031] Specifically, on the master node, the path set W of OD pairs on the road traffic network is divided into several subsets including:
[0032] In the BCD method, the OD pairs can be grouped together using index grouping rules. Break it down into several blocks Set the OD pairs Divide into blocks, the number of OD pairs in the block. Let od_index, denote the index of OD pairs starting from 1. Block i∈{1,…,|W| / m},
[0033] od_index=i+k×G,k∈{1,…,m},i∈Block(W i ) (7)
[0034] The remaining OD pairs are grouped in the last block. In this way, the OD pairs in the same block are not closely related (coupling means that the paths in the same block have many overlapping sections). In this paper, the AGP algorithm is used to adjust the balanced flow of multiple OD pairs between the private car mode and the subway mode in parallel.
[0035] Set the upper threshold of the number of iterations i, represented by the value MaxI. Once the number of iterations i is greater than or equal to MaxI, the current step stops and the accuracy error of the road traffic network in the private car mode and the subway mode is calculated;
[0036] Determine whether i is an integer multiple of FreC. If i is an integer multiple of FreC, divide the path set W of OD pairs on the road traffic network into several subsets. Otherwise, divide the path set W of a reduced OD pair into several subsets. Split into several subsets and create an empty restricted OD set Used to store OD pairs; some subsets include W i , subscript i represents the i-th subset;
[0037] Specifically, in S4, for each OD pair on the traffic network, the path set remains unchanged and the combined block coordinate descent and adaptive gradient algorithm (BCD-AGP) algorithm is used to iteratively update the path traffic flow in the private car mode and the subway mode. The specific process is as follows:
[0038] S421: Mode division between private car and subway modes. In equilibrium, the running time of each OD pair through the private car line is Should be compared with the running time of each pair of OD on the subway line Therefore, the subway subnet function of the mode division is:
[0039]
[0040] Where, is the shortest cost path between OD pairs; is the shortest cost path for private cars between OD pairs. Or, since Eq. (8) can be rearranged to obtain the mode partitioning of the private car mode subnetwork as follows:
[0041]
[0042] The modal ratio of the subway system is It can be calculated as:
[0043]
[0044] S422: Select private car mode or subway mode based on the route fee.
[0045] In the first case, when the costs of the two modes are equal (i.e., ), there is no need to readjust the mode division between the two modes.
[0046] In the second case, when the cost of the shortest path is higher than the cost of the excess demand, i.e. When the number of passengers increases, the subway mode is preferred. The AGP algorithm is used to adjust the path flow and excess demand.
[0047]
[0048]
[0049]
[0050] In the third case, the cost of the shortest path for private cars is lower than the cost of the subway line, i.e. Passengers prefer private car mode. The AGP algorithm is used to update the subway line flow, non-shortest path flow, and shortest path flow as follows:
[0051]
[0052]
[0053]
[0054]
[0055] Specifically, in S4.3, if the accuracy of the OD pair is insufficient, it is necessary to use the descent algorithm to adjust the path flow between the private car mode and the subway mode in these OD pairs, and at the same time add these OD pairs with insufficient accuracy to a new restricted OD set. include:
[0056] S431: Calculate the precision error rg of the OD pair od ; If the accuracy error of OD pair rg od If the value is greater than the precision threshold M, the path flow between the OD pairs is adjusted using the optimization method; the OD pair is added to the OD pair set.
[0057] S432: Pair set W i After all OD pairs in the private car mode and subway mode complete the flow adjustment, the updated path flow is re-superimposed on the road segment to update the road segment flow;
[0058] S433: updating the travel time of the road section whose traffic volume is adjusted;
[0059] S434: Return to S431, update the path flow in the next subset in the private car mode and subway mode, and expand the OD pair set
[0060] Specifically, in S5, for all OD pairs on the traffic network, the accuracy error rg of the traffic distribution in the private car mode and the subway mode is calculated. If the accuracy error rg is greater than the accuracy threshold M, it indicates that the travel demand on the urban road network has reached an equilibrium state and is consistent with the traveler's travel choice behavior, and the calculation ends; otherwise, M is updated to set M = rg / 2, and the process returns to S3. The accuracy error rg is:
[0061]
[0062] in represents the minimum travel time between OD pairs, q od represents the travel demand between OD pairs, v a represents the road flow, t a (v a ) represents the travel time of the road segment, A represents the set of road segments on the traffic network; the closer rg is to 0, the closer the network traffic flow is to the optimal solution.
[0063] Compared with the prior art, the present invention has the following beneficial effects:
[0064] (1) Existing traffic network flow distribution technology cannot be implemented in parallel on computer clusters, which means it cannot fully utilize the multi-core capabilities of computer clusters. This invention is committed to efficiently utilizing the parallel computing resources of computer clusters and can be ported or used across multiple operating systems such as Linux and Windows, thereby quickly processing the combined travel and flow distribution problems of traffic networks;
[0065] (2) Compared with existing serial or shared memory-based parallel technologies, this invention has a faster calculation speed and is suitable for solving large-scale transportation network combined travel and flow distribution problems. It can quickly evaluate transportation infrastructure, traffic management plans, and the impact of traffic events on urban road networks, thereby scientifically optimizing and rationally guiding traffic design and management plans, playing an important role in the smooth implementation of large-scale urban traffic management and planning projects. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 This is a flow chart of the combined mode division and traffic assignment method based on two-stage parallelism of the present invention;
[0067] Figure 2 This is a flow chart of the combined mode division and traffic assignment method based on two-stage parallelism of the present invention;
[0068] Figure 3 The figure is a schematic diagram of test results of the two-stage parallel technology in an embodiment of the present invention on the backbone network in Chicago, USA and the network in Birmingham, UK. DETAILED DESCRIPTION
[0069] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of application of the present invention.
[0070] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0071] refer to Figure 1 As shown, Figure 1 The flowchart of a two-stage parallel combined mode division and traffic assignment method according to an embodiment includes the following steps:
[0072] Step 1: Set up cluster parallelism, network topology, and basic demand parameters. First, set up two-stage parallelism in the computer cluster. According to the proposed two-stage parallel technology, assume that we have T computers, and each computer has M processors. Set up a master computer, T-1 working computers, and T*M-1 working processors. The master node is responsible for calculating the flow adjustment of the entire network path, and the T-1 working nodes are responsible for calculating the shortest path between OD pairs. Then, in terms of inputting the basic parameters of the urban road traffic network, input the distribution of private car and subway travel demand; the basic parameters of the traffic network include the free flow travel time of each section, the traffic flow carrying capacity on the section, the section impedance function, and the traffic allocation accuracy threshold; the travel demand distribution includes the traffic volume at the starting and ending points and between the starting and ending points.
[0073] Step 2: Initialize the path set. On the T-1 worker node, a two-stage parallel technique is used to parallelize the shortest path tree for each starting point. This shortest path tree is used to determine the shortest path between each OD pair. A path set is established for each OD pair. The shortest path between the OD pairs is added as the initial path to the path set corresponding to that OD pair. The travel demand between the OD pairs is then added to the initial path corresponding to that OD pair. Then, on the master node, traffic flow is adjusted between private car mode and subway mode. The traffic flow on the path is superimposed on the road segment in the road network to obtain the segment flow. The segment travel time is then updated based on the updated segment flow. The updated segment travel time is then broadcast to the T-1 worker node.
[0074] Step 3: Augment the path set. Initialize the path set in parallel on each T-1 worker node. For each OD pair on the road network, use a two-stage parallel technique to update the shortest path tree at each starting point based on the updated road segment travel time. Compare the shortest path of each OD pair with all paths in the OD pair's path set. If the shortest path does not exist in the existing path set, add it to the path set and temporarily set the path flow on it to 0. Then, collect the latest shortest path results between OD pairs calculated by the T-1 worker nodes and transfer them to the master node.
[0075] Step 4: Mode division and traffic flow allocation. The combined block coordinate descent and adaptive gradient algorithm (BCD-AGP) algorithm is applied on the master node to adjust the path flow. For each OD pair on the traffic network, the path set remains unchanged and the BCD-AGP algorithm is used to iteratively compare the shortest path costs of private cars. Running time and cost of subway lines In the first case, Calculate the second order of the objective function and then update the private car path flow and subway line flow. In the second case, The second-order objective function is calculated, and then the private car route flow and subway line flow are updated. This adjusts the traffic flow between the private car mode and the subway mode. If the traffic flow converges, the urban transportation network flow is determined based on the traffic flow on the updated route. Otherwise, the process returns to step 3 and broadcasts the updated road segment costs from the master node to T-1 worker nodes.
[0076] In step 5, the algorithm stops. The relative error in traffic assignment is calculated on the master node. For each OD pair on the traffic network, the set of paths remains unchanged. An iterative algorithm is used to adjust traffic flow between the private car mode and the subway mode. If traffic flow converges, the urban traffic network flow is determined based on the traffic flow on the updated paths. Otherwise, the algorithm returns to step 3 and broadcasts the updated segment costs from the master node to each worker node.
[0077] Specifically, the time used in this embodiment is time in a broad sense, including the travel time perceived by the travelers and the costs incurred during the travel process.
[0078] The above-mentioned two-stage parallel combined mode division and traffic assignment method uses the proposed two-stage parallel technology to establish a master node and T-1 worker nodes. The master node is responsible for calculating network-wide path flow adjustments, while the T-1 worker node is responsible for calculating the shortest paths between OD pairs. Then, at each node, by obtaining the operating parameters of the city's road traffic network, setting the traffic flow allocation accuracy threshold M and the calculation parameter FreC, a two-stage parallel method is used to calculate the shortest path tree for each starting point. Based on the shortest path tree, the shortest paths between each OD pair are determined. A path set is established for each OD pair. The latest shortest path results between OD pairs calculated by the T-1 worker nodes are then collected on the master node. The shortest path between the OD pairs is added as the initial path to the path set corresponding to that OD pair, and the travel demand between the OD pairs is loaded onto the initial path corresponding to that OD pair. Afterwards, on the master node, the traffic flow is adjusted between the private car mode and the subway mode, and the traffic flow on the path is superimposed on the road segment in the road network to obtain the section flow, and the section travel time is updated based on the updated section flow, and then the updated section travel time is broadcast to all working nodes. Then, on the T-1 working node, for each OD pair on the road traffic network, the shortest path tree of each starting point is updated in parallel based on the updated section travel time; the shortest path of each OD pair is compared with all paths in the path set of the OD pair. If the shortest path does not exist in the existing path set, the shortest path is added to the path set, and the path flow on the path is temporarily set to 0. Then, the latest shortest path results between ODs calculated by the T-1 working node are collected on the master node. Then, on the master node, the BCD-AGP algorithm is used to iteratively compare the shortest path costs of private cars. Running time and cost of subway lines In the first case, Calculate the second order of the objective function and then update the private car path flow and subway line flow. In the second case, The second-order objective function is calculated, and then the private car route flow and subway line flow are updated. This adjusts the traffic flow between private car mode and subway mode. If the traffic flow converges, the urban transportation network flow is determined based on the traffic flow on the updated route, enabling rapid and high-precision monitoring of the urban transportation network flow and rapid allocation of the urban transportation network flow. Otherwise, the process returns to step 3 and broadcasts the updated road segment costs from the master node to T-1 working nodes.
[0079] Specifically, in step 1, a two-stage parallel process is set up in the computer cluster, and basic parameters of the urban road traffic network are input to each node. The specific process includes:
[0080] Step 101, setting up two-stage parallel processing in a computer cluster;
[0081] We have T compute nodes, each with M threads. Each starting point has index o, and if o%(T×M-1) is equal to a thread i th The index of o, then the shortest path tree based on o has thread i th calculate.
[0082] Step 102: input the objective function equation and constraint conditions;
[0083]
[0084] Constraints:
[0085]
[0086]
[0087]
[0088] In the formula, the objective function (1) consists of two terms, reflecting the elasticity of congestion effect and OD demand on network service level. Formula (2) is the flow conservation condition. Equations (3)-(4) are non-negative constraints on decision variables (i.e., private car path flow and subway line flow). Where A represents the set of road segments, a∈A; W represents the set of OD pairs, od∈W; P od Represents the path set between OD and od, p∈P od ; represents the traffic on path k between OD pair od; v′ a and v″ a Represent non-shortest path k and shortest path respectively Traffic flow on the road section; t a (v) represents the impedance function of section a; It represents the relationship matrix between the road segment and the path. When the road segment a is on the k-th path of the OD pair od, the value is 1, otherwise, the value is 0; represents the upper limit of OD's travel demand between od, q od It is the demand for the private car model. It is the demand of subway mode. in is the inverse demand function of OD pair association under the subway mode
[0089] Step 103: Set the private car road section impedance function t a (v) and the operating costs of the subway lines Where t0 is the free flow travel time, C a is the traffic flow carrying capacity on road section a, α and β are preset parameters, v aIt represents the flow rate of road section a. The specific calculation formula is as follows:
[0090]
[0091] The operating cost of a subway line can be expressed using a binary logit function:
[0092]
[0093] In the formula is the metro mode demand between OD pairs; and The difference between represents the flow demand between OD pairs, which is determined by the sum of the path flows of the OD pairs; the discrete parameter γ is a constant, reflecting the sensitivity of demand to travel costs; is the fixed travel time of the subway mode between the OD pairs, which is fixed and reflects the subway operation time; is a constant, which represents the walking time between OD pairs in the subway mode, that is, the sum of the time it takes for passengers to travel from the departure point to the subway station and the time it takes for passengers to travel from the subway station to the destination.
[0094] Specifically, the shortest path tree calculations in steps 2, 3, and 5 are all solved using a two-stage parallel computing method. In the transportation network, a single-source shortest path algorithm is used in parallel on all starting points on the working node to solve the shortest path tree between a single starting point and other nodes on the network. Between steps 2 and 3, a distributed data structure is required to transmit (send and receive) data between computer nodes in a one-to-many or many-to-one manner. The specific process includes:
[0095] Step 201: The first data structure is a global distributed array / matrix. The OD set is divided into T×M-1 OD subsets by T×M-1 threads to generate new paths in parallel. Each row of the matrix is used to store the new path of the OD pair. The total number of rows is equal to the total number of OD pairs. The row length is fixed and predefined, and it selects the path with the maximum length from the paths set when the path is first generated. The distributed matrix collects the paths generated from multiple worker computers (path generation modules) to the main computer (path flow regulation module). In addition, in order to distinguish between the array initialization "0" and the segment index "0", we need to calculate the relative value from 1, so we need to add 1 before the calculation and subtract 1 after the calculation.
[0096] Step 202: Distributed global dynamic array. When the path flow of each OD pair is adjusted to zero (or close to zero), it should be deleted from the path setting. Although each OD pair has a different number of paths, it is difficult to record the deleted path index on a distributed computing platform. The distributed global dynamic array provides a fixed-length storage space for each OD pair to store the inactive / deleted path index. This global dynamic array stores the path order between OD pairs in the path generation module, and then stores the deleted path settings in the path flow adjustment module in the main loop. After the path flow adjustment module is completed, the global dynamic array storing the deleted paths is broadcast from the main computer to all working computers. Finally, these paths are deleted in parallel before the next path generation module is implemented on the working computer.
[0097] Specifically, on the master node, the path set W of OD pairs on the road traffic network is divided into several subsets including:
[0098] 0 In the BCD method, the OD pairs can be grouped using the index grouping rule. Break it down into several blocks Set the OD pairs Divide into blocks, the number of OD pairs in the block. Let od_index, denote the index of OD pairs starting from 1. Block i∈{1,...,|W| / m},
[0099] od_index=i+k×G,k∈{1,…,m},i∈Block(W i ) (25)
[0100] Step 412: The remaining OD pairs are grouped into the last block. In this way, the OD pairs in the same block will not be closely related (coupling means that the paths in the same block have many overlapping sections). In this paper, the AGP algorithm is used to adjust the balanced flow of multiple OD pairs between the private car mode and the subway mode in parallel.
[0101] Step 413: Set an upper threshold of the number of iterations i, represented by a value MaxI. Once the number of iterations i is greater than or equal to MaxI, the current step stops and the accuracy error of the road traffic network in the private car mode and the subway mode is calculated.
[0102] Step 414: Determine whether i is an integer multiple of FreC. If i is an integer multiple of FreC, divide the path set W of the OD pairs on the road traffic network into several subsets. Otherwise, divide the path set W of the OD pairs into a reduced number of subsets. Split into several subsets and create an empty restricted OD set Used to store OD pairs; some subsets include W i, subscript i represents the i-th subset;
[0103] Specifically, in step 4, for each OD pair on the transportation network, the path set is kept unchanged, and the combined block coordinate descent and adaptive gradient algorithm (BCD-AGP) algorithm is used to iteratively update the path traffic flow in the private car mode and the subway mode. The specific process is as follows:
[0104] Step 421: Mode division between private car and subway modes. In the equilibrium state, the running time of each OD pair through the private car line is Should be compared with the running time of each pair of OD on the subway line Therefore, the subway subnet function of the mode division is:
[0105]
[0106] Where, is the shortest cost path between OD pairs; is the shortest cost path for private cars between OD pairs. Or, since Eq. (8) can be rearranged to obtain the mode partitioning of the private car mode subnetwork as follows:
[0107]
[0108] The modal ratio of the subway system is It can be calculated as:
[0109]
[0110] Step 422: Select private car mode or subway mode based on the route fee.
[0111] In the first case, when the costs of the two modes are equal (i.e., ), there is no need to readjust the mode division between the two modes.
[0112] In the second case, when the cost of the shortest path is higher than the cost of the excess demand, i.e. When the number of passengers increases, the subway mode is preferred. The AGP algorithm is used to adjust the path flow and excess demand.
[0113]
[0114]
[0115]
[0116] In the third case, the cost of the shortest path for private cars is lower than the cost of the subway line, i.e. Passengers prefer private car mode. The AGP algorithm is used to update the subway line flow, non-shortest path flow, and shortest path flow as follows:
[0117]
[0118]
[0119]
[0120]
[0121] Specifically, in step 4.3, if the accuracy of the OD pair is insufficient, it is necessary to use the descent algorithm to adjust the path flow between the private car mode and the subway mode in these OD pairs, and at the same time add these OD pairs with insufficient accuracy to a new restricted OD set. include:
[0122] Step 431: Calculate the precision error rg of the OD pair od ; If the accuracy error of OD pair rg od If the value is greater than the precision threshold M, the path flow between the OD pairs is adjusted using the optimization method; the OD pair is added to the OD pair set.
[0123] Step 432: Subset W i After all OD pairs in the private car mode and subway mode complete the flow adjustment, the updated path flow is re-superimposed on the road segment to update the road segment flow;
[0124] Step 433: updating the travel time of the road section whose traffic volume is adjusted;
[0125] Step 434: Return to step 431, update the path flow in the next subset in the private car mode and subway mode, and expand the OD pair set
[0126] Specifically, in step 5, for all OD pairs on the traffic network, the accuracy error rg of the traffic distribution in the private car mode and the subway mode is calculated. If the accuracy error rg is greater than the accuracy threshold M, it indicates that the travel demand on the urban road network has reached an equilibrium state and is consistent with the traveler's travel choice behavior, and the calculation ends; otherwise, M is updated to set M = rg / 2, and the process returns to step 3. The accuracy error rg is:
[0127]
[0128] in represents the minimum travel time between OD pairs, q od represents the travel demand between OD pairs, va represents the road flow, t a (v a ) represents the travel time of the road segment, A represents the set of road segments on the traffic network; the closer rg is to 0, the closer the network traffic flow is to the optimal solution.
[0129] Specifically, Figure 3 This example documents the implementation of the combined mode division and traffic assignment method based on two-stage parallel (TP) computation, described in this example, and compares it with the serial Adaptive Gradient Projection (AGP) traffic network flow assignment technique. TP significantly outperforms AGP (dashed line). Even in serial computation mode (solid line), TP significantly outperforms AGP. After parallel acceleration, TP achieves even faster convergence time (curved line).
[0130] Table 1. List of symbols in the present invention
[0131]
[0132] Compared to existing technologies, this embodiment offers faster calculation speeds and is suitable for solving large-scale traffic network pattern classification and traffic flow allocation problems. It can quickly assess traffic infrastructure, traffic management plans, and the impact of traffic incidents on urban road networks, thereby scientifically optimizing and rationally guiding traffic design and management plans. This plays a vital role in the smooth implementation of large-scale urban traffic management and planning projects.
[0133] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A two-stage parallel combined mode division and traffic assignment method, characterized in that: The steps include: S1. Set cluster parallelism, network topology and basic required parameters; S2, initialize the path set; S3, augmenting path set; S4, mode division and traffic flow allocation; S5. Determine the algorithm stopping condition. If the traffic flow converges, determine the urban traffic network flow based on the traffic flow on the updated path. Otherwise, return to S3 and broadcast the updated road segment cost from the master node to each working node. The specific steps of S1 are: Set up two-stage parallelism in a computer cluster, set up T computers, and each computer has M processors; set up a master computer, T-1 worker computers and T*M-1 worker processors; The master node is responsible for calculating the traffic adjustment of the entire network path, and the T-1 working node is responsible for calculating the shortest path between OD pairs; When inputting the basic parameters of the urban road traffic network, the distribution of private car and subway travel demand is input; the basic parameters of the traffic network include the free flow travel time of each road section, the traffic flow carrying capacity of the road section, the road section impedance function, and the traffic assignment accuracy threshold; The distribution of travel demand includes the traffic volume at the origin and destination points and between the origin and destination points; The specific steps of S3 are as follows: on T-1 working nodes, the path set is initialized in parallel; for each OD pair on the road traffic network, based on the updated road segment travel time, the shortest path tree of each starting point is updated using a two-stage parallel technique; the shortest path of each OD pair is compared with all paths in the path set of the OD pair; if the shortest path does not exist in the existing path set, the shortest path is added to the path set and the path flow on the path is temporarily set to 0. Then, the latest shortest path results between ODs calculated by the T-1 working nodes are collected on the master node; The specific steps of S4 are: applying the combined block coordinate descent and adaptive gradient algorithm on the master node to adjust the path flow, keeping the path set unchanged for each OD pair on the traffic network, and using the combined block coordinate descent and adaptive gradient algorithm to iteratively compare the shortest path costs of private cars Running time and cost of subway lines In the first case, Calculate the second order of the objective function and then update the private car path flow and subway line flow; in the second case, Calculate the second order of the objective function, and then update the private car path flow and subway line flow; thereby adjusting the traffic flow between the private car mode and the subway mode; if the traffic flow converges, determine the urban transportation network flow based on the traffic flow on the updated path; otherwise, return to S3 and broadcast the updated road section cost from the master node to T-1 working nodes.
2. The two-stage parallel combined mode division and traffic assignment method according to claim 1, characterized in that: In S1, a two-stage parallel process is set up in the computer cluster, and basic parameters of the urban road traffic network are input to each node. The specific process includes: S101. Set up two-stage parallelism on a computer cluster: T stage computing nodes, each node has M threads; the index of each starting point is o, if o% (T×M-1) equals a thread i th The index of o, then the shortest path tree based on o has thread i th calculate; S102. Input the objective function equation and constraints: Constraints: Where, the objective function (1) consists of two terms, reflecting the elasticity of congestion effect and OD demand on network service level respectively; Equation (2) is the flow conservation condition; Equations (3)-(4) are the non-negativity constraints on the decision variables, namely, private car path flow and subway line flow; where A represents the set of road sections, a∈A; W represents the set of OD pairs, od∈W; P od Represents the path set between OD and od, p∈P od ; represents the traffic on path k between OD pair OD; v a ′ and v a ″ respectively represent non-shortest path k and shortest path Traffic flow on the road section; t a (v) represents the impedance function of section a; It represents the relationship matrix between the road segment and the path. When the road segment a is on the k-th path of the OD pair od, the value is 1, otherwise, the value is 0; represents the upper limit of OD's travel demand between od, q od It is the demand for the private car model. It is the demand of subway mode. in It is the inverse demand function of OD pair association under the subway mode; S103, setting the private car road section impedance function t a (v) and the operating costs of the subway lines Where t0 is the free flow travel time, C a is the traffic flow carrying capacity on road section a, α and β are preset parameters, v a It represents the flow rate of road section a. The specific calculation formula is as follows: The operating cost of a subway line can be expressed using a binary logit function: In the formula is the metro mode demand between OD pairs; and The difference between represents the flow demand between OD pairs, which is determined by the sum of the path flows of the OD pairs; the discrete parameter γ is a constant, reflecting the sensitivity of demand to travel costs; is the fixed travel time of the subway mode between the OD pairs, which is fixed and reflects the subway operation time; is a constant, which represents the walking time between OD pairs in the subway mode, that is, the sum of the time it takes for passengers to travel from the departure point to the subway station and the time it takes for passengers to travel from the subway station to the destination.
3. The two-stage parallel combined mode division and traffic assignment method according to claim 2 is characterized in that: The specific steps of S2 are as follows: On the T-1 working node, a two-stage parallel technology is used to parallelly calculate the shortest path tree of each starting point to determine the shortest path between each OD pair based on the shortest path tree. A path set is established for each OD pair, and the shortest path between the OD pairs is added as the initial path to the path set corresponding to the OD pair. The travel demand between the OD pairs is loaded onto the initial path corresponding to the OD pair; on the master node, the traffic flow is adjusted between the private car mode and the subway mode, and the traffic flow on the path is superimposed on the road section in the road network to obtain the section flow, and the section travel time is updated according to the updated section flow, and then the updated section travel time is broadcast to the T-1 working node.
4. The two-stage parallel combined mode division and traffic assignment method according to claim 3 is characterized in that: In S2, S3, and S5, the shortest path tree calculation is solved using a two-stage parallel computing method. In the traffic network, a single-source shortest path algorithm is used in parallel on all starting points on the working node to solve the shortest path tree between a single starting point and other nodes on the network. Between S3 and S4, a distributed data structure needs to be set up to transmit data between computer nodes in a one-to-many or many-to-one manner. The specific process includes: S201. The first data structure is a global distributed array / matrix. In the path generation module, the OD set is divided into T×M-1 OD subsets by T×M-1 threads to generate new paths in parallel. Each row of the matrix is used to store a new path for an OD pair. The total number of rows is equal to the total number of OD pairs. The row length is fixed and predefined, and it selects the path with the maximum length from the paths set when the path is first generated. The distributed matrix collects the paths generated from multiple worker computers to the master computer module. S202, distributed global dynamic array; when the path flow of each OD pair is adjusted to zero or close to zero, it should be deleted from the path setting.
Citation Information
Patent Citations
Park and ride facility optimal siting and capacity determining method based on rail transit
CN105760960A
Large-scale urban traffic network flow monitoring method based on block coordinate descent
CN112562325A