A bus route OD matrix combination prediction method

CN116415735BActive Publication Date: 2026-10-27CHONGQING INST OF GREEN & INTELLIGENT TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310450044.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-21
Publication Date
2026-10-27
Estimated Expiration
2043-04-21

AI Technical Summary

Technical Problem

这些方案不仅均存在不同程度的局限性,并且几乎都对数据量、计算力等有较高要求,即便能实现较高的准确度,也难以实现普及

Benefits of technology

[0037]本发明提供一种公交线路OD矩阵的代数组合预测方法,基于出行链理论,离线计算公交线路的修正系数及最优分布权重,可以直接用于OD矩阵的在线计算,使得OD矩阵的计算过程方便快捷,计算结果准确。一方面,可以根据当天待求解时间段及对偶时间段的上下车数据求解OD矩阵,用于分析;另一方面,可以根据前一天对偶时间段的下车数据以及当天待求解时间段的上车数据,真正实现OD矩阵的实时预测,这对于实时车辆调度等工作具有重要意义。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116415735B_ABST
    Figure CN116415735B_ABST
Patent Text Reader

Abstract

The application is a bus route OD matrix combination prediction method, belonging to the field of big data and intelligent transportation. The method comprises the following steps: S1: determining the to-be-solved time period and driving direction of the target route; S2: completing the boarding and alighting punch record of passengers; S3: determining the dual time period and its passenger number correction coefficient; S4: calculating the correction coefficient; S5: counting the historical OD matrix; S6: determining the expected alighting passenger number by using the correction coefficient; S7: constructing a combination distribution optimization model; S8: calculating the equilibrium coefficient; S9: calculating the optimal distribution weight of A; S10: directly calculating the OD matrix of the to-be-solved time period. After determining the parameters of the objective function by using a small amount of historical data, the application can be directly used for OD matrix estimation, is convenient and fast, can accurately realize the calculation and prediction of the OD matrix, and has important significance for bus data analysis and real-time vehicle scheduling and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to an algebraic combination prediction method for the OD matrix of bus routes, belonging to the fields of big data and intelligent transportation, and is particularly applicable to the algebraic combination prediction of the OD matrix of bus routes. Background Technology

[0002] Network planning is a broad and complex issue in public transportation management, and origin-destination (OD) passenger flow is a key indicator in its study. OD data reflects passenger travel patterns, enabling more detailed classification studies of individual and group travel, and serves as an important reference for network planning, scheduling, and operation. In a broad sense, OD data can represent the passenger flow relationship between two cities, areas, or bus station clusters, recording passenger activity within the region. In a narrow sense, OD data can be refined to the line-level OD, that is, for a specific bus route, statistical data is collected based on the boarding and alighting points of all passengers to form an OD matrix. The OD matrix has direct reference value for bus scheduling and dispatching.

[0003] However, currently, with the exception of a very few cities, most cities only implement a card-swiping system when boarding buses, lacking data on card-swiping upon disembarking. This prevents the formation of a closed-loop data chain in passenger flow analysis, posing significant challenges to origin-destination (OD) analysis. In fact, this difficulty could be resolved by establishing rules for card-swiping upon disembarking and installing relevant equipment on all buses. However, due to economic considerations and passenger habits, this solution has not been widely adopted. Therefore, in the data base for network planning, it is necessary to select other indirect methods to infer the required data.

[0004] Commonly used methods for predicting OD (Original Departure) matrices primarily rely on passenger travel chain theory to infer passenger alighting points, then statistically analyze OD information to construct an OD matrix. These methods not only have varying degrees of limitations but also almost universally require substantial data and computational power, hindering widespread adoption even when high accuracy is achieved. Therefore, a simple and convenient OD matrix prediction method is one of the urgent problems to be solved in the current development of smart public transportation. Summary of the Invention

[0005] The purpose of this invention is to provide an algebraic combination prediction method for the OD matrix of a bus route. Based on a small amount of historical data, this method aims to calculate the OD matrix element values ​​for the target bus route and direction during the time period to be solved, by statistically analyzing the number of passengers boarding during the time period and the number of passengers boarding at each station in the opposite direction during the dual time period, and by using a combination distribution optimization model with pre-determined parameters.

