Method for predicting road traffic energy consumption in county town built-up area
By constructing a road traffic energy consumption simulation model and a BP neural network, and combining population density and POI (Point of Interest) facilities, the problem of insufficient accuracy in urban traffic energy consumption prediction in existing technologies has been solved, enabling accurate prediction and optimization of urban traffic energy consumption, and supporting urban planning and management.
Patent Information
- Application Number
- CN202510025879.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-01-08
AI Technical Summary
Existing technologies for predicting urban traffic energy consumption lack consideration of urban block-level planning elements, resulting in insufficient prediction accuracy and making it difficult to support urban and rural planning and traffic management decisions.
A road traffic energy consumption simulation model was constructed. By dividing the traffic energy consumption analysis area, population density and POI facilities were introduced as input variables. The model was then combined with a BP neural network for prediction. Traffic energy consumption was allocated using refined oil sales data and a GIS gravity model to optimize the model's prediction accuracy.
It improves the accuracy and practicality of traffic energy consumption forecasting, supports the optimization of urban traffic layout and energy conservation and emission reduction measures, and promotes a deeper understanding of the factors affecting urban traffic energy consumption.
Smart Images

Figure CN119886451B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of urban construction, and particularly to a method for predicting road traffic energy consumption in a built-up area of a county. BACKGROUND
[0002] Current urban technology research mainly focuses on two levels: macro level and micro level. Macro-level research attempts to predict the overall traffic energy consumption of a city by considering multiple relevant factors comprehensively, but the current prediction accuracy still needs to be improved, and it is difficult to accurately reflect the actual energy consumption status of the urban space. At the micro level, research usually focuses on factors such as road conditions, vehicle speed, vehicle performance, and driving conditions, and uses traffic simulation technology to evaluate the fuel consumption of a specific vehicle or traffic mode within a unit time. However, these studies often lack close connection with specific spatial characteristics of the city. Whether at the macro or micro level, current traffic energy consumption models rarely involve considering urban block-level planning elements, which limits the application potential of the models in urban and rural planning practice. SUMMARY
[0003] Therefore, the purpose of the present application is to provide a method for predicting road traffic energy consumption in a built-up area of a county, to improve the accuracy and practicality of the prediction, and to better serve urban and rural planning and traffic management decision-making.
[0004] To achieve the above-mentioned purpose, the present application adopts the following technical solution: a method for predicting road traffic energy consumption in a built-up area of a county, comprising the following steps:
[0005] Step 1: constructing a road traffic energy consumption simulation model;
[0006] Step 2: constructing a road traffic energy consumption prediction model to predict road traffic energy consumption.
[0007] In a preferred embodiment, the step 1 specifically comprises:
[0008] Step 11: dividing the traffic energy consumption analysis area; dividing the built-up area of the county into several sub-areas; when dividing, the overall block should be divided according to the road shape;
[0009] Step 12: determining the county center area;
[0010] Step 13: determining the urban form variable index; selecting the population density and POI facility point, which have the greatest impact on urban road traffic volume, as the urban form input variable of the traffic energy consumption simulation model;
[0011] Step 14: calculating the location advantage degree;
[0012] Step 15: calculating the traffic energy consumption;
[0013] Step 16: Calculate the trip weight POI;
[0014] Step 17: Analyze the traffic energy consumption distribution of the zone;
[0015] Step 18: After calculating the energy consumption score of each zone, assign the value to the road network to obtain the traffic energy consumption value of each road segment;
[0016] Step 19: Use road traffic volume field measurement to verify the accuracy of the model.
[0017] In a preferred embodiment, the step 14 specifically comprises: introducing a land block accessibility correction index to improve the calculation of traffic generation of the land block unit; defining the land block unit accessibility determined by the planning road network density around the land block and the spatial distance between the land block and the central node within the planning range, specifically as follows:
[0018]
[0019] In the formula, K i is the accessibility of zone i; P i is the road network density around zone i, and the road network density of the surrounding analysis zone is appropriately selected according to the scale of the analysis zone; P max is the road network density value of the analysis zone with the maximum road network density in the study range; L i is the spatial distance between the centroid of zone i and the central node, which can be obtained by the POI point standard ellipse difference analysis in the above; L min is the minimum value of the distance between all analysis zones in the study range and the central node.
[0020] In a preferred embodiment, the step 15 specifically comprises: designing a trip volume prediction model based on zone advantage degree, population density, number of parking spaces, and POI facility points as follows:
[0021]
[0022] In the formula, A i is the traffic trip volume of zone i; m represents the number of POI categories other than residential and company categories; a q represents the trip weight of the POI point of category q; S q represents the number of POI points of category q within zone i; O i represents the POI trip generation rate of zone i; L represents the permanent population number of the study area; n represents the number of residential areas within zone i; a r represents the trip occurrence rate based on residential areas; L r represents the number of residents in the rth residential area within the zone; a j represents the trip occurrence rate based on office companies; L jrepresent the office size of the jth company in the analysis area; K i is the location advantage of the analysis area i;
[0023] Since the traffic energy consumption is positively correlated with the amount of travel, the traffic energy consumption attraction weight of the analysis area is expressed as follows:
[0024]
[0025] wherein T i is the traffic energy consumption attraction weight of the analysis area i, A i is the traffic travel amount of the analysis area i, and n is the number of the analysis areas;
[0026] Using the sales data of refined oil as the total value of the traffic energy consumption of the county road network, the traffic energy consumption generation of the subarea is as follows:
[0027] P i = P x T i (4)
[0028] wherein P i is the traffic energy consumption generation of the analysis area i, P is the total sales of refined oil, and T i is the traffic energy consumption attraction weight of the analysis area i.
[0029] In a preferred embodiment, the step 16 specifically includes the attraction proportion of the POI facility point of each analysis area to the traffic amount of the built-up area, which is defined as the POI travel generation rate herein, and the formula thereof can be expressed as follows:
[0030]
[0031] wherein O i represents the POI travel generation rate of the analysis area i; m represents the number of POI categories other than the residential and company categories; a q represents the travel weight of the POI point of the category q; S q represents the number of the POI points of the category q in the analysis area i; and n represents the number of the analysis areas.
[0032] In a preferred embodiment, the step 2 specifically includes:
[0033] Step 21: determining the input variables and the output variables of the neural network;
[0034] Step 22: selecting the prediction model variables, and the input layer contains three variables of the POI point number, the location advantage value and the road grade;
[0035] Step 23: the abnormal values need to be processed before the input variables to ensure that the data remains in a suitable range;
[0036] Step 24: Select a three-layer BP neural network to meet the model requirements, and the selected number of hidden layers is 1;
[0037] Step 25: Select an excitation function;
[0038] Step 26: Select the steepest descent BP algorithm to optimize the model.
[0039] In a preferred embodiment, the step 21 specifically includes: the algorithm formula of the BP neural network involves two processes: forward propagation and back propagation.
[0040] In a preferred embodiment, in the forward propagation process, data passes from the input layer through the hidden layer to the output layer; let the weight between node i and node i be w ij , the threshold of the node be b j , and the output value of each node be x j , then for each neuron, its output is calculated by the following formula:
[0041]
[0042] x j = f (S j ) (6)
[0043] wherein, f is the activation function.
[0044] In a preferred embodiment, the back propagation process is based on the gradient descent method, and the weights and biases of the network are updated by layer-by-layer back propagation of errors, so as to gradually reduce the prediction error; in this process, the error signal starts from the output layer and propagates to the input layer in reverse, and the weights and biases in the network are adjusted according to these error signals.
[0045] In a preferred embodiment, a loss function E is defined to quantify the difference between the network prediction output and the actual output; mean square error (MSE) is a common form of loss function, which calculates the square of the difference between the predicted value and the actual value, and then takes the average, so as to obtain a numerical indicator reflecting the prediction accuracy, which can effectively measure the deviation between the predicted value and the actual value; for a single sample, the mean square error loss function can be specifically defined as:
[0046]
[0047] wherein, M is the number of output layer neurons; is the actual output of the jth neuron in the network output layer; y j is the corresponding target output;
[0048] The partial derivatives of the loss function with respect to the weights and biases, i.e., the gradients, are calculated; for the weights and biases of the output layer, specific algorithms are used to calculate these gradient values:
[0049]
[0050] where L represents the number of layers of the output layer;
[0051]
[0052] is the weighted input of the jth neuron of the output layer;
[0053] is the output of the jth neuron of the output layer, where f is the activation function;
[0054] The update formula of the weights and biases is represented as:
[0055]
[0056] where, is the updated value of the weight w; is the updated value of the bias b; η is the learning rate.
[0057] Compared with the prior art, the present application has the following beneficial effects: the road traffic energy consumption model constructed by the present application can facilitate city planning and related field researchers to study city traffic energy consumption at the city block scale, and also facilitate the layout optimization of city traffic. The significant advantages of the model include: 1) intuitive display: by combining city form elements, the model can intuitively display the traffic energy consumption distribution of different regions, allowing researchers and decision-makers to quickly identify energy consumption hotspots and potential optimization areas. 2) fast prediction: using advanced BP neural network technology, the model can quickly predict the energy consumption value at a specific location by only inputting the relevant numerical values of the city form, greatly improving the efficiency of research and planning. 3) layout optimization: the output results of the model help guide the optimization of city traffic layout, by accurately predicting the energy consumption under different planning schemes, supporting more scientific and sustainable urban development strategies. 4) decision support: providing data-based decision support for policymakers and urban planners, helping them develop effective energy-saving and emission-reduction measures, and promoting the green transformation of city traffic systems. 5) research deepening: the application of the model not only promotes the in-depth understanding of the factors affecting city traffic energy consumption, but also provides a new perspective for exploring the complexity of the relationship between city space form and energy consumption. BRIEF DESCRIPTION OF DRAWINGS
[0058] Figure 1 is the road traffic energy consumption simulation model flowchart of the preferred embodiment of the present application;
[0059] Figure 2The road traffic energy consumption neural network prediction model flow chart of the preferred embodiment of the present application;
[0060] Figure 3 The overall flow chart of the preferred embodiment of the present application. DETAILED DESCRIPTION
[0061] The present application will be further described below in conjunction with the accompanying drawings and embodiments.
[0062] It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present application. Unless otherwise indicated, all technical and scientific terms used herein have the same meaning as would be commonly understood by one of ordinary skill in the art to which this application belongs.
[0063] It should be noted that the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application; as used herein, the singular form is intended to include the plural form unless the context clearly indicates otherwise, and furthermore, it should be understood that when the terms "comprise" and / or "include" are used in the specification, there is a feature, step, operation, device, component and / or combination thereof.
[0064] Reference Figures 1-3 The present application aims to build a road traffic energy consumption prediction model combined with urban morphology, use gas station refined oil sales data and urban morphology data to predict road traffic energy consumption, and ultimately form a road traffic energy consumption prediction model containing urban road network structure. The road traffic energy consumption model proposed in this study consists of two parts: a road traffic energy consumption simulation model and a road traffic energy consumption prediction model. These two models respectively use gravity model and BP neural network as the core method.
[0065] The following is a step-by-step description of building the model:
[0066] 1. Road traffic energy consumption simulation model construction steps:
[0067] The road traffic energy consumption simulation model construction steps built by the present application are as Figure 1 , the specific steps are as follows:
[0068] 1.1 Divide the traffic energy consumption analysis area:
[0069] Referring to the traffic cell division method, the social, economic and land use conditions in the analysis area are ensured to be as consistent as possible, and the layout of the road network, the integrity of the partition and the avoidance of splitting the land of the same use are fully considered, so that the county city built area is divided into several partitions. The division needs to follow the road shape to divide the overall block. Based on the traffic volume of different regions, the partition area of the region with large traffic volume is smaller, the partition area of the region with small traffic volume is larger, the partition area near the city center is smaller, and the partition area near the city is larger, so as to ensure the simulation accuracy of traffic energy consumption.
[0070] 1.2 Determine the county city center:
[0071] By performing ellipse difference analysis on the city POI facility points to identify the center point, the spatial distribution of different POI type points can be intuitively displayed, and the distribution characteristics thereof can be analyzed to obtain the core area and center point of public activities (i.e. people flow and traffic activities) of the county city.
[0072] 1.3 Determine the urban form variable index:
[0073] The present application selects the urban form indexes of population density and POI facility points which have the greatest influence on urban road traffic volume as the urban form input variables of the traffic energy consumption simulation model. Population is the decisive factor of traffic generation, and POI facility points can represent the characteristics of land nature, density and the like, and are important indexes for researching urban form, which are comprehensive and easy to obtain. In combination with the characteristics of the county city built area, traffic trips can be divided into residential and company-based commuting trips and non-commuting trips based on other POI facility points such as catering, leisure, shopping and cultural entertainment. The population density variable can be further divided into two variables of residential population density and office population density. Based on this idea, the selected urban form indexes in the subsequent road traffic energy consumption simulation model are shown in Tables 1 and 2.
[0074] Table 1 Urban form variable used in traffic energy consumption simulation model
[0075]
[0076] Table 2 POI classification table
[0077]
[0078] 1.4 Calculate the location advantage degree:
[0079] The present application comprehensively considers the location and accessibility factors, introduces a land block accessibility correction index to improve the calculation of traffic generation of the land block unit. The present application defines the land block unit accessibility as determined by the density of the planning road network around the land block and the spatial distance between the land block and the center node within the planning range, and is specifically shown in the following formula:
[0080]
[0081] In the formula: K i is the accessibility of analysis area i; P i is the road network density of the surrounding analysis area, which can be appropriately selected according to the scale of the analysis area to calculate the road network density; P max is the road network density value of the analysis area with the maximum road network density in the study area; L i is the spatial distance between the centroid of analysis area i and the center point, which can be obtained by the POI point standard ellipse difference analysis in the foregoing; L min is the minimum value of the distances between all analysis areas in the study area and the center point.
[0082] 1.5 Traffic energy consumption calculation:
[0083] The trip prediction model based on location advantage degree, population density, parking space quantity, and POI facility points is designed as follows
[0084]
[0085] In the formula, A i is the traffic trip quantity of analysis area i; m represents the number of POI categories other than residential and company categories; a q represents the trip weight of the POI point of category q; S q represents the number of POI points of category q in analysis area i; O i represents the POI trip generation rate of analysis area i; L represents the permanent population quantity of the study area; n represents the number of residential communities in analysis area i; a r represents the trip generation rate based on residential communities; L r represents the residential population of the rth residential community in the analysis area; a j represents the trip generation rate based on office companies; L j represents the office population scale of the jth company in the analysis area; K i is the location advantage degree of analysis area i.
[0086] Since the traffic energy consumption generation quantity is positively correlated with the trip quantity, the traffic energy consumption attraction weight of the analysis area can be expressed as follows:
[0087]
[0088] In the formula, T i is the traffic energy consumption attraction weight of analysis area i, A i is the traffic trip quantity of analysis area i, and n is the number of analysis areas.
[0089] Since the total value of traffic energy consumption of the county road network is based on the sales data of finished oil products, the traffic energy generation of the subarea is calculated by the following formula:
[0090]
[0091] wherein Pi is the traffic energy generation of the analysis area i, P is the total sales of finished oil products, and Ti is the traffic energy attraction weight of the analysis area i.
[0092] 1.6 POI travel weight:
[0093] The average daily traffic travel frequency of residents based on residential areas is 1.66, so the travel incidence based on residential areas is valued at 1.66 / person. According to existing research, the travel attraction rate based on companies can be valued at 0.96 person-time / employee. When calculating the travel incidence of other POI facilities, it is necessary to assign different weights to different types of POIs in the comprehensive analysis due to the differences in importance of different POI types.
[0094] The proportion of POI facility points in each analysis area to the traffic volume in the built-up area is defined as the POI travel generation rate, which can be expressed by the following formula:
[0095]
[0096] wherein O i represents the POI travel generation rate of the analysis area i; m represents the number of POI categories other than residential and company categories; a q represents the travel weight of the POI point of category q; S q represents the number of POI points of category q in the analysis area i; and n represents the number of analysis areas.
[0097] Table 3 POI travel weight assignment
[0098]
[0099] 1.7 Analysis of traffic energy consumption distribution:
[0100] By substituting the relevant data of the county area into formula (1), (2), (3), (4) and (5), the traffic energy distribution value of the county subarea is obtained
[0101] 1.8 Traffic energy distribution based on gravity model:
[0102] After the energy consumption score of each partition is calculated, the value needs to be assigned to the road network in order to obtain the traffic energy consumption value of each road segment. Here, the gravity model (Huff model) in the location allocation model in GIS software is mainly used to complete it. The purpose of using the location allocation method in the present application is to allocate the known total traffic energy consumption to each road facility and analyze the allocation difference, which is similar to the competition relationship between candidate points in general analysis. Therefore, the allocation method is the market share maximization analysis method.
[0103] Firstly, a network dataset of the road network in the study area needs to be established in GIS. The steps are as follows: first, collect the data such as the location, length and speed limit of the road on the openstreetMap map website. Second, use the Network Dataset Wizard tool in ArcGIS software to construct the network dataset according to the collected road network data. Third, define the network attributes and set the speed limit, driving direction, road grade, etc. Fourth, use the Topology Builder tool in ArcGIS software to establish the topological relationship of the network dataset and check its connectivity. Fifth, verify and test the network dataset through the Network Analyst tool in ArcGIS software to ensure its usability and accuracy.
[0104] Then, in the GIS software, a new location allocation model is created using the location allocation tool. Load the request points and facility points. The road partition centroid is used as the request point, and the road point feature is used as the facility point. The request point allocation weight is taken as P i , i.e. the traffic energy generation. The impedance parameter is set to 2, and the impedance parameter of the power impedance transformation is set to 2, which means that P i will decay with the square of the road distance. Since the present application does not select the facility points, but requires the energy consumption allocation value of each facility point, the impedance interruption coefficient can be set to infinity. According to the driving habits of cars, the attraction of the trunk road to cars should be greater than that of the secondary trunk road, and then the branch. Therefore, the facility point allocation weight is divided according to the road grade as 0.5, 1 and 2, corresponding to the branch, secondary trunk road and trunk road respectively. Running the current analysis can obtain the request point traffic energy generation P i The allocation value of each facility point in the road network is displayed as the DemandWeight field.
[0105] Finally, the road facility point data is allocated and connected to the road line segment through the intersection function of GIS. The traffic energy consumption summary value of the road line segment is visualized by using the vector data visualization function of GIS. Finally, the road network traffic energy consumption allocation map is obtained.
[0106] 1.9 Verification and correction of the model:
[0107] In order to verify the accuracy of the model, the road section traffic energy consumption value needs to be calculated according to the actual road traffic volume. At present, the main idea of measuring and calculating the road network traffic energy consumption at home and abroad is the product of oil consumption rate and road driving total mileage. Combined with the literature, the following method can be used to calculate the traffic energy consumption of different specific road sections, and the traffic energy consumption model of class z vehicle in road section j is obtained, so as to verify the accuracy of the model:
[0108] P zj =q zj ×l j ×Ef zj (6)
[0109] Wherein: P zj is the traffic energy consumption of class z vehicle (kg); q zj is the traffic volume of class z vehicle (pcu / h); l j is the length of the road section (km); E fzj is the average fuel consumption of class z vehicle (L / km). Taking small passenger car as the standard, the average fuel consumption of vehicle can be 0.8L / KM.
[0110] At the same time, the actual measurement of road traffic volume is needed to verify the accuracy of the model.
[0111] 2. Road traffic energy consumption prediction model construction steps:
[0112] The present road traffic energy consumption is simulated and calculated in the application. In order to further optimize the calculation of the model, the energy consumption value of a certain position can be quickly obtained by inputting some related values of city form, which can help to quickly understand the traffic energy consumption of road network in the process of city planning, so as to make better traffic planning and policy making. In this study, BP neural network, namely backpropagation neural network (Backpropagation Neural Network) model, is introduced to further optimize the prediction of road network energy consumption model.
[0113] The application uses MATLAB2022a software to build BP neural network. MATLAB2022a is an online data processing and analysis platform integrating professional statistical methods and data algorithms, which can be widely used in scientific research, data mining and other fields, and is a powerful tool for building neural network model. It supports the setting of learning rate, number of hidden layers, number of neurons in each hidden layer, selection of activation function and other hyperparameters, and can conveniently and quickly obtain the operation result of BP neural network.
[0114] The construction steps of the road traffic energy consumption simulation model constructed in the application are as follows: Figure 2The specific steps are as follows: 2.1 Introduction of BP neural network algorithm:
[0115] The algorithm formula of BP neural network mainly involves two processes: forward propagation and back propagation. The following are the main formulas of these two processes:
[0116] In the forward propagation process, data passes from the input layer through the hidden layer to the output layer. Let the weight between node i and node i be wij, the threshold of the node be bj, and the output value of each node be xj. Then, for each neuron, its output is calculated by the following formula:
[0117]
[0118] x j =f(S j ) (7)
[0119] where f is the activation function, generally selected as the sigmoid function or linear function.
[0120] The core of BP neural network (back propagation neural network) lies in its back propagation process, which is based on the gradient descent method. By propagating errors back layer by layer, the weights and biases of the network are updated, thereby gradually reducing the prediction error. In this process, error signals start from the output layer and propagate back to the input layer layer by layer, while the weights and biases in the network are adjusted according to these error signals.
[0121] First, a loss function (also known as error function) E needs to be defined to quantify the difference between the network's predicted output and the actual output. Mean squared error (MSE) is a commonly used form of loss function, which calculates the square of the difference between the predicted value and the actual value, and then takes the average, thereby obtaining a numerical indicator reflecting the prediction accuracy, which can effectively measure the deviation between the predicted value and the actual value. For a single sample, the mean squared error loss function can be defined as:
[0122]
[0123] where M is the number of output layer neurons. aLj is the actual output of the jth neuron in the output layer of the network. yj is the corresponding target output (or actual output).
[0124] At this point, a set of optimal weights and biases need to be determined in order to minimize the value of the loss function E. To achieve this goal, we need to accurately calculate the partial derivative of the loss function with respect to the weights and biases, i.e. the gradient. For the weights and biases of the output layer, we can use a specific algorithm to calculate these gradient values:
[0125]
[0126] where L denotes the number of output layers;
[0127] is the weighted input of the jth neuron in the output layer;
[0128] is the output of the jth neuron in the output layer, where f is the activation function.
[0129] For the weights and biases of the hidden layers and other layers, the derivation process is similar to that of the output layer, but more complex chain rules need to be considered. In a neural network, the output of each layer is the input of the next layer, so the output of the upper layer neurons will affect the input of the lower layer neurons. This dependency needs to be considered through the chain rule to ensure that the information flow of the entire network is accurately reflected when updating the weights and biases. By continuously iterating the update of weights and biases, the predicted output of the network gradually approaches the actual output, thus achieving accurate learning and prediction of data. Finally, the update formula of weights and biases can be expressed as:
[0130]
[0131] where, is the updated value of the weight w; is the updated value of the bias b; η is the learning rate, which controls the step size of parameter update and determines the magnitude and speed of parameter update. If it is too large, it may lead to unstable training, and if it is too small, it may lead to slow training speed. During the training process of the model, the weights, biases, and learning rate need to be adjusted to make the neural network better fit the training data.
[0132] 2.2 Selection of prediction model variables
[0133] The model selects residential population density, office population density, location advantage, road grade, and parking facilities, commercial service facilities, daily life service facilities, sports and leisure service facilities, and other urban form variables and traffic energy consumption values as input variables of the model. The output variable is the road section traffic energy consumption value calculated by the BP neural network.
[0134] To facilitate calculation, the present application uses POI facility points to represent urban form variables such as population, parking, commercial, leisure facilities, and life service facilities. The number of POI facility points is related to road network traffic energy consumption. At the same time, the location advantage is represented by the distance of the POI center point. Since different roads have different degrees of attraction to traffic flow, the road grade variable is also introduced into the model, which is divided into three grades: main road, secondary road, and branch road. Therefore, the input layer of the model includes three variables: the number of POI points, the location advantage value, and the road grade.
[0135] 2.3 Data pre-processing
[0136] Data pre-processing is an indispensable part of improving the efficiency of model training. Since the original data may be contaminated with various outliers, it cannot be directly input into the model for training. In order to ensure that the input value falls within the interval of the S-shaped activation function response, and to promote the rapid convergence of the network, data pre-processing is particularly important. Therefore, before inputting the variable, the outliers need to be processed to ensure that the data remains within the appropriate range.
[0137] 2.4 Selection of hidden layer number and neurons
[0138] A typical three-layer BP neural network structure covers the input layer, hidden layer, and output layer. Although increasing the number of hidden layers can improve the accuracy of the function to some extent, it will also increase the load of the system, prolong the training time, and make the model convergence more difficult. Generally, a three-layer structure is sufficient to effectively map various functional relationships of general data. Therefore, this study selects a three-layer BP neural network to meet the model requirements, and the number of hidden layers is 1. As for the number of neurons in the hidden layer, there is no fixed determination method. In this invention, the number of neurons in the hidden layer of the model is determined according to the fitting degree of the actual data. By continuously adjusting the number of neurons in the hidden layer, the fitting results of the model are observed to select the optimal model. After multiple tests, it is found that when the number of neurons in the hidden layer is 8, the fitting result of the model is optimal. Therefore, the number of neurons in the hidden layer of the model is 8.
[0139] 2.5 Selection of activation function
[0140] The purpose of introducing the activation function is to introduce a nonlinear function into the model. Since simple linear mapping cannot cope with complex data analysis, the activation function has become an effective tool to solve this problem. This model particularly selects the Sigmoid (logistic) activation function, which is also known as the S-shaped growth curve, and is a commonly used activation function, especially when applied to classifiers, its effect is more pronounced.
[0141] 2.6 Selection of training function
[0142] The steepest descent BP algorithm (traingd) is selected to optimize the model. This algorithm first calculates the gradient vectors of each weight and threshold value, which can indicate the direction of the fastest descent of the error surface. Then, using the transmission function of the neural network, the gradient of the total error surface is solved in multiple iterations. In each iteration process, the steepest descent BP algorithm adjusts the weights and thresholds according to the calculated gradient to gradually reduce the total error. This process continues until the error reaches the preset standard or other stopping conditions are met, which can effectively improve the prediction accuracy and overall performance of the model.
Claims
1.A method for predicting road traffic energy consumption in a built-up area of a county, characterized in that, The method comprises the following steps: Step 1: constructing a road traffic energy consumption simulation model; Step 2: constructing a road traffic energy consumption prediction model to predict road traffic energy consumption; The step 1 specifically comprises: Step 11: dividing a traffic energy consumption analysis area; the county city built-up area is divided into several subareas; the division needs to follow the road shape to divide the overall block; Step 12: determining a county city central area; Step 13: determining a city form variable index; the city form index population density and POI facility point which have the greatest influence on city road traffic volume are selected as the city form input variable of the traffic energy consumption simulation model; Step 14: calculating location advantage degree; Step 15: measuring traffic energy consumption; Step 16: calculating travel weight POI; Step 17: analyzing traffic energy consumption distribution of the area; Step 18: after the energy consumption scores of each subarea are calculated, the values are distributed to the road network, and the traffic energy consumption value of each road section is obtained; Step 19: using road traffic volume field measurement to verify the accuracy of the model; The step 15 specifically comprises: designing a travel volume prediction model based on location advantage degree, population density, parking space quantity and POI facility point as follows: wherein, A i is the traffic volume of the analysis zone i; m represents the number of POI categories other than residential and company categories; a q represents the trip weight of the POI point of category q; S q represents the number of POI points of category q in the analysis zone i; O i represents the POI trip generation rate of the analysis zone i; L represents the number of permanent residents in the study area; n' represents the number of residential areas in the analysis zone i; a r represents the trip generation rate based on residential areas; L r represents the number of residents in the rth residential area in the analysis zone; a j represents the trip generation rate based on office companies; L j represents the office size of the jth company in the analysis zone; K i is the location advantage degree of the analysis zone i; Since the traffic energy consumption generation quantity is positively correlated with travel volume, the traffic energy consumption attraction weight of the analysis area is expressed as follows: wherein T i is the traffic energy consumption attraction weight of analysis zone i, A i is the traffic volume of analysis zone i, and n is the number of analysis zones. Using refined oil sales data as the total value of the county city road network traffic energy consumption, the traffic energy consumption generation quantity of the subarea is the following formula: P' i = P x T i (4) P' = P * (1 - T) / (1 - T) i P is the total amount of refined oil products sold, T i is the traffic energy consumption attraction weight of analysis area i. 2.The method of claim 1, wherein, The step 14 specifically comprises: introducing a land unit accessibility correction index to improve the traffic generation quantity calculation of the land unit; the land unit accessibility is determined by the land periphery planning road network density and the spatial distance between the land and the central node in the planning range, and is specifically as follows: wherein: K i is the accessibility of analysis zone i; P i is the road network density of the periphery of analysis zone i, and the road network density of the periphery analysis zone is calculated according to the scale of the analysis zone; P max is the road network density value of the analysis zone with the maximum road network density in the research range; L i is the spatial distance between the centroid of analysis zone i and the center point, and the center point is obtained through POI point standard ellipse difference analysis; L min is the minimum value of the distances between all analysis zones in the research range and the center point. 3.The method of claim 1, wherein, The step 16 specifically comprises: the POI facility point of each analysis area attracts a proportion of the traffic volume in the built-up area, which is defined as the POI travel generation rate, and its formula is expressed as follows: wherein, O i POI trip generation rate of analysis area i; m represents the number of POI categories except residential and company categories; a q trip weight of POI point of category q; S q number of POI points of category q in analysis area i; n represents the number of analysis areas. 4.The method of claim 1, wherein, The step 2 specifically comprises: Step 21: determining input variables and output variables of the neural network; Step 22: selecting prediction model variables, the input layer contains three variables of POI point quantity, location advantage value and road grade; Step 23: the abnormal value needs to be processed before the input variable to ensure that the data remains within a suitable range; Step 24: selecting a three-layer BP neural network to meet the model requirements, and the selected hidden layer number is 1; Step 25: selecting an excitation function; Step 26: selecting the steepest descent BP algorithm to optimize the model. 5.The method of claim 4, wherein, The step 21 specifically comprises: the algorithm formula of the BP neural network involves two processes: forward propagation and backward propagation. 6.The method of claim 5, wherein, During forward propagation, data passes from the input layer through the hidden layer to the output layer; let the weight between node i' and node j be w i′j , the threshold of the node be b j , and the output value of each node be x j . Then, for each neuron, its output is calculated by the following formula: Wherein, wherein f is an activation function. 7.The method of claim 5, wherein, The backward propagation process is based on the gradient descent method, and the weights and biases of the network are updated by layer-by-layer backward propagation of errors, so as to gradually reduce the prediction error; in this process, the error signal starts from the output layer and is propagated to the input layer in reverse, and the weights and biases in the network are adjusted according to these error signals. 8.The method of claim 7, wherein, A loss function E is defined to quantify the difference between the network prediction output and the actual output; mean square error (MSE) is a common form of the loss function, which calculates the square of the difference between the predicted value and the actual value, and then takes the average, so as to obtain a numerical index reflecting the prediction accuracy, which can effectively measure the deviation between the predicted value and the actual value; for a single sample, the mean square error loss function is specifically defined as: where M is the number of output layer neurons; is the actual output of the jth neuron of the network output layer; y j is the corresponding target output; The partial derivative of the loss function with respect to the weight and bias, i.e. the gradient, is calculated; for the weight and bias of the output layer, a specific algorithm is used to calculate the gradient value: Wherein, L represents the number of layers of the output layer; is the weighted input of the jth neuron of the output layer; is the output of the jth neuron of the output layer, where f is an activation function; The update formula of the weight and bias is represented as: wherein, is an updated value of the weight w; is an updated value of the bias b; η is a learning rate.
Citation Information
Patent Citations
Urban taxi demand prediction method and device and computer equipment
CN113487219A
Vehicle remaining route fuel consumption prediction method and system based on driving style
CN116331214A