CN106570079A - Adjacent vehicle query algorithm based on color index balanced binary tree - Google Patents

Adjacent vehicle query algorithm based on color index balanced binary tree Download PDF

Info

Publication number
CN106570079A
CN106570079A CN201610906427.7A CN201610906427A CN106570079A CN 106570079 A CN106570079 A CN 106570079A CN 201610906427 A CN201610906427 A CN 201610906427A CN 106570079 A CN106570079 A CN 106570079A
Authority
CN
China
Prior art keywords
vehicle
node
adjacent
binary tree
algorithm
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.)
Pending
Application number
CN201610906427.7A
Other languages
Chinese (zh)
Inventor
周世杰
罗嘉庆
贺雅琪
黄文�
李志鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN201610906427.7A priority Critical patent/CN106570079A/en
Publication of CN106570079A publication Critical patent/CN106570079A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Traffic Control Systems (AREA)

Abstract

An adjacent vehicle query algorithm based on a color index balanced binary tree is provided. The invention discloses a color index binary tree storage structure and an adjacent vehicle query algorithm based on a color index binary tree. The difference between the structure and a balanced binary tree is that it is necessary to maintain the dynamic index of a predecessor node and a subsequent node of a same color node. No matter if two adjacent vehicles are in the same lane, the two vehicles maintain a parent-child relation, and node coloring can maintain the adjacent index of vehicles in the same lane. With the algorithm, the time complexity of querying adjacent vehicles in front of and after a vehicle reaches O(1), and the time complexity of querying an adjacent vehicle in an adjacent lane reaches O(logn). The adjacent vehicle query algorithm provided by the invention is compared with classic existing mainstream adjacent vehicle query algorithms through tests, and the results indicate that the provided algorithm can improve the query efficiency of adjacent vehicles.

Description

