Skip to content

A web based traffic simulator in JavaScript for evaluating ramp metering algorithms.

Notifications You must be signed in to change notification settings

saeedt/JSTrafficSimulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript Traffic Simulator

This JavaScript traffic simulator is based on movsim open source JavaScript traffic simulator by Arne Kesting and Martin Treiber.

Study

We proposed A Novel Ramp Metering Approach Based on Machine Learning and Historical Data and published it in Machine Learning and Knowledge Extraction journal. The proposed ramp metering algorithm uses linear regression and real traffic data from a ramp in I-205 in Oregon State to predict the traffic flow during different hours of the day. We used K-means to determine traffic phase and type to set the ramp signal green phase. We conducted a simulation study using this JavaScript Traffic Simulator to compare our proposed method with the traffic responsive ramp control method ALINEA.

Contributions

Following are the modifications and contributions we made in the traffic simulator

  • The ramp and mainline traffic flows are read from a JSON input file located in the data folder
  • ALINEA and proposed ramp metering algorithms are implemented in the Simulator
  • Time setep (simulation time increments), start, and end time are added to the simulation
  • mljs is used for training and executing the proposed metering algorithm
  • Metrics including traffic flow, downstream speed, green phase duration, ramp queue length, downstream occupancy, and ramp meter signal status are recorded during the Simulation
  • All recorded metrics are visualized in interactive plots generated with plotly.js
  • Recorded metrics can be downloaded in CSV files for further analysis

Simulation Scenarios

Three scenarios of no control, ALINEA ramp metering, and proposed ramp metering are provided here. Running the simulation with animation on is time consuming, so all three scenarios are limited to one hour (7:00-8:00AM) intervals with speed set to 150 frames per second. Running each scenario on a fast web browser (Google Chrome) and computer takes about 20 seconds.

Demo Links

Click on the scenario you would like to try!

More Information

For more information about the study and results see our open access publication A Novel Ramp Metering Approach Based on Machine Learning and Historical Data.

About

A web based traffic simulator in JavaScript for evaluating ramp metering algorithms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published