| With the rapid development of cities, urban traffic problem is increasingly outstanding. Because of the complexity of the urban traffic system it is difficult to use traditional methods to solve this problem effectively. With the aid of modern computer technology, the use of traffic simulation to simulate urban traffic conditions, not only can effectively simulate the traffic situation and has the characteristics of low cost, high efficiency. Microscopic traffic simulation reflect the whole traffic flow through simulate the individual behavior of the vehicle, so it has the characteristics of high precision. Vehicle is the basic unit of the microscopic traffic simulation. A vehicle need query its adjacent vehicles before it change its current state. With the increase of scale of simulation, the overhead of the simulation system will increase rapidly. Therefore, how to design the system structure and the adjacent vehicles query algorithm is important. The main work of this thesis as follows.Proposed the the adjacent vehicles query algorithm based on Position Thread AVL(PTAVL) tree and the adjacent vehicles query algorithm based on discrete sections. Each node in PTAVL has two thread of its former and follows nodes which have the physical position relationship with the node. A vehicle can query its former and follow adjacent vehicles. And query the adjacent vehicles on the adjacent lane through the binary tree structure. In query algorithm based on discrete road, we divide lanes in the same direction into segments, lane segments is stored in a hash map in the lane, and use of lane Numbers as key.Each lane uses linked list to store the vehicles. A vehicle use linked list to query its former and follow adjacent vehicles, and use the hash table to query adjacent vehicles in the adjacent lanes.Proposed a high precision, large-scale microscopic traffic simulation architecture, it has a visual map editing tool and support a variety of vehicle models. According to the architecture we implement a microscopic traffic simulation system.Experimental analysis shows that the two adjacent vehicles query algorithm we proposed can effectively improve the efficient of query adjacent vehicles. At the same time, through the simulation analysis of the second ring road area of Chengdu, show that the system we proposed has the characteristics of large-scale, fine-grained. It is the useful tool to solve the problem of traffic problem, and has good practicability. |