Kevin Chang (traffic flow)
prev next
page 43/44
 hello

+hobbies

+pictures

+industry

-projects
  kova
  kwrite
  TRAFFIC FLOW
  k-monitor

 archive
               

Traffic simulation
Bay area traffic inspired me to write this simulation. Although it is a very simple program, it can simulate traffic congestion quite visually pleasing and realistically.

The program is written in two parts. For speed and ease of modeling, I used C++. There are different objects, and each object could have different attributes (ie. acceleration, deceleration, max velocity, safe distance, likelihood of changing lane, etc). The second part of the program is written only for visual inspection of the C++ program. It is written in Tk. There is no processing done in Tk-- only for display purpose. The C++ program and Tk communicate through TCP/IP. This means that you can run C++ on a heavy machine and the display program on a light machine.

Bay Bridge Congestion (merging)


On 101, two lanes are blocked. Tick 1000

Tick 2000

Tick 3000


On 92, rubberneck


I was going to write another program that could use the throughput and responce time data to generate fancy graphs... then I found out there were many better tools out there out there (ie. SmartPATH, etc)

©2010 Kevin Chang