[HL-0] Traffic Simulator
This is a MEDC research project. We aim to develop a decentralized traffic simulator presented by Web browsers.
My tasks:
- Processed the map data from OpenStreetMap and learnt related APIs and the structure of an OSM file.
- Implemented a Web map application by using OpenLayer.js and Processing.js.
- Solved the cross-platform communication problem by using Apache Thrift.
- Addressed the key issue of continuously pushing simulation data from server side to browser side (long-HTTP connection technique using PHP and JavaScript).
Before us, an undergraduate group of eight people developed a similar system, but only can simulate few vehicles. However, our system is able to simulate more than 10,000 vehicles on a single computer.
A user can select a region for simulation. The system will automatically download the map data from OpenStreetMap.
A dot in red or green color (like an ant) represent a single vehicle. The movement of vehicles is calculated by a car-following model. Vehicles can also change their lanes.
The presentation can be changed to a density view. In this view, traffic flow of road segments are presented which is similar to Google Traffic Maps but the key difference is that our system updates the traffic in real time.
We divide the map data into different parts for processors in order to achieve decentralized computing. Different colors of streets means that they are in different processors.
This is a research project so that I cannot make the code publicly available.