CN108765939B - Dynamic traffic congestion index calculation method based on clustering algorithm - Google Patents
Dynamic traffic congestion index calculation method based on clustering algorithm Download PDFInfo
- Publication number
- CN108765939B CN108765939B CN201810449860.1A CN201810449860A CN108765939B CN 108765939 B CN108765939 B CN 108765939B CN 201810449860 A CN201810449860 A CN 201810449860A CN 108765939 B CN108765939 B CN 108765939B
- Authority
- CN
- China
- Prior art keywords
- speed
- clustering
- data
- time
- free
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0125—Traffic data processing
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Analytical Chemistry (AREA)
- Chemical & Material Sciences (AREA)
- Theoretical Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Probability & Statistics with Applications (AREA)
- Traffic Control Systems (AREA)
Abstract
The invention discloses a dynamic traffic jam index calculation method based on a clustering algorithm, which comprises the steps of firstly obtaining historical flow and speed data of a road section, and searching different free speeds C for different times; clustering by using a k-means algorithm, ranking according to the speed of a clustering center, and selecting a free speed corresponding to the ranking; for the regional traffic jam index, firstly, calculating the traffic jam index of each road section; and then calculating the number of affected vehicles in the time period of each road section: finally, the comprehensive traffic congestion index of N road sections and time slices t is obtained through calculation(ii) a The obtained dynamic comprehensive traffic congestion index has the characteristics of nonlinearity and dynamics, can truly reflect the real feeling of pedestrians, and has good application value.
Description
Technical Field
The invention relates to the technical field of traffic, in particular to a dynamic traffic jam index calculation method based on a clustering algorithm.
Background
The traffic jam index is a quantitative index parameter of a traffic running state and is used for micro-evaluation of road jam degree and service level. The existing domestic and foreign traffic congestion indexes have two problems:
1) static state. For a road segment, the existing traffic congestion index, whether speed-based, density-based or flow-based, does not change with changes in external conditions, which is inaccurate. For example, in the same road section, the running speed of 10km/h is congested under normal conditions, but the road surface wet-skid running speed of 10km/h is uncongested in rainy and snowy days.
2) And (4) linearity. Most of the existing traffic jam indexes are linear, and a nonlinear function is not added, so that the internal feeling of pedestrians cannot be truly reflected. In fact, as the degree of congestion increases linearly, the change in the pedestrian's internal perception is not linear, but rather fast first and slow last.
Therefore, a dynamic traffic jam index capable of reflecting the real feeling of the pedestrian is urgently needed, and a technical basis is provided for traffic planning and timely free speed change.
Disclosure of Invention
In view of this, the invention aims to provide a dynamic traffic congestion index calculation method based on a clustering algorithm, and the obtained dynamic traffic congestion index has the characteristics of nonlinearity and dynamics, can truly reflect the real feeling of pedestrians, and has a good application value.
The purpose of the invention is realized by the following technical scheme:
the dynamic traffic jam index calculation method based on the clustering algorithm comprises the following steps:
step 1: firstly, acquiring historical flow and speed data of the road section, and searching different free speeds C for different times;
step 2: clustering by using a k-means algorithm, ranking according to the speed of a clustering center, and selecting a free speed corresponding to the ranking;
and step 3: for the regional traffic congestion index, the traffic congestion index of each road segment is calculated, and for a single road segment, the formula is as follows:
TPI=α*log(β*C-v)+S
in the formula, alpha and S represent parameters to be solved; beta is a relaxation parameter, beta is controlled to be [1.1, 1.2 ]; c represents the free speed of the road section; v represents the average speed of travel of the road segment over the requested time;
and 4, step 4: and then calculating the number of affected vehicles in the time period of each road section:
where AV represents the number of affected vehicles, PV represents the number of passed vehicles, T represents the time granularitytravelRepresenting an average travel time for the time segment for the road segment;
and 5: finally, the comprehensive traffic congestion of N road sections and time slices t is obtained through calculationPlugging index TPI(t):
Specifically, in step 1, firstly, for each road segment, several free speeds are obtained by clustering, that is, data in a time period in historical data of the road segment is taken as free speed clustering data, characteristics are constructed by using the time data, and clustering is performed by using a k-means algorithm, and a clustering center only retains speeds and is obtained by sequencing (C)1、C2、C3、…CN) Selecting a free speed corresponding to the ranking according to the speed ranking of the clustering center; meanwhile, flow speed data of other times in historical data are used, a group of X hours is adopted, X is an integer larger than 0, features of every X hours are respectively constructed, similarly, a k-means algorithm is adopted to cluster the data of every X hours, only the speed of the clustering center is reserved and the data of every X hours are sequenced, flow speed data of a time interval of an index to be calculated are obtained, the X hour time period in which the data belong is selected according to time, the features are constructed, the clustering center to which the data belong is calculated, and the free speed corresponding to the ranking is selected according to the speed ranking of the clustering center.
In particular, in step 3, α and S represent the parameters to be solved according to the following two equations:
solving to obtain alpha and S respectively as follows:
in particular, in the step 2, X is 2.
In particular, for feature selection, using five minutes each (speed, flow, first order difference in speed), the feature dimension selection range is 90-200.
In particular, a time period in the historical data is taken to be 02:00-06: 00.
The invention has the beneficial effects that:
1) non-linearity: at present, the traffic jam indexes existing at home and abroad are generally linear and cannot truly reflect the change of the pedestrian's mind, the dynamic index of the invention can better reflect the change of the pedestrian's mind based on a log function, and when the dynamic index is larger, the method can also be degenerated into linearity and has good flexibility;
2) the dynamic property: at present, the traffic jam indexes existing at home and abroad are static, different strategies are not made according to specific road sections and specific time, the condition can be changed through the method, and the obtained indexes can be used for various common conditions, such as: a) the same road grade, different geographical locations, result in a free speed difference between them. For example, one road segment is located near the school and requires deceleration and crawl, so the road segment has lower free-running speed than other road segments, but the pedestrians cannot feel congestion; b) the same road section, different weather conditions, cause its free speed to differ. For example, the free speed of the road section is 50km/h in normal weather, and the free speed of the ice and snow road surface can be 20 km/h; c) on the same road segment, a sudden change in weather (e.g., a sudden downpour), causes its free speed to temporarily change. For example, in normal weather in the morning, the free speed is 50km/h, in the afternoon, sudden downpour and rainstorm occur, and the free speed is changed into 10km/h, so that a good support basis is provided for timely changing the free speed.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof.
Drawings
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail with reference to the accompanying drawings, in which:
FIG. 1 is a schematic representation of different relaxation parameters β;
FIG. 2 is a schematic view of the number of affected vehicles AV;
fig. 3 is a schematic diagram of a single-section traffic congestion index calculation process according to an embodiment.
Detailed Description
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be understood that the preferred embodiments are illustrative of the invention only and are not limiting upon the scope of the invention.
The invention designs a traffic jam index based on speed and flow, and the index is limited to be 0-10. At vehicle free speed (or over free speed), the traffic index is 0; the running speed of the vehicle is Okm/h (namely the traffic jam condition occurs), and the traffic index is 10. To reflect the real feeling of a pedestrian, a function log function is used, and for a single road segment, the formula is as follows:
TPI=α*log(β*C-v)+S
where α and S represent parameters to be solved, β is a relaxation parameter, C represents the free speed of the link, and v represents the average speed of the link over the time of the request. The index can be used for different time granularities, e.g. if the time slice is 10min, v represents the average speed for each 10 min.
In practice, free speed is a normal level of service that reflects a road segment. Different road sections have different free speeds in the same road grade; the free speed C is different at different times and conditions on the same road section. Two cases are more common:
(1) urban roads are generally divided into express roads, main roads, secondary roads and the like, and the speed limit of the roads in each grade is consistent. In practice, however, it has been found that the free speeds of different road sections vary greatly even for the same road grade, due to differences in road surface conditions and road section position. Therefore, for different road sections of the same road grade, the free speed needs to be set according to the actual situation;
(2) the free speed is also different for the same road segment under different conditions (such as weather conditions and large events or shows around the road segment). Therefore, even for the same road section, different free speeds are required at different times according to actual conditions.
Therefore, for each road segment, a plurality of free speeds need to be set, and the corresponding free speed to be used is selected according to actual conditions.
Generally speaking, the speed between 02:00 and 06:00 can be regarded as a free speed, and for each road section, the speed and the flow at the moment are selected to be clustered. Regarding the selection of the features, five minutes each (speed, flow, first order difference of speed) is used, the feature dimension is 190, and the clustering method uses a k-means method.
After clustering several free speeds for each road segment, there is a problem that for each time slice for which the traffic congestion index needs to be calculated, which one should be selected as the reference free speed. Our approach is to use clustering as well, with every two hours the rest of the time as a group, and feature selection or (speed, flow, first order difference in speed), feature dimension is 94. The number of the clustered categories is equal to the number of the free speed categories, and then the corresponding free speed is selected according to the sorting of the speed.
Also, beta is chosen, beta > 1, which controls the curvature of the curve, with larger beta the closer the curve is to a straight line, the less stringent, i.e. the same speed, the smaller the traffic index. Schematic representation of different beta1As shown, based on experience, beta is generally controlled to be [1.1, 1.2]]。
α and S represent the parameters to be solved according to the following two equations:
solving to obtain alpha and S:
the above method for calculating the traffic congestion index TPI of a road segment also needs to be expanded to an area or a loop, which is a problem of traffic index fusion of multiple road segments. For a plurality of road segments, the TPI of each road segment is calculated separately, and then the TPI of the road segments is calculated by using a weighted average method, and the weight is natural to select the number of affected vehicles AV of each road segment. The AV consists of two parts, at a time granularity of five minutes, one part being the number of vehicles that have passed in that five minutes and the other part being the number of vehicles that have not passed on the road section last, the schematic diagram being shown in fig. 2.
The number of vehicles passing through is actually the number of vehicles passing through in the period of time, namely the traffic flow. This data can be obtained directly, since we have previously calculated the traffic flow at each time throughout the road network. The number of vehicles which fail to pass needs to be required. Vehicles on a road segment are abstracted into a rectangle, wherein the width represents the number of passing vehicles per unit time, and the length represents the time required for passing the road segment, so that the area of the rectangle represents the number of failing vehicles on the road segment. The number of vehicles passing through in unit time can be obtained by dividing the traffic flow in the period of time by the time, the time required for passing through the road section is the average travel time in the period of time, and the travel time of different time periods of the whole road network is also calculated and stored in advance, so that the data can be easily obtained. Formalizing the above description:
AV=PV+NPV;
in the formula, AV represents the number of affected vehicles, PV represents the number of passed vehicles, and NPV represents the number of failed vehicles. Where NPV is calculated as follows:
wherein T represents a time granularity, Ttravel meterThe average travel time for that time segment for that road segment is shown. The two formulas are integrated:
for the comprehensive traffic jam index TPI containing N road sections and within the time slice t(t)The calculation method is as follows
(1) For each individual road section i, calculating the corresponding single-road-section traffic jam index in the time section
(2) Calculating the number of affected vehicles in the time period of each road section
(3) Calculating the comprehensive traffic jam indexes of N road sections and the time period
The method of the invention therefore essentially comprises the following steps:
step 1: firstly, acquiring historical flow and speed data of the road section, and searching different free speeds C for different times; firstly, clustering each road section to obtain several free speeds, namely, taking data in a time period in historical data of the road section as free speed clustering data, utilizing the time data to construct characteristics, clustering by using a k-means algorithm, and only keeping speeds in a clustering center and sequencing to obtain (C)1、C2、C3、…CN) Selecting a free speed corresponding to the ranking according to the speed ranking of the clustering center; meanwhile, flow speed data of other times in historical data are used, a group of X hours is adopted, X is an integer larger than 0, characteristics of every X hours are respectively constructed, the data of every X hours are clustered by adopting a k-means algorithm, only the speed of the data of every X hours is reserved in a clustering center and the data are sequenced, and the time of the index to be calculated is obtainedAnd selecting the X-hour time period of the flow speed data of the interval according to the time, constructing the characteristics, calculating the cluster center to which the flow speed data belongs, ranking according to the cluster center speed, and selecting the free speed corresponding to the ranking.
Step 2: clustering by using a k-means algorithm, ranking according to the speed of a clustering center, and selecting a free speed corresponding to the ranking;
and step 3: for the regional traffic congestion index, the traffic congestion index of each road segment is calculated, and for a single road segment, the formula is as follows:
TPI=α*log(β*C-v)+S
in the formula, alpha and S represent parameters to be solved; beta is a relaxation parameter, beta is controlled to be [1.1, 1.2 ]; c represents the free speed of the road section; v represents the average speed of travel of the road segment over the requested time;
and 4, step 4: and then calculating the number of affected vehicles in the time period of each road section:
where AV represents the number of affected vehicles, PV represents the number of passed vehicles, T represents the time granularitytravelRepresenting an average travel time for the time segment for the road segment;
and 5: finally, calculating to obtain the comprehensive traffic congestion index TPI of N road sections and time slices t(t):
Specific embodiment as shown in fig. 3, the historical flow and speed data of the road section is first acquired. Taking data in the time segment of 02:00-06:00 in the historical data of the road section as free speed clustering data, constructing characteristics by using the time data, and clustering by using a k-means algorithm to obtain the free speed under various conditions. On the other hand, data of other times in the historical data are used, the data are grouped every two hours (00:00-02:00, 06:00-08:00, …, 22:00-24:00), characteristics are constructed, and then clustering is carried out by using a k-means algorithm, the category number is consistent with the free speed clustering number, and the method of selecting the free speed is different at different times. For example, the peak and flat periods may not be consistent in the way the free velocities are chosen, so that after clustering every two hours, different free velocities can be found for different times. The steps only need to be calculated once, or updated once in a long time. For a time slice, for example 08:30-08:35, to calculate its traffic congestion index, first select its "two hours" as 08:00-10:00, then use the characteristics of 08:00-10:00 and compare its distance to the cluster center of history 08:00-10:00, select the category to which it belongs, and select the free speed according to the speed ranking of the cluster center, such as the cluster center speeds of history 08:00-10:00 are (40, 33, 28), the category to which the time slice belongs is 33, the second free speed is (50, 43, 33), the free speed corresponding to the second free speed is 43, calculate its dynamic traffic congestion index according to the free speed
For the regional traffic congestion index, firstly, the traffic congestion index of each road section is calculated according to the graph 3, and then the number of affected vehicles in the time period of each road section is calculated as follows:
and finally, calculating N road sections, wherein the comprehensive traffic congestion index of the time section is as follows:
finally, the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the present invention, and although the present invention has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions, and all of them should be covered by the claims of the present invention.
Claims (4)
1. The dynamic traffic congestion index calculation method based on the clustering algorithm is characterized by comprising the following steps: the method comprises the following steps:
step 1: firstly, acquiring historical traffic and speed data of a road section, and searching different free speeds C for different times;
step 2: clustering by using a k-means algorithm, ranking according to the speed of a clustering center, and selecting a free speed corresponding to the ranking; the method specifically comprises the following steps: firstly, clustering each road section to obtain several free speeds, namely, taking data in a time period in historical data of the road section as free speed clustering data, utilizing the time data to construct characteristics, clustering by using a k-means algorithm, and only keeping speeds in a clustering center and sequencing to obtain (C)1、C2、C3、…CN) Selecting a free speed corresponding to the ranking according to the speed ranking of the clustering center; meanwhile, flow speed data of other times in historical data are used, a group of X hours are adopted, X is an integer larger than 0, characteristics of every X hours are respectively constructed, a k-means algorithm is also adopted to cluster the data of every X hours, only the speed of the clustering center is reserved and the data of every X hours are sequenced, flow speed data of a time interval of an index to be calculated are obtained, the X hour time period in which the data belong is selected according to time, the characteristics are constructed, the clustering center to which the data belong is calculated, and a free speed corresponding to the ranking is selected according to the speed ranking of the clustering center;
and step 3: for the regional traffic congestion index, the traffic congestion index of each road segment is calculated, and for a single road segment, the formula is as follows:
TPI=α*log(β*C-v)+S
in the formula, alpha and S represent parameters to be solved; beta is a relaxation parameter, beta is controlled to be [1.1, 1.2 ]; c represents the free speed of the road section; v represents the average speed of travel of the road segment over the requested time;
according to the following two equations:
solving to obtain alpha and S respectively as follows:
and 4, step 4: the number of affected vehicles per road segment over a time period is then calculated:
where AV represents the number of affected vehicles, PV represents the number of passed vehicles, T represents the time granularitytravelRepresenting an average travel time for the link over a time period;
and 5: finally, calculating to obtain the comprehensive traffic congestion index TPI of N road sections and time slices t(t):
2. The method for calculating a dynamic traffic congestion index based on a clustering algorithm according to claim 1, wherein: in the step 2, X is 2.
3. The method for calculating a dynamic traffic congestion index based on a clustering algorithm according to claim 1, wherein: as for the selection of the characteristics, the following characteristics were used for each five minutes: the speed, the flow, the first-order difference of the flow and the first-order difference of the speed are selected, and the characteristic dimension selection range is 90-200.
4. The method for calculating a dynamic traffic congestion index based on a clustering algorithm according to claim 1, wherein: one time period in the historical data is taken as 02:00-06: 00.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810449860.1A CN108765939B (en) | 2018-05-11 | 2018-05-11 | Dynamic traffic congestion index calculation method based on clustering algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810449860.1A CN108765939B (en) | 2018-05-11 | 2018-05-11 | Dynamic traffic congestion index calculation method based on clustering algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108765939A CN108765939A (en) | 2018-11-06 |
CN108765939B true CN108765939B (en) | 2021-02-02 |
Family
ID=64010498
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810449860.1A Active CN108765939B (en) | 2018-05-11 | 2018-05-11 | Dynamic traffic congestion index calculation method based on clustering algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108765939B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112382098B (en) * | 2021-01-12 | 2021-07-06 | 中兴通讯股份有限公司 | Traffic jam detection method and device, electronic equipment and storage medium |
CN117253364B (en) * | 2023-11-15 | 2024-01-26 | 南京感动科技有限公司 | Traffic jam event extraction and situation fusion method and system |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103021176B (en) * | 2012-11-29 | 2014-06-11 | 浙江大学 | Discriminating method based on section detector for urban traffic state |
CN103280098B (en) * | 2013-05-23 | 2015-06-10 | 北京交通发展研究中心 | Traffic congestion index calculation method |
CN103366557B (en) * | 2013-07-25 | 2016-06-22 | 北京交通发展研究中心 | Traffic congestion evaluation method based on congestion index |
CN104766476B (en) * | 2015-04-16 | 2017-01-11 | 上海理工大学 | Calculation method for road segment and road network regional traffic state indexes |
CN107146414B (en) * | 2017-06-28 | 2020-02-07 | 江苏智通交通科技有限公司 | Road network traffic capacity extraction method based on vehicle identification |
-
2018
- 2018-05-11 CN CN201810449860.1A patent/CN108765939B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN108765939A (en) | 2018-11-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112037513B (en) | Real-time traffic safety index dynamic comprehensive evaluation system and construction method thereof | |
Polus | A study of travel time and reliability on arterial routes | |
US8036822B2 (en) | Travel time determination | |
US7908076B2 (en) | Representative road traffic flow information based on historical data | |
US20120072096A1 (en) | Dynamic prediction of road traffic conditions | |
CN111081019B (en) | Road network traffic running condition evaluation method based on road segment weight coefficient | |
Langdon | Noise nuisance caused by road traffic in residential areas: part II | |
CN104732762B (en) | Traffic abnormal road section probability identification method | |
US20140225750A1 (en) | Method and Apparatus for Conveying Vehicle Driving Information | |
US20160189303A1 (en) | Risk Based Automotive Insurance Rating System | |
CN106710216B (en) | Highway real-time traffic congestion road conditions detection method and system | |
US20110112747A1 (en) | Detecting anomalous road traffic conditions | |
CN108765939B (en) | Dynamic traffic congestion index calculation method based on clustering algorithm | |
Ding et al. | Detecting and analyzing urban regions with high impact of weather change on transport | |
CN102460534A (en) | Predicting expected road traffic conditions based on historical and current data | |
CN101770690A (en) | Traffic condition predicting device and pathway exploration device | |
CN108648445A (en) | Dynamic traffic Tendency Prediction method based on traffic big data | |
KR20090023856A (en) | Method and service server for providing showing the way information according to weather conditions | |
CN109191333A (en) | Tourism recommender system and method based on weather information big data | |
Bertini | Congestion and its extent | |
Rahman et al. | Traffic pattern analysis from GPS data: A case study of Dhaka city | |
CN116312008B (en) | Expressway condition early warning method and system based on climate information | |
Li et al. | How snowfalls affect the operation of taxi fleets? A case study from harbin, China | |
Roh | Impacts of snowfall, low temperatures, and their Interactions on passenger car and truck traffic | |
Jang et al. | Quickest path selection towards the destination in urban environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |