A parameter calibration method for travel / activity behavior choice model based on least squares method
Through the combination of least squares method and Kalman filter technology, the problem of robustness and accuracy in parameter calibration of residents' travel behavior selection model is solved, and fast and effective parameter calibration is achieved, which is suitable for a variety of models and improves transportation planning. accuracy.
Patent Information
- Application Number
- CN202011355525.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-27
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-11-27
AI Technical Summary
The parameter calibration of the resident travel behavior choice model lacks a standard calculation framework, resulting in insufficient robustness and accuracy of the model. The maximum likelihood estimation method is not suitable due to insufficient samples and computational complexity, making it difficult to obtain accurate results in a short time.
The parameter estimation method based on the least squares method is used, combined with Kalman filtering technology, to quickly complete parameter calibration through iterative search and simulated annealing methods to weaken the impact of data sampling errors.
It achieves fast and effective travel/activity behavior selection model parameter calibration, is suitable for the parameter calibration process of different models, improves the robustness and execution efficiency of the model, and reduces the requirement for the number of samples.
Smart Images

Figure CN112488381B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of travel behavior modeling and relates to a travel / activity behavior selection model parameter calibration method based on the least squares method. Background Art
[0002] Modeling and analyzing residents' travel behavior choices helps to accurately estimate the traffic demand in different areas of the city at different times, and provides a theoretical basis for management departments to plan and manage traffic systems. Commonly used behavior choice models can be divided into two categories. One is the behavior choice model based on the travel chain, the representative method is the "four-stage" analysis method, which is based on the interaction between land use and traffic system; the other is the behavior choice model based on activities. This model believes that travel is activity-oriented, and the value of activity behavior affects people's travel behavior decision-making process. Furthermore, some researchers have proposed a joint travel / activity behavior choice model, which can better consider the impact of joint decisions between travelers on individual travel choices. Relevant studies at home and abroad have shown that the joint travel / activity model can successfully simulate the joint travel / activity behavior between individuals numerically, and the effectiveness of this method can be proved in theory. However, the parameter calibration of residents' travel behavior choice model lacks a standard calculation framework. In previous work, the parameters of the model are often estimated by experienced engineers, which restricts the robustness and accuracy of different travel behavior choice models and indirectly affects the implementation effect of traffic planning measures.
[0003] Maximum likelihood estimation is a commonly used and effective unbiased estimation method, but the premise of applying maximum likelihood estimation is to have a sufficient number of samples. The travel / activity behavior choices of residents are usually obtained from traffic survey data. Due to the limitations of manpower and material resources, the amount of data samples obtained from traffic surveys is small and does not support the maximum likelihood estimation method. At the same time, due to the complexity of the traffic network, even with a sufficient number of samples, ordinary computers cannot calculate the convergence value of the maximum likelihood estimation in a short time. In summary, maximum likelihood estimation is not suitable for parameter estimation of residents' travel / activity behavior selection models. In order to fill the research gap, the present invention proposes a parameter estimation method based on least squares, and combines Kalman filtering technology to minimize the estimation bias caused by sampling errors, and uses limited sample values to efficiently complete the parameter calibration of residents' travel / activity behavior selection models. Summary of the invention
[0004] Purpose of the invention: In order to overcome the shortcomings of existing research, the present invention provides a method for calibrating the parameters of a travel / activity behavior selection model based on the least squares method. First, a travel / activity behavior selection model is selected to model the study area, and the necessary research data is collected through a questionnaire survey. Taking the minimum sum of squares of the deviations between the observed values and the model calculated values as the optimization goal, the parameter values of the model are continuously iterated and searched, and the Kalman filtering method is integrated to weaken the influence of data sampling errors on the model accuracy. The method proposed in the present invention can not only quickly and effectively complete the parameter calibration of the residents' travel / activity behavior selection model, but can also be further extended to the parameter calibration process of other models.
[0005] Technical solution: To achieve the purpose of the present invention, the technical solution adopted by the present invention is: the present invention provides a method for calibrating parameters of a travel / activity behavior selection model based on the least squares method, the method comprising the following steps:
[0006] (1) Define data types and perform preprocessing;
[0007] (2) Based on the least squares method, an upper-level optimization model is designed to solve the optimal estimation of the parameters of the travel / activity behavior choice model;
[0008] (3) Taking traffic distribution as the core, design the lower-level optimization model to solve the flow distribution in the traffic network;
[0009] (4) Using simulated annealing method to solve the two-layer optimization model and obtain the estimated values of the parameters;
[0010] (5) Apply the Kalman filter to smooth the estimated values of the parameters and output the final calibrated values of the parameters.
[0011] Furthermore, the specific implementation process of step (1) defining the data type and performing preprocessing is as follows:
[0012] 11): Define the input data attributes of the parameter calibration model as follows:
[0013] Date DATE: the traveler's travel date;
[0014] Record number ID: uniquely identifies each piece of data;
[0015] Traveler number MSISDN: uniquely identifies each traveler;
[0016] Traveler's family member number HOUSEHOLD_MEM: identifies the traveler's family member;
[0017] Trip starting point number START_LOCATION: the number of the trip starting area;
[0018] Trip destination number END_LOCATION: the number of the trip destination area;
[0019] Start time BEGIN_TIME: the start time of the traveler's trip;
[0020] End time END_TIME: the end time of the traveler's trip;
[0021] 12): Preprocess the data to extract residents’ travel and activity information;
[0022] 12.1): Resident travel behavior identification: ind represents a resident, IND represents the set of all residents. In the data attributes described in (11), if a data record of resident ind has START_LOCATION! = END_LOCATION and BEGIN_TIME < END_TIME, then the record is considered to be a trip of resident ind, and the symbol Trip is used. ind k To represent the kth trip of resident ind on a specified date, the symbol Trip represents the set of travel behaviors of all residents, and the symbol time travel To indicate the time it takes residents to complete a trip;
[0023] 12.2): Resident activity behavior identification: For the travel record of resident ind ind k If Trip ind k-1 END_LOCATION and Trip ind k START_LOCATION is the same as Trip ind k-1 END_TIME <Trip ind k BEGIN_TIME, it is considered that the resident is in Trip ind k-1 With Trip ind k There are activities between two trips, among which Trip ind k START_LOCATION of Trip ind k BEGIN_TIME with Trip ind k-1 The difference between END_TIME and END_TIME is the duration of the residents' activities, represented by the symbol time activity express;
[0024] 13): Identification of residents' joint travel behavior: If the START_LOCATION and END_LOCATION of resident ind are the same as the START_LOCATION and END_LOCATION of family member mem, and abs(BEGIN_TIME ind -BEGIN_TIME mem )+abs(END_TIME ind -END_TIME mem )<Time_gap, it is considered that the resident ind and the family member mem have joint travel behavior, where Time_gap is a given threshold and abs() is an absolute value function;
[0025] 14): Count the traffic flow of each path in the study area: A combination of a travel start point and a travel destination is called a travel path, represented by the symbol p, and the set of all paths in the study area is recorded as P. The number of people who travel from a certain travel start point to a travel destination on a specified date is called the traffic flow of the path. The travel behaviors and activity behaviors identified in steps 12 and 13 are counted according to different travel paths p. The sum of all traffic flows in the study area is the traffic demand of the area, represented by the symbol q.
[0026] Furthermore, the step (2) takes the least square method as the core, designs an upper optimization model, and solves the specific process of the optimal estimation of the parameters of the travel / activity behavior selection model as follows:
[0027] 21): Establish the objective function: Let the traffic flow of path p in the road network of the study area after data preprocessing in step (1) be o p , the parameter of the travel / activity behavior selection model to be calibrated is X, and the flow of each path p in the road network calculated by this model is f p , taking the least square method as the core idea, the objective function of the parameter calibration problem is obtained as:
[0028]
[0029] In the formula, min() is the minimum value function;
[0030] 22): Establish constraints: variable f in the objective function p and p The value range must be non-negative, and the constraints are:
[0031] f p ≥0 (2)
[0032] o p ≥0 (3).
[0033] Furthermore, the step (3) takes traffic distribution as the core, designs the lower-level optimization model, and solves the specific implementation process of the flow distribution in the traffic network as follows:
[0034] 31): Determine input and output: The input of the lower optimization model is the parameter X of the travel / activity behavior selection model to be calibrated and the traffic demand q of the study area; the output is the traffic flow f of different paths p in the traffic network of the study area p ;
[0035] 32): The travel demand q determined in step 31 is allocated to the road network in the study area using the travel / activity behavior selection model:
[0036] 32.1): Define the objective function: Assume that all residents choose the path with the highest satisfaction for a trip. The satisfaction of residents choosing path p is represented by It can be calculated by the following formula:
[0037]
[0038] In the formula, and are the residents’ satisfaction when they are doing activities on path p and their satisfaction when they are traveling on path p, respectively. The calculation formula is as follows:
[0039]
[0040] Where a1, b1, a2, b2 are constants; in formula (4), cf p is the satisfaction coefficient of residents and their family members when traveling together, and its value range is between [0,1], cf p The following formula can be used for calculation:
[0041]
[0042] In the formula, is the length of time residents spend on joint travel on path p; is the total length of time residents spend traveling or doing activities on path p; It indicates the proportion of residents’ joint travel time in path p to the total travel / activity time. X is the parameter to be calibrated in the travel / activity behavior selection model, and its value is greater than or equal to 0. is the maximum satisfaction that residents can obtain during a trip / activity, and the objective function of the lower optimization model is obtained:
[0043]
[0044] The physical meaning of this objective function is that all residents in the city choose the path with the highest satisfaction for travel or activities;
[0045] 33) Define the constraints. According to the physical meaning of the variables of the lower optimization model, the constraints of the lower optimization model are:
[0046]
[0047] Furthermore, the specific implementation process of using the simulated annealing method to solve the two-layer optimization model and obtain the estimated value of the parameter in step (4) is as follows:
[0048] 41): Solving the upper optimization model;
[0049] 41.0): Algorithm initialization: Set the algorithm annealing temperature T n The initial value T0, cooling factor σ<1, cooling step length N step ; Determine the algorithm stopping criteria, final temperature T stop and the maximum iteration step size N stop ; Initialize counter N count = m = n = l = 0; give the parameter value X of the trip / activity behavior selection model an initial value X0, and use the value of X0 to solve formulas (8)-(10) to obtain the road network traffic flow f p 0 Input into formula (1) to obtain the initial value of the objective function Z(X0);
[0050] 41.1): Solve the lower optimization model, let the counter l = l + 1, and use the formula Calculate X′, where Is the interval The random value on the graph, α is the search step length, and the value of X′ is used to solve formulas (8)-(10) to calculate the road network flow f at the lth iteration. p l ; The symbol G-value is used to represent the accuracy of the lower optimization model iteration, which can be calculated using the following formula:
[0051]
[0052] When the G-value is less than the given threshold, the lower optimization model stops iterating and the network flow f p l Input to the upper optimization model, obtain the objective function value Z(X′), and calculate Δ=Z(X′)-Z(X);
[0053] 41.2): Metropolis Principle:
[0054] 41.21): If Δ≤0, it means that the new parameter value X′ can reduce the objective function value of the upper-level planning. Let X=X′, m=m+1, and go to step 41.3. Otherwise, go to step 41.22;
[0055] 41.22): Let θ = exp(Δ / T n ), if θ>random value in the interval [0,1), let X=X′, m=m+1, and go to step 41.3, otherwise, go to step 41.23;
[0056] 41.23): Let m = m + 1, N count =N count +1, go to step 41.3;
[0057] 41.3): Annealing: If m<N step , then go to step 41.1, otherwise let n=n+1, T n =σ·T n-1 , m=0, go to step 41.4;
[0058] 41.4): Inner loop termination judgment: If N count >N stop or T n <T stop , the inner loop terminates and outputs the parameter value X at this time, otherwise go to step 41.1;
[0059] 42): Outer loop termination judgment: RGAP is the iterative error of the outer loop, and RGAP is calculated using the following formula:
[0060]
[0061] If RGAP<ε, where ε is the convergence accuracy, the outer loop ends and the parameter value X at this time is output; otherwise, go to step 41.0.
[0062] Furthermore, the step (5) applies a Kalman filter to smooth the estimated value of the parameter, and the specific implementation process of the final calibration value of the output parameter is:
[0063] 51): Initialization: Initialize the observation error W and system error V of the parameter value X calculated in step (4);
[0064] 52): Update the parameter value to be calibrated with the error: Let i be the number of iterations, incorporate the observation error and system error into the parameter estimation process, and update the value of parameter X using the following formula:
[0065] X i =φX i-1 +W (13)
[0066] Xi '=HX i +V (14)
[0067] Where φ is the state transfer matrix and H is the observation matrix;
[0068] 53): Use covariance to update the parameter value to be calibrated: record E i is the covariance matrix of the i-th iteration, then the covariance matrix E of the previous iteration is i-1 And the noise error W calculates the covariance matrix E of the new round of iteration i , the calculation formula is:
[0069] E i =φE i-1 φ T +W (15)
[0070] 54): Calculate the Kalman gain of the parameter to be calibrated: The calculation method of the Kalman gain Kg is:
[0071] Kg i =E i H T [HE i H T +V] -1 (16)
[0072] 55): Update the predicted value of the parameter to be calibrated: The parameter value calculated in the i-th round is X i =X i-1 +Kg i [X i '-HX i-1 ], and the covariance matrix E i = [I-Kg i H]E i-1 , where I is the identity matrix.
[0073] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:
[0074] (1) The method is highly applicable and can be applied to travel chain-based behavior choice models, activity-based behavior choice models, and combined travel / activity behavior choice models.
[0075] (2) Taking into account the limitations of the maximum likelihood estimation method, parameter calibration can be completed without a large amount of sample data;
[0076] (3) The objective function is to minimize the sum of squares of the deviations between the calculated flow and the observed flow, combined with custom constraints, which is theoretically strong;
[0077] (4) The objective function and constraints can be transformed into a standard minimization problem form, with a general solution algorithm and high execution efficiency;
[0078] (5) Compared with other inventions, this method involves relatively fewer parameters and has good robustness;
[0079] (6) Taking into account the sampling error problem of traffic survey data, a Kalman filter is designed to minimize the impact of observation data on model accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 It is a schematic flow chart of the method of the present invention;
[0081] Figure 2-Figure 3 They are respectively schematic diagrams of a joint travel / activity behavior pattern involved in the present invention;
[0082] Figure 4 is a schematic diagram of the road network in the study area of the present invention;
[0083] Figure 5 It is a graph of the inner loop convergence of the solution algorithm simulated annealing method in the present invention;
[0084] Figure 6 It is a graph showing the convergence of the outer loop of the simulated annealing method of the solution algorithm in the present invention;
[0085] Figure 7 This is a diagram showing the effect of parameter estimation after integrating Kalman filtering in the present invention. DETAILED DESCRIPTION
[0086] The accompanying drawings are only used for illustrative purposes and should not be construed as limiting the present patent.
[0087] It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0088] The present invention will be further described below in conjunction with examples and accompanying drawings.
[0089] The present invention provides a method for calibrating parameters of a travel / activity behavior selection model based on the least squares method, the method comprising the following steps:
[0090] (1) Define data types and perform preprocessing;
[0091] (2) Based on the least squares method, an upper-level optimization model is designed to solve the optimal estimation of the parameters of the travel / activity behavior choice model;
[0092] (3) Taking traffic distribution as the core, design the lower-level optimization model to solve the flow distribution in the traffic network;
[0093] (4) Using simulated annealing method to solve the two-layer optimization model and obtain the estimated values of the parameters;
[0094] (5) Apply the Kalman filter to smooth the estimated values of the parameters and output the final calibrated values of the parameters.
[0095] Furthermore, the specific implementation process of step (1) defining the data type and performing preprocessing is as follows:
[0096] 11): Define the input data attributes of the parameter calibration model as follows:
[0097] Date DATE: the traveler's travel date;
[0098] Record number ID: uniquely identifies each piece of data;
[0099] Traveler number MSISDN: uniquely identifies each traveler;
[0100] Traveler's family member number HOUSEHOLD_MEM: identifies the traveler's family member;
[0101] Trip starting point number START_LOCATION: the number of the trip starting area;
[0102] Trip destination number END_LOCATION: the number of the trip destination area;
[0103] Start time BEGIN_TIME: the start time of the traveler's trip;
[0104] End time END_TIME: the end time of the traveler's trip;
[0105] 12): Preprocess the data to extract residents’ travel and activity information;
[0106] 12.1): Resident travel behavior identification: ind represents a resident, IND represents the set of all residents. In the data attributes described in (11), if a data record of resident ind has START_LOCATION! = END_LOCATION and BEGIN_TIME < END_TIME, then the record is considered to be a trip of resident ind, and the symbol Trip is used. ind k To represent the kth trip of resident ind on a specified date, the symbol Trip represents the set of travel behaviors of all residents, and the symbol time travel To indicate the time it takes residents to complete a trip;
[0107] 12.2): Resident activity behavior identification: For the travel record of resident ind indk If Trip ind k-1 END_LOCATION and Trip ind k START_LOCATION is the same as Trip ind k-1 END_TIME <Trip ind k BEGIN_TIME, it is considered that the resident is in Trip ind k-1 With Trip ind k There are activities between two trips, among which Trip ind k START_LOCATION of Trip ind k BEGIN_TIME with Trip ind k-1 The difference between END_TIME and END_TIME is the duration of the residents' activities, represented by the symbol time activity express;
[0108] 13): Identification of residents' joint travel behavior: If the START_LOCATION and END_LOCATION of resident ind are the same as the START_LOCATION and END_LOCATION of family member mem, and abs(BEGIN_TIME ind -BEGIN_TIME mem )+abs(END_TIME ind -END_TIME mem )<Time_gap, it is considered that the resident ind and the family member mem have joint travel behavior, where Time_gap is a given threshold and abs() is an absolute value function;
[0109] 14): Count the traffic flow of each path in the study area: A combination of a travel start point and a travel destination is called a travel path, represented by the symbol p, and the set of all paths in the study area is recorded as P. The number of people who travel from a certain travel start point to a travel destination on a specified date is called the traffic flow of the path. The travel behaviors and activity behaviors identified in steps 12 and 13 are counted according to different travel paths p. The sum of all traffic flows in the study area is the traffic demand of the area, represented by the symbol q.
[0110] Furthermore, the step (2) takes the least square method as the core, designs an upper optimization model, and solves the specific process of the optimal estimation of the parameters of the travel / activity behavior selection model as follows:
[0111] 21): Establish the objective function: Let the traffic flow of path p in the road network of the study area after data preprocessing in step (1) be o p , the parameter of the travel / activity behavior selection model to be calibrated is X, and the flow of each path p in the road network calculated by this model is f p , taking the least square method as the core idea, the objective function of the parameter calibration problem is obtained as:
[0112]
[0113] In the formula, min() is the minimum value function;
[0114] 22): Establish constraints: variable f in the objective function p and p The value range must be non-negative, and the constraints are:
[0115] f p ≥0 (2)
[0116] o p ≥0 (3).
[0117] Furthermore, the step (3) takes traffic distribution as the core, designs the lower-level optimization model, and solves the specific implementation process of the flow distribution in the traffic network as follows:
[0118] 31): Determine input and output: The input of the lower optimization model is the parameter X of the travel / activity behavior selection model to be calibrated and the traffic demand q of the study area; the output is the traffic flow f of different paths p in the traffic network of the study area p ;
[0119] 32): The travel demand q determined in step 31 is allocated to the road network in the study area using the travel / activity behavior selection model:
[0120] 32.1): Define the objective function: Assume that all residents choose the path with the highest satisfaction for a trip. The satisfaction of residents choosing path p is represented by It can be calculated by the following formula:
[0121]
[0122] In the formula, and are the residents’ satisfaction when they are doing activities on path p and their satisfaction when they are traveling on path p, respectively. The calculation formula is as follows:
[0123]
[0124] Where a1, b1, a2, b2 are constants; in formula (4), cf p is the satisfaction coefficient of residents and their family members when traveling together, and its value range is between [0,1], cf p The following formula can be used for calculation:
[0125]
[0126] In the formula, is the length of time residents spend on joint travel on path p; is the total length of time residents spend traveling or doing activities on path p; It indicates the proportion of residents’ joint travel time in path p to the total travel / activity time. X is the parameter to be calibrated in the travel / activity behavior selection model, and its value is greater than or equal to 0. is the maximum satisfaction that residents can obtain during a trip / activity, and the objective function of the lower optimization model is obtained:
[0127]
[0128] The physical meaning of this objective function is that all residents in the city choose the path with the highest satisfaction for travel or activities;
[0129] 33) Define the constraints. According to the physical meaning of the variables of the lower optimization model, the constraints of the lower optimization model are:
[0130]
[0131] Furthermore, the specific implementation process of using the simulated annealing method to solve the two-layer optimization model and obtain the estimated value of the parameter in step (4) is as follows:
[0132] 41): Solving the upper optimization model;
[0133] 41.0): Algorithm initialization: Set the algorithm annealing temperature T n The initial value T0, cooling factor σ<1, cooling step length N step ; Determine the algorithm stopping criteria, final temperature T stop and the maximum iteration step size N stop ; Initialize counter N count = m = n = l = 0; give the parameter value X of the trip / activity behavior selection model an initial value X0, and use the value of X0 to solve formulas (8)-(10) to obtain the road network traffic flow f p 0Input into formula (1) to obtain the initial value of the objective function Z(X0);
[0134] 41.1): Solve the lower optimization model, let the counter l = l + 1, and use the formula Calculate X′, where Is the interval The random value on the graph, α is the search step length, and the value of X′ is used to solve formulas (8)-(10) to calculate the road network flow f at the lth iteration. p l ; The symbol G-value is used to represent the accuracy of the lower optimization model iteration, which can be calculated using the following formula:
[0135]
[0136] When the G-value is less than the given threshold, the lower optimization model stops iterating and the network flow f p l Input to the upper optimization model, obtain the objective function value Z(X′), and calculate Δ=Z(X′)-Z(X);
[0137] 41.2): Metropolis Principle:
[0138] 41.21): If Δ≤0, it means that the new parameter value X′ can reduce the objective function value of the upper-level planning. Let X=X′, m=m+1, and go to step 41.3. Otherwise, go to step 41.22;
[0139] 41.22): Let θ = exp(Δ / T n ), if θ>random value in the interval [0,1), let X=X′, m=m+1, and go to step 41.3, otherwise, go to step 41.23;
[0140] 41.23): Let m = m + 1, N count =N count +1, go to step 41.3;
[0141] 41.3): Annealing: If m<N step , then go to step 41.1, otherwise let n=n+1, T n =σ·T n-1 , m=0, go to step 41.4;
[0142] 41.4): Inner loop termination judgment: If N count >N stop or T n <T stop , the inner loop terminates and outputs the parameter value X at this time, otherwise go to step 41.1;
[0143] 42): Outer loop termination judgment: RGAP is the iterative error of the outer loop, and RGAP is calculated using the following formula:
[0144]
[0145] If RGAP<ε, where ε is the convergence accuracy, the outer loop ends and the parameter value X at this time is output; otherwise, go to step 41.0.
[0146] Furthermore, the step (5) applies a Kalman filter to smooth the estimated value of the parameter, and the specific implementation process of the final calibration value of the output parameter is:
[0147] 51): Initialization: Initialize the observation error W and system error V of the parameter value X calculated in step (4);
[0148] 52): Update the parameter value to be calibrated with the error: Let i be the number of iterations, incorporate the observation error and system error into the parameter estimation process, and update the value of parameter X using the following formula:
[0149] X i =φX i-1 +W (13)
[0150] X i '=HX i +V (14)
[0151] Where φ is the state transfer matrix and H is the observation matrix;
[0152] 53): Use covariance to update the parameter value to be calibrated: record E i is the covariance matrix of the i-th iteration, then the covariance matrix E of the previous iteration is i-1 And the noise error W calculates the covariance matrix E of the new round of iteration i , the calculation formula is:
[0153] E i =φE i-1 φ T +W (15)
[0154] 54): Calculate the Kalman gain of the parameter to be calibrated: The calculation method of the Kalman gain Kg is:
[0155] Kg i =E i H T [HE i H T +V] -1 (16)
[0156] 55): Update the predicted value of the parameter to be calibrated: The parameter value calculated in the i-th round is X i=X i-1 +Kg i [X i '-HX i-1 ], and the covariance matrix E i = [I-Kg i H]E i-1 , where I is the identity matrix. The effect of applying the Kalman filter smoothing parameter value is shown in the attached Figure 7 .
Claims
1. A method for calibrating parameters of travel / activity behavior choice model based on least squares method, It is characterized in that The method comprises the following steps: (1) Define data types and perform preprocessing; (2) Based on the least squares method, an upper-level optimization model is designed to solve the optimal estimation of the parameters of the travel / activity behavior choice model; (3) Taking traffic distribution as the core, design the lower-level optimization model to solve the flow distribution in the traffic network; (4) Using simulated annealing method to solve the two-layer optimization model and obtain the estimated values of the parameters; (5) Apply the Kalman filter to smooth the estimated values of the parameters and output the final calibrated values of the parameters; The specific implementation process of step (1) defining the data type and performing preprocessing is as follows: 11): Define the input data attributes of the parameter calibration model as follows: Date DATE: the traveler's travel date; Record number ID: uniquely identifies each piece of data; Traveler number MSISDN: uniquely identifies each traveler; Traveler's family member number HOUSEHOLD_MEM: identifies the traveler's family member; Trip starting point number START_LOCATION: the number of the trip starting area; Trip destination number END_LOCATION: the number of the trip destination area; Start time BEGIN_TIME: the start time of the traveler's trip; End time END_TIME: the end time of the traveler's trip; 12): Preprocess the data to extract residents’ travel and activity information; 12.1): Resident travel behavior identification: ind represents a resident, IND represents the set of all residents. In the data attributes described in (11), if a data record of resident ind has START_LOCATION! = END_LOCATION and BEGIN_TIME < END_TIME, then the record is considered to be a trip of resident ind, and the symbol Trip is used. ind k To represent the kth trip of resident ind on a specified date, the symbol Trip represents the set of travel behaviors of all residents, and the symbol time travel To indicate the time it takes residents to complete a trip; 12.2): Resident activity behavior identification: For the travel record of resident ind ind k If Trip ind k-1 END_LOCATION and Trip ind k START_LOCATION is the same as Trip ind k-1 END_TIME <Trip ind k BEGIN_TIME, it is considered that the resident is in Trip ind k-1 With Trip ind k There are activities between two trips, among which Trip ind k START_LOCATION of Trip ind k BEGIN_TIME with Trip ind k-1 The difference between END_TIME and END_TIME is the duration of the residents' activities, represented by the symbol time activity express; 13): Identification of residents' joint travel behavior: If the START_LOCATION and END_LOCATION of resident ind are the same as the START_LOCATION and END_LOCATION of family member mem, and abs(BEGIN_TIME ind -BEGIN_TIME mem )+abs(END_TIME ind -END_TIME mem )<Time_gap, it is considered that the resident ind and the family member mem have joint travel behavior, where Time_gap is a given threshold and abs() is an absolute value function; 14): Count the traffic flow of each path in the study area: A combination of a travel starting point and a travel destination is called a travel path, represented by the symbol p. The set of all paths in the study area is recorded as P. The number of people traveling from a certain travel starting point to a travel destination on a specified date is called the traffic flow of the path. The travel behaviors and activity behaviors identified in steps 12 and 13 are counted according to different travel paths p. The sum of all traffic flows in the study area is the traffic demand of the area, represented by the symbol q; The step (2) takes the least square method as the core, designs the upper optimization model, and solves the specific process of the optimal estimation of the parameters of the travel / activity behavior selection model as follows: 21): Establish the objective function: Let the traffic flow of path p in the road network of the study area after data preprocessing in step (1) be o p , the parameter of the travel / activity behavior selection model to be calibrated is X, and the flow of each path p in the road network calculated by this model is f p , taking the least square method as the core idea, the objective function of the parameter calibration problem is obtained as: In the formula, min() is the minimum value function; 22): Establish constraints: variable f in the objective function p and p The value range must be non-negative, and the constraints are: f p ≥0 (2) o p ≥0 (3); The step (3) takes traffic distribution as the core, designs the lower-level optimization model, and solves the specific implementation process of the flow distribution in the traffic network as follows: 31): Determine input and output: The input of the lower optimization model is the parameter X of the travel / activity behavior selection model to be calibrated and the traffic demand q of the study area; the output is the traffic flow f of different paths p in the traffic network of the study area p ; 32): The travel demand q determined in step 31 is allocated to the road network in the study area using the travel / activity behavior selection model: 32.1): Define the objective function: Assume that all residents choose the path with the highest satisfaction for a trip. The satisfaction of residents choosing path p is represented by It can be calculated by the following formula: In the formula, and are the residents’ satisfaction when they are doing activities on path p and their satisfaction when they are traveling on path p, respectively. The calculation formula is as follows: In the formula, a 1 ,b 1 ,a 2 ,b 2 is a constant; in formula (4), cf p is the satisfaction coefficient of residents and their family members when traveling together, and its value range is between [0,1], cf p The following formula can be used for calculation: In the formula, is the length of time residents spend on joint travel on path p; is the total length of time residents spend traveling or doing activities on path p; It indicates the proportion of residents’ joint travel time in path p to the total travel / activity time. X is the parameter to be calibrated in the travel / activity behavior selection model, and its value is greater than or equal to 0. is the maximum satisfaction that residents can obtain during a trip / activity, and the objective function of the lower optimization model is obtained: The physical meaning of this objective function is that all residents in the city choose the path with the highest satisfaction for travel or activities; 33) Define the constraints. According to the physical meaning of the variables of the lower optimization model, the constraints of the lower optimization model are: The specific implementation process of the step (4) using the simulated annealing method to solve the double-layer optimization model and obtain the estimated value of the parameter is as follows: 41): Solving the upper optimization model; 41.0): Algorithm initialization: Set the algorithm annealing temperature T n The initial value T 0 , cooling factor σ<1, cooling step length N step ; Determine the algorithm stopping criteria, final temperature T stop and the maximum iteration step size N stop ; Initialize counter N count = m = n = l = 0; give the parameter value X of the row / activity behavior selection model an initial value X 0 , use X 0 The value of the road network traffic flow f is obtained by solving formulas (8)-(10) p 0 Input into formula (1) and get the initial value of the objective function Z(X 0 ); 41.1): Solve the lower optimization model, let the counter l = l + 1, and use the formula Calculate X′, where Is the interval The random value on the , α is the search step length, and the value of X′ is used to solve formulas (8)-(10) to calculate the road network flow f of the lth iteration p l ; The symbol G-value is used to represent the accuracy of the lower optimization model iteration, which can be calculated using the following formula: When the G-value is less than the given threshold, the lower optimization model stops iterating and the network flow f p l Input to the upper optimization model, obtain the objective function value Z(X′), and calculate Δ=Z(X′)-Z(X); 41.2): Metropolis Principle: 41.21): If Δ≤0, it means that the new parameter value X′ can reduce the objective function value of the upper-level planning. Let X=X′, m=m+1, and go to step 41.
3. Otherwise, go to step 41.22; 41.22): Let θ = exp(Δ / T n ), if θ>random value in the interval [0,1), let X=X′, m=m+1, and go to step 41.3, otherwise, go to step 41.23; 41.23): Let m = m + 1, N count =N count +1, go to step 41.3; 41.3): Annealing: If m<N step , then go to step 41.1, otherwise let n=n+1, T n =σ·T n-1 , m=0, go to step 41.4; 41.4): Inner loop termination judgment: If N count >N stop or T n <T stop , the inner loop terminates and outputs the parameter value X at this time, otherwise go to step 41.1; 42): Outer loop termination judgment: RGAP is the iterative error of the outer loop, and RGAP is calculated using the following formula: If RGAP < ε, where ε is the convergence accuracy, the outer loop ends and the parameter value X at this time is output; otherwise, go to step 41.0; The specific implementation process of step (5) applying a Kalman filter to smooth the estimated value of the parameter and outputting the final calibrated value of the parameter is as follows: 51): Initialization: Initialize the observation error W and system error V of the parameter value X calculated in step (4); 52): Update the parameter value to be calibrated with the error: Let i be the number of iterations, incorporate the observation error and system error into the parameter estimation process, and update the value of parameter X using the following formula: X i =φX i-1 +W (13) X i '=HX i +V (14) Where φ is the state transfer matrix and H is the observation matrix; 53): Use covariance to update the parameter value to be calibrated: record E i is the covariance matrix of the i-th iteration, then the covariance matrix E of the previous iteration is i-1 And the noise error W calculates the covariance matrix E of the new round of iteration i , the calculation formula is: E i =φE i-1 f T +W (15) 54): Calculate the Kalman gain of the parameter to be calibrated: The calculation method of the Kalman gain Kg is: Kg i =E i H T [HE i H T +V] -1 (16) 55): Update the predicted value of the parameter to be calibrated: The parameter value calculated in the i-th round is X i =X i-1 +Kg i [X i '-HX i-1 ], and the covariance matrix E i =[I-Kg i H]E i-1 , where I is the identity matrix.
Citation Information
Patent Citations
Traffic network design software based on subjective welfare maximization
CN110472353A
