Skip to content

davidguzmanr/RoadTrafficSimulator

 
 

Repository files navigation

RoadTrafficSimulator

Traffic simulator and road lights adjuster using Intelligent Driver Model and lane-changing model MOBIL. Written in CoffeeScript and HTML5.

Reversible lanes

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.

Demo

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.

References

The original is in volkhin, we are just making changes to it for our needs.

About

Road traffic simulator with reversible lanes and signals optimizer in CoffeeScript & HTML5,

Resources

License

Stars

7 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 56.9%
  • Jupyter Notebook 22.8%
  • CoffeeScript 19.9%
  • CSS 0.4%