[0006] Since most passenger trips are bidirectional (or equivalently bidirectional), meaning that passengers traveling by bus usually return on the same bus, and their boarding and alighting stops correspond to each other, for all passengers boarding at various stops along direction 1 during a certain time period (defined as the "time period to be solved"), if we can find the time interval during which these passengers return in a concentrated manner (defined as the "dual time period"), then the number of passengers boarding at various stops along direction 2 during the dual time period can be regarded as the number of passengers alighting at various stops during the time period to be solved in direction 1. Using the number of passengers boarding and alighting during the time period to be solved, a nonlinear optimization model can be used to solve for the optimal solution of each element of the OD matrix.

[0007] Table 1 OD Matrix Diagram

[0008]

[0009] As shown in Table 1, the OD matrix, a ij S represents the number of people who boarded at station i and alighted at station j. i T represents the total number of people who boarded at station i. i This represents the total number of people who got off at station j. Of all the parameters, only S... i It is known that, due to T i The unknown can be solved by finding the dual time interval S′. i Calculate the approximate T i Then find all of a. ij .

[0010] To achieve the above objectives, the present invention provides the following technical solution:

[0011] S1: The operator inputs the bus route, driving direction, and time period to be solved through the client;

[0012] S2: The server uses historical passenger boarding and alighting records offline to supplement the historical passenger boarding and alighting records of each route in the bus operating area based on the travel chain theory.

[0013] S3: When the server is offline, it determines the dual time period corresponding to the time period to be solved based on the historical passenger boarding and alighting records of the corresponding bus route.

[0014] S4: When the server is offline, calculate the average number of passengers alighting at each station in the direction of travel during the historical time period to be solved. The average number of passengers boarding at each station in the reverse direction during the historical dual time period. Determine the correction factor

[0015] S5: The server generates a historical OD matrix offline; where the rows and columns of the OD matrix correspond to stations, and the elements are the number of passengers from the origin station to the destination station.

[0016] S6: The number of passengers boarding at each station in the direction of travel during the offline period is S_supposed to be solved. i And the number of passengers S′ boarding at each station in the opposite direction during the dual time period. i And determine the expected number of passengers T alighting at each station in the direction of travel during the time period to be solved. i =αS′ i ;

[0017] S7: For offline servers, an optimization model based on Poisson and geometric distribution theories is established using a combined distribution.

[0018] (1) Poisson Distribution Theory Model: The number of stops between a passenger's boarding and alighting points follows a Poisson distribution. That is, after a passenger boards at a certain station, the number of stops between the passenger's boarding and alighting points follows a Poisson distribution law. For a passenger who boards at a certain station, the probability of choosing a stop with a certain number of stops between their boarding and alighting points is: Where i represents the i-th boarding station; λ i Let represent the average number of stops between stops at the i-th stop. Multiplying this probability density by the number of passengers boarding at stop i yields the number of passengers alighting at subsequent stops, expressed as: Where, ε n It is a Poisson slack variable, |ε n The smaller the value of |, the more a ij The closer the distribution conforms to the Poisson distribution, the better. Therefore, the optimization objective based on the Poisson distribution is to make all elements in the OD matrix follow a Poisson distribution as closely as possible, i.e., ∑|ε n The minimum optimization objective function is: Where j > i.

[0019] (2) Geometric Distribution Theoretical Model: The OD matrix also exhibits another pattern, namely, the column elements of the OD matrix follow a geometric distribution: Where j > i, j > k. In this type of distribution, the ratio of the number of passengers who board at any two stations and alight at the same station is approximately equal to the ratio of the number of passengers who board at those two stations. This distribution can be described as follows: the more passengers board at a certain station, the greater the probability that the passengers alighting at subsequent stations are from that station. Similar to the Poisson distribution, the geometric progression model can be rewritten as: (j>i,j>k), where ε′ n For the geometric slack variable, |ε′ n The smaller the value of |, the more closely the matrix column elements conform to a geometric distribution. The optimization objective based on the geometric distribution requires that all |ε′ that can be constructed into a geometric relationship be such that...n To minimize the sum of |, the optimization objective function based on the geometric distribution is set as follows: Where j > i, j > k. In the geometric distribution model, since the OD matrix is ​​an upper triangular matrix, the number of geometric distribution expressions that can be constructed for each column is not the same, and there are free variables.

[0020] (3) Combination distribution optimization model: Combining the theoretical models of Poisson distribution and geometric distribution, the combination distribution optimization model is constructed as: min f=A·f1+(1-A)·R·f2, where R is the equilibrium coefficient, the purpose of which is to control the optimal solutions of f1 and f2 to be on the same order of magnitude;

[0021] A represents the distribution weight, used to control the distribution ratio of the two models. When A = 0, the model follows a perfectly geometric distribution; when A = 1, the model follows a perfectly Poisson distribution. Since this model is a non-convex nonlinear optimization model, the obtained solution cannot be guaranteed to be the global optimum. Therefore, an equivalent transformation is needed to convert it into a convex optimization model. The target model for this transformation is the QP model. Therefore, the main approach is to convert the absolute value to a squared term and remove the unknowns in the denominator of the geometric distribution model, resulting in the final optimization objective function:

[0022]

[0023] The restrictions are: When i≥j, a ij =0; when i<j, a ij ≥0;

[0024] For a matrix with n bus stops, The program has a feasible solution when the range of values ​​of satisfies the following condition:

[0025]

[0026] This set of inequalities can be obtained from the definition of the OD matrix shown in Table 1;

[0027] S8: When the server is offline, the optimal values ​​of the combined distribution optimization model when A=0 and A=1 are f1 and f2. Calculate the equilibrium coefficient R=f1 / f2.

[0028] S9: Set the offline step size for the server, traverse the interval A∈[0,1], calculate the residual between the historical OD matrix and the predicted OD matrix; when the residual is the smallest, select it as the optimal distribution weight of A;

[0029] S10: Using the combined distribution optimization model, equilibrium coefficient, optimal distribution weight of A, the number of passengers boarding at each station in the driving direction during the time period to be solved, and the number of passengers boarding at each station in the opposite direction during the dual time period, the server directly calculates the OD matrix of the time period to be solved online and sends the results to the operator.

[0030] Among them, a ij Let l be the element in the i-th row and j-th column of the predicted OD matrix; i, j, and k are the corresponding stations; i Let be the average number of stops from the destination station for passengers boarding at the i-th station.

[0031] Furthermore, the dual time period mentioned in step S3 is the concentrated time period of passengers returning from the time period to be solved. There are two calculation methods: (1) the time period with the most passengers returning from the time period to be solved with a fixed duration is the dual time period; (2) the time period with the shortest return time of passengers from the time period to be solved with a fixed proportion is the dual time period.

[0032] Furthermore, the correction coefficient mentioned in step S4 can be selected from some recent historical data and calculated based on the average number of passengers alighting at each station in the driving direction during the time period to be solved and the average number of passengers boarding at each station in the opposite direction during the dual time period, so as to make the prediction more accurate.

[0033] Furthermore, the solution to the combined distribution optimization model described in step S7 can be achieved using the Lagrange method, genetic algorithm, or neural network method.

[0034] Furthermore, the step size described in step S9 can be adaptively adjusted according to the magnitude of the residual.

[0035] Furthermore, when the number of stops in both directions of a bus route is not equal, different stops in the direction of the bus route with more stops will be merged with its neighboring stops to ensure that the number of stops in both directions of the bus route is equal.

[0036] Furthermore, there are two dual time periods: one is a time period before the time period to be solved, and the other is a time period after the time period to be solved. Among them, the passenger information of the dual time period before the time period to be solved can be used to predict the OD matrix; the passenger information of the dual time period after the time period to be solved can be used to quickly calculate the OD matrix.

[0037] This invention provides an algebraic combination prediction method for the OD matrix of bus routes. Based on travel chain theory, it calculates the correction coefficients and optimal distribution weights of bus routes offline, which can be directly used for online calculation of the OD matrix, making the calculation process convenient, fast, and accurate. On the one hand, the OD matrix can be solved based on the boarding and alighting data of the time period to be solved and its dual time period for analysis; on the other hand, it can achieve real-time prediction of the OD matrix based on the alighting data of the dual time period of the previous day and the boarding data of the time period to be solved on the current day. This is of great significance for real-time vehicle scheduling and other tasks. Attached Figure Description

[0038] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the following figures are provided for illustration:

[0039] Figure 1 This is a flowchart of the model construction process in Embodiment 1 of the present invention;

[0040] Figure 2 This is a schematic diagram illustrating the determination of the dual time periods for bus routes in Embodiment 1 of the present invention;

[0041] Figure 3 The curves showing the variation of errors of each item in the OD matrix of the bus route in Embodiment 1 of the present invention with the distribution weights are shown; where the horizontal axis represents the distribution weights and the vertical axis represents the errors. Detailed Implementation

[0042] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. Unless otherwise specified, the following embodiments and features described therein can be combined with each other.

[0043] Implementation Case: Taking the 507 bus route in a certain city as the test route, the target is to predict the OD matrix of a certain direction (defined as "direction 1") during the weekday 7:00-9:00 (i.e. morning rush hour).

[0044] Combination Figure 1 This invention provides "an algebraic combination prediction method for the OD matrix of bus routes", the specific scheme of which includes the following steps:

[0045] S1: The operator inputs the bus route, driving direction, and time period to be solved through the client;

[0046] S2: The server uses historical passenger boarding and alighting records offline to supplement the historical passenger boarding and alighting records of each route in the bus operating area based on the travel chain theory.

[0047] S3: When the server is offline, it determines the dual time period corresponding to the time period to be solved based on the historical passenger boarding and alighting records of the corresponding bus route.

[0048] S4: When the server is offline, calculate the average number of passengers alighting at each station in the direction of travel during the historical time period to be solved. The average number of passengers boarding at each station in the reverse direction during the historical dual time period. Determine the correction factor

[0049] S5: The server generates a historical OD matrix offline; where the rows and columns of the OD matrix correspond to stations, and the elements are the number of passengers from the origin station to the destination station.

[0050] S6: The number of passengers boarding at each station in the direction of travel during the offline period is S_supposed to be solved. i And the number of passengers S′ boarding at each station in the opposite direction during the dual time period. i And determine the expected number of passengers T alighting at each station in the direction of travel during the time period to be solved. i =αS′ i ;

[0051] S7: For offline servers, an optimization model based on Poisson and geometric distribution theories is established using a combined distribution.

[0052]

[0053] S8: When the server is offline, the optimal values ​​of the combined distribution optimization model when A=0 and A=1 are f1 and f2. Calculate the equilibrium coefficient R=f1 / f2.

[0054] S9: Set the offline step size for the server, traverse the interval A∈[0,1], calculate the residual between the historical OD matrix and the predicted OD matrix; when the residual is the smallest, select it as the optimal distribution weight of A;

[0055] S10: Using the combined distribution optimization model, equilibrium coefficient, optimal distribution weight of A, the number of passengers boarding at each station in the driving direction during the time period to be solved, and the number of passengers boarding at each station in the opposite direction during the dual time period, the server directly calculates the OD matrix of the time period to be solved online.

[0056] In step S3:

[0057] Using travel chain theory, the alighting stations of all passengers who checked in on this route over the past month were predicted. Based on the card number, all card numbers with check-in records along direction 1 between 7:00 and 9:00 were examined to find the time period during which these card numbers returned to check in along direction 2, and the number of check-ins in each time period was recorded (e.g., ...). Figure 2 (As shown). The time interval during which this group of passengers returns is set as the dual time period (in this case, the dual time period is 16:00-19:00).

[0058] In step S4:

[0059] Based on the passenger data obtained in step S3, the average number of passengers alighting at each station in direction 1 during the time period of 7:00-9:00 is calculated on a daily basis. And the average number of passengers boarding at each station in direction 2 during the paired time period of 16:00-19:00. The correction factor is Because public transportation operations are cyclical, recent passenger data should be selected to ensure more accurate subsequent forecasts.

[0060] In step S6:

[0061] For the remaining passenger data obtained in step S3, the number of passengers boarding at each station in direction 1 during the time period of 7:00-9:00 is counted in "days". i And the number of passengers S′ boarding at each station in direction 2 during the paired time period of 16:00-19:00. i The expected number of passengers disembarking at each station in direction 1 during the time period to be solved is calculated as T. i =αS′ i .

[0062] In step S7:

[0063] This case study uses the Lagrange method to solve the problem.

[0064] In step S8:

[0065] A=0 indicates that the model perfectly conforms to a geometric distribution, and A=1 indicates that the model perfectly conforms to a Poisson distribution.

[0066] In step S9:

[0067] The step size *s* is determined as needed; the smaller *s*, the more accurate the final optimal distribution ratio. The resulting OD matrices under different distribution weights are independent and unrelated. For a complete calculation cycle, multiple sets of predicted OD matrices are obtained based on the step size (21 sets of predicted OD matrices when the step size is constant at 0.5, corresponding to 21 distribution weights), and one historical OD matrix (inferred from travel chain theory). The corresponding elements of each predicted OD matrix are subtracted from the corresponding elements of the historical OD matrix, and the absolute value is taken to obtain the residual matrix. All elements of the residual matrix are summed to obtain the cumulative residual value. The distribution weight corresponding to the result with the smallest cumulative residual value is the optimal distribution weight. For example... Figure 3 As shown, in this example, the optimal distribution weight is around 0.6, and its related error metrics are listed, including: mean squared error; 2-norm of the residual matrix; and 2-norm of the population probability density residual matrix.

[0068] In step S10:

[0069] Having completed the aforementioned steps, we can now determine the appropriate correction coefficients and optimal distribution weights for the model for the route during the 7:00-9:00 timeframe in direction 1. Therefore, when calculating the OD matrix for the route during the 7:00-9:00 timeframe in direction 1, we only need to count the number of passengers boarding at each station in direction 1 during this timeframe and the number of passengers boarding at each station during the dual timeframe of direction 2 (16:00-19:00). Inputting these data into the model will directly yield the OD matrix.

[0070] To better demonstrate the beneficial effects of the present invention, combined with Figure 3 This embodiment calculates four sets of error variation curves with distribution weights to find the optimal distribution weights, and also visually demonstrates the advantages of the combined model compared to a single model. For example... Figure 3 As shown, the absolute value error represents the cumulative value of the absolute values ​​of the element residuals between the calculated OD matrix and the actual OD matrix, and its calculation formula is:

[0071]

[0072] Mean squared error represents the mean squared difference between the residual values ​​of the calculated OD matrix and the actual OD matrix. Its calculation formula is:

[0073]

[0074] The absolute difference 2-norm represents the 2-norm of the residual matrix between the calculated OD matrix and the actual OD matrix. It measures the distance between two matrices, and its formula is as follows:

[0075]

[0076] The overall probability density difference L2 norm represents the L2 norm of the residual matrix between the elements of the probability density matrices corresponding to the OD matrix and the actual OD matrix, and is used to measure the distance between the two probability density matrices. Since the elements in the i-th row of the OD matrix all represent passengers who boarded at the i-th station, then the j-th element in that row and S... i The ratio of the two probabilities is the probability density of a passenger boarding at station i and disembarking at station j. The matrix formed by all probability density elements is called the probability density matrix. The formula for calculating the L2 norm of the population probability density difference is:

[0077]

[0078] Among them, a ij This indicates calculating the element in the i-th row and j-th column of the OD matrix. This represents the element in the i-th row and j-th column of the actual OD matrix.

[0079] It is evident that the optimal distribution weight calculated by the method of this invention in this embodiment is optimal in any error index.

[0080] Finally, it should be noted that the above preferred embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made to it in form and detail without departing from the scope defined by the claims of the present invention.

Claims

1. An algebraic combination prediction method for bus route OD matrices, characterized in that, Includes the following steps: S1: The operator inputs the bus route, driving direction, and time period to be solved through the client; S2: The server uses historical passenger boarding and alighting records offline to supplement the historical passenger boarding and alighting records of each route in the bus operating area based on the travel chain theory. S3: When the server is offline, it determines the dual time period corresponding to the time period to be solved based on the historical passenger boarding and alighting records of the corresponding bus route. S4: When the server is offline, calculate the average number of passengers alighting at each station in the direction of travel during the historical time period to be solved. The average number of passengers boarding at each station in the opposite direction during the historical dual time period is statistically analyzed. Determine the correction factor ; S5: The server generates a historical OD matrix offline; where the rows and columns of the OD matrix correspond to stations, and the elements are the number of passengers from the origin station to the destination station. S6: Server offline statistics on the number of passengers boarding at each station in the direction of travel during the time period to be solved. And the number of passengers boarding at each station in the opposite direction during the paired time period. And determine the expected number of passengers alighting at each station in the direction of travel during the time period to be solved. ; S7: For offline servers, an optimization model based on Poisson and geometric distribution theories is established using a combined distribution. ; S8: When the server is offline and The optimal value of the time-varying combination distribution optimization model is and Calculate the equilibrium coefficient ; S9: Set the step size for server offline, and traverse the interval. Calculate the residuals between the historical OD matrix and the predicted OD matrix; select the matrix with the smallest residual. The optimal distribution weights; S10: Utilizing the combined distribution optimization model, equilibrium coefficient, The optimal distribution weights, the number of passengers boarding at each station in the direction of travel during the time period to be solved, and the number of passengers boarding at each station in the opposite direction during the dual time period are used to directly calculate the OD matrix of the time period to be solved online by the server. in, The predicted OD matrix corresponds to the first Line number Column elements; , , For the corresponding site; For the first The average number of stops from the destination for passengers boarding at each station; The dual time period mentioned in step S3 is the concentrated time period of passengers returning from the time period to be solved. There are two calculation methods: (1) The time period with the most passengers returning from the time period to be solved with a fixed duration is the dual time period; (2) The time period with the shortest return time of passengers from the time period to be solved with a fixed proportion is the dual time period. There are two dual time periods: one is a time period before the time period to be solved, and the other is a time period after the time period to be solved. Passenger information in the dual time period before the time period to be solved is used to predict the OD matrix; passenger information in the dual time period after the time period to be solved is used to quickly calculate the OD matrix.

2. The algebraic combination prediction method for the OD matrix of a bus route according to claim 1, characterized in that: The recent historical data of the correction coefficient selection part mentioned in step S4 is calculated based on the average number of people getting off at each station in the driving direction during the time period to be solved and the average number of people getting on at each station in the opposite direction during the dual time period, so as to make the prediction more accurate.

3. The algebraic combination prediction method for the OD matrix of a bus route according to claim 1, characterized in that: The solution to the combined distribution optimization model described in step S7 is obtained using the Lagrange method, genetic algorithm, or neural network method.

4. The algebraic combination prediction method for the OD matrix of a bus route according to claim 1, characterized in that: When the number of stops in both directions of a bus route is not equal, the different stops in the direction of the bus route with more stops will be merged with its neighboring stops to ensure that the number of stops in both directions of the bus route is equal.

5. The algebraic combination prediction method for the OD matrix of a bus route according to claim 1, characterized in that: The step size described in step S9 is adaptively adjusted according to the magnitude of the residual.

Citation Information

Patent Citations

  • Real-time bus passenger analysis system and construction method thereof

    CN106777703A

  • Method and device for updating bus space-time OD matrix in real time

    CN111401663A