Search algorithm based on the Adjacent vehicles of color index balanced binary tree
Technical field
The present invention proposes the storage organization of color index binary tree, and the neighbouring car in same track is stored using the structure .Based on color index balanced binary tree node by:Information of vehicles domain, father node index, left child index, right child's rope Draw, dynamic color index domain constitutes.And propose an adjacent car search algorithm based on color index binary tree, and by the structure It is applied in microcosmic traffic simulation system with algorithm, it is existing with classics to adjacent car search algorithm proposed by the present invention by experiment Main flow neighbour's car search algorithm is compared, and shows that this algorithm can effectively improve the efficiency of Adjacent vehicles inquiry.
Background technology
With Chinese society expanding economy and the transformation in city and expansion, domestic city vehicle guaranteeding organic quantity increases rapidly Long, road network changed condition tempo increase, traffic congestion are increasingly serious.Traffic congestion works to civic and life brings greatly Inconvenience, while the problem of environmental pollution that traffic congestion is brought is also increasingly severe, needs a large amount of manpower financial capacities to do statistical analysiss And transformation and optimization, as traffic conditions complexity, long-term investigation and measurement cause information with ageing, so as to cause transformation As a result it is not satisfactory.With development and the large-scale application of intelligent transportation system of computer technology, online traffic simulation with The features such as its high economy, high real-time, becomes the important method of assessment traffic programme and management.Using online traffic simulation Technology, can be synchronous with true traffic administration, and is simulated prediction to traffic flow, to traffic network planning and optimization, traffic Flow control etc. provides strong support.
In online microscopic traffic simulation, vehicle before the change of behavior state is made needed to obtain the number of its surrounding According to.These data include:The status information of traffic light, mark and related Adjacent vehicles, the precise and high efficiency of these information Acquisition directly influence the accuracy and verity of whole emulation, the road long for, the road vehicle When occurring a lot, especially for extensive online traffic simulation, when there is congestion, road vehicle can be very It is many, if not adopting efficient vehicle query structure and algorithm in the case, the speed inquired about can be reduced so as to have influence on The simulation efficiency and emulation real-time of whole traffic simulating system.
The content of the invention
The present invention proposes the storage organization based on color index binary tree, and the neighbour in same track is stored using the structure Nearly vehicle, wherein color index domain are a dynamic structures, and quantity is determined according to track quantity in the same direction on road.The node face There are three index structures in color index domain, and each index structure indexes (Prev) by forerunner and follow-up index (Next) is constituted.The knot In point structure, Lchild is stored in domain the smaller vehicle node of travel distance on road, and Rchild domains storage track road is up Enter the distance vehicle node bigger than which.If no car before the vehicle, its Parent domain is sky.
The present invention proposes the adjacent car search algorithm based on color index binary tree, using number based on balanced binary tree According to structure, make special handling to conventional balanced binary tree node, give one dynamic internal index structure of node, both maintained two Fork advantage of the sorting tree in sequential query, has the simple node storage mode of chain structure again.By the algorithm vehicle query O (1) has been reached with the time complexity of Adjacent vehicles before and after track, the time complexity of the Adjacent vehicles of inquiry adjacent lane reaches O (logn) is arrived.The algorithm is used in the inquiry of the Adjacent vehicles of online microscopic traffic simulation platform, achieves preferably effect Really.
By experiment to the adjacent car search algorithm based on color index binary tree proposed by the present invention and existing microcosmic traffic Adjacent car search algorithm in emulation is compared under four kinds of different conditions, and the different condition of setting is respectively:Car in road network Flow is different, vehicle lane-changing ratio is different, car speed is different, number of track-lines is different in section.As a result show based on color index The search algorithm of binary tree structure can improve the simulation efficiency and real-time of system.Further analyze, imitate in larger In very, this algorithm most cases are better than other algorithms.
Description of the drawings
The common traffic scenes of Fig. 1;
Fig. 2 is based on color index binary tree node data structure;
Fig. 3 vehicle location graphs of a relation;
Fig. 4 builds color index binary tree process by sequence insertion;
Fig. 5 complete color index binary tree structure.
Specific embodiment
Below in conjunction with the accompanying drawings technical scheme is elaborated.
By taking a basic traffic scene as an example, one vehicle (Query) of the scene description is attempting carrying out state change Before (acceleration, lane-change), the adjacent car inquiry operation of initiation.Totally 8 cars in section, when target vehicle (Query) needs to accelerate, Vehicle (Query) will initiate the request for inquiring about its direct precursor vehicle, i.e., find forward vehicle E, according to the state of vehicle E, Judge whether to accelerate, i.e., will not collide in an emulation cycle.When target vehicle (Query) needs (car to the left Road 3) or to the right (track 1) lane-change when, vehicle (Query) needs enquiring vehicle A, vehicle B or vehicle F, the traveling of vehicle G respectively State, judge whether whereby can lane-change, as shown in Figure 1.
Node based on the balanced binary tree of color index will be by:Information of vehicles domain (Vehicle Info), father node rope Draw (Parent), left child index (Lchild), right child index (Rchild), dynamic color index domain (Color Index), As shown in Figure 2.Wherein color index domain is a dynamic structure, and quantity is determined according to track quantity in the same direction on road, due to By taking Fig. 1 scenes as an example, it can be seen that there are three index structures in the node color index domain, each index structure is indexed by forerunner (Prev) constitute with follow-up index (Next).In the node structure, it is smaller that Lchild is stored in domain travel distance on road Vehicle node, the travel distance vehicle node bigger than which on the storage track road of Rchild domains.If no car before the vehicle, its Parent domains are sky.If being mapped to one-dimensional by vehicle in Fig. 1 scenes by distance, more intuitively can find out between vehicle location Relation, as shown in Figure 3.
The distance-taxis passed by according to vehicle, can obtain sequence (vehicle E, vehicle H, vehicle B, vehicle G, vehicle Query, vehicle F, vehicle A, vehicle C).Color index binary tree, hereinafter referred to as CIAVL, the structure and Jing of the tree are built below The common binary tree building process of allusion quotation is similar, and the Lchild domains of node store the little node of keyword, and the storage of Rchild domains is crucial big Node.Unlike the process is built from balanced binary tree, in addition it is also necessary to safeguard forerunner's node and successor node of homochromy node Dynamic indexing structure.Assume that color index binary tree building process presses said sequence insertion, building process is as shown in Figure 4.Most Eventually, after vehicle A and vehicle C insert the tree, the complete balanced binary tree construction based on color index, red arrow is obtained The follow-up relation of forerunner of color same node is represented, as shown in Figure 5.

Claims (4)

1. the search algorithm of the Adjacent vehicles based on color index balanced binary tree is proposed, it is characterised in that:Using color rope Draw the structure of balanced binary tree to store the vehicle in road network, give one dynamic internal index structure of node.Due to balance two The lookup time complexity of fork tree is O (logn), can provide inquiry velocity faster, while in view of in same track Fore-aft vehicle relation adjacent before and after having.Therefore, forerunner's node and the dynamic index of successor node of homochromy node are added. Whether in same track, two neighbouring vehicles remain filiation, and node coloring can be maintained with track car Neighbour index.By the index, vehicle can inquire about same track fore-aft vehicle in the case of the complexity of O (1) Information.
2. the time of the search algorithm of the Adjacent vehicles based on color index balanced binary tree as claimed in claim 1 is complicated Degree, specifically includes the inquiry of Adjacent vehicles before and after identical track, the inquiry of left and right Adjacent vehicles, vehicle node deletion algorithm, car Knots inserting algorithm, vehicle node branching algorithm etc., single unit vehicle often emulate average time required for a step by track The number of vehicle, the number in travel direction track, vehicle traveling lane-change rate, 4 parameters simulations of travel speed of vehicle draw.
3. vehicle as claimed in claim 2 travels lane-change rate, refers to that a car of system carries out lane-change in an emulation step Probability, this to set the quantity of vehicle in each track, the quantity in track, vehicle travel speed it is related.
4. before and after identical track as claimed in claim 2, the time complexity of the inquiry of Adjacent vehicles is O (1), and left and right is adjacent The query time complexity of vehicle is O (logn), and the time complexity of vehicle node deletion algorithm is O (logn), vehicle node The time complexity of insertion algorithm is O (logn), and the time complexity of vehicle node branching algorithm is O (logn).
CN201610906427.7A 2016-10-18 2016-10-18 Adjacent vehicle query algorithm based on color index balanced binary tree Pending CN106570079A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610906427.7A CN106570079A (en) 2016-10-18 2016-10-18 Adjacent vehicle query algorithm based on color index balanced binary tree

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610906427.7A CN106570079A (en) 2016-10-18 2016-10-18 Adjacent vehicle query algorithm based on color index balanced binary tree

