Traffic simulator and road lights adjuster using Intelligent Driver Model and lane-changing model MOBIL. Written in CoffeeScript and HTML5.
Dealing with traffic congestion is one of the most pressing challenges for cities. Transport authorities have implemented several strategies to reduce traffic jams with varying degrees of success. The use of reversible lanes is a common approach to improve traffic congestion during rush hours. A reversible lane can change its direction during a time interval to the more congested direction.
https://davidguzmanr.github.io/files/RoadTrafficSimulator.html
- Mouse and wheel - scrolling and zoom.
- shift + click -- create intersection.
- shift + drag from one intersection to another -- create road.
- ctrl + click -- change number of lanes on the road you're clicking.
Or just press generateMap
in control panel and add cars with carsNumber
slider. To change the number of lanes
use the lanesNumber
slider and then press load
. You can create traffic in a certain direction by adding cars in the
specific direction using the addCar
options.
To run simulator
git clone https://github.com/davidguzmanr/RoadTrafficSimulator.git
cd RoadTrafficSimulator
npm install
And open index.html
in your browser. Use gulp to rebuild project. See How to install NodeJS
and How to install Gulp to install the necessary in Ubuntu.
The original is in volkhin, we are just making changes to it for our needs.