Publications (1)

Publication Number Publication Date
CN106570079A true CN106570079A (en) 2017-04-19

Family

ID=58533613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610906427.7A Pending CN106570079A (en) 2016-10-18 2016-10-18 Adjacent vehicle query algorithm based on color index balanced binary tree

Country Status (1)

Country Link
CN (1) CN106570079A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110457352A (en) * 2019-07-31 2019-11-15 东南大学 A kind of adjacent vehicle querying method based on microscopic traffic simulation vehicle data structure

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140172869A1 (en) * 2012-12-19 2014-06-19 International Business Machines Corporation Indexing of large scale patient set
CN105117395A (en) * 2015-05-11 2015-12-02 电子科技大学 Adjacent vehicle query algorithm based on position clue balance binary tree
CN106021276A (en) * 2016-04-28 2016-10-12 泰华智慧产业集团股份有限公司 Method and system for checkpoint vehicle search based on distributed full-text retrieval system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140172869A1 (en) * 2012-12-19 2014-06-19 International Business Machines Corporation Indexing of large scale patient set
CN105117395A (en) * 2015-05-11 2015-12-02 电子科技大学 Adjacent vehicle query algorithm based on position clue balance binary tree
CN106021276A (en) * 2016-04-28 2016-10-12 泰华智慧产业集团股份有限公司 Method and system for checkpoint vehicle search based on distributed full-text retrieval system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵玉平: "微观交通仿真关键技术及其应用研究", 《中国优秀硕士学位论文全文数据库》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110457352A (en) * 2019-07-31 2019-11-15 东南大学 A kind of adjacent vehicle querying method based on microscopic traffic simulation vehicle data structure
CN110457352B (en) * 2019-07-31 2023-05-19 东南大学 Neighboring vehicle query method based on microscopic traffic simulation vehicle data structure

Similar Documents

Publication Publication Date Title
CN108151751B (en) Path planning method and device based on combination of high-precision map and traditional map
CN104952248B (en) A kind of vehicle convergence Forecasting Methodology based on Euclidean space
CN106446960B (en) A kind of Density Clustering divides the dynamic temperature road network construction method of period
CN101295326B (en) Method for generating OD matrix based on GPS data, traffic simulation method thereof
CN111178402A (en) Scene classification method and device for road test of automatic driving vehicle
CN102176283A (en) Traffic network simplifying model and navigating method based on same
CN109816027A (en) Training method, device and the unmanned equipment of unmanned decision model
CN103412925A (en) System and method for integrated searching of structured data and unstructured data
CN110182217A (en) A kind of traveling task complexity quantitative estimation method towards complicated scene of overtaking other vehicles
CN114354219A (en) Test method and device for automatic driving vehicle
CN104875740B (en) For managing the method for following space, main vehicle and following space management unit
Wei et al. An improved road network partition algorithm for parallel microscopic traffic simulation
CN102915404B (en) Fuzzy clustering algorithm-based information fusion method applicable to vehicle ad hoc network
CN109085764B (en) Method and device for optimizing creation of unmanned simulation scene
CN106570079A (en) Adjacent vehicle query algorithm based on color index balanced binary tree
CN105117395A (en) Adjacent vehicle query algorithm based on position clue balance binary tree
CN115080388B (en) Automatic driving system-oriented simulation test scene generation method
CN103577555A (en) Big data analysis method based on internet of vehicles
CN115543809A (en) Method and device for constructing test scene library of automatic driving function
Wang et al. A Simulation‐Based Comprehensive Analysis for Traffic Efficiency and Spatial Distribution of Risks in Short Weaving Area of Municipal Interchange
CN104680775B (en) The parallel extraction method of the real-time optimal path of road network based on huge traffic data
CN113284030B (en) Urban traffic network community division method
CN114398253A (en) Method and system for generating test scene of automatic driving real vehicle
CN114301792A (en) Traffic flow simulation method and traffic flow sensor
Han et al. On-road test scenarios extraction and re-construction approach for c-v2x digital twin test

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20170419