### Author Topic: High way traffic simulation  (Read 21015 times)

#### Fu-Kwun Hwang

• Hero Member
• Posts: 3062
##### High way traffic simulation
« on: February 09, 2011, 04:58:08 pm »
This is a three lanes high way traffic simulation.
You can adjust number of cars with slider when it is paused.
The color turn yellow when it is accelerating, turn red when hit brake, turn green when in the same speed.
It turn into blue when changing lanes.

You can click one of the car to change id and use slider to change it's maximum speed when in pause mode.

n1 slider is the maximum number of cars per line: the simulation will be initialized when n1 is changed.

Checkbox:
if "change" is checked: Car can change lane when there is car too close in front.
if "pushed" is checked: Car can change lane when there is car tracing behind it.
if "safe" is checked: reaction time for each driver is considered. (minimum distance between cars= velocity * reaction time)

Have fun!

1. add segments to represent the displacement(angle circulate the path). The color of each segment represent it's lane (red-green-blue: red segment mean innermost lane).
2. add arrow to represent maximum velocity for each car (yellow dot to show velocity V(t))--- (move mouse to the tip of the arrow to show/modify properties for that car).

Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
• Please feel free to post your ideas about how to use the simulation for better teaching and learning.
• Post questions to be asked to help students to think, to explore.
• Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!

#### Fu-Kwun Hwang

• Hero Member
• Posts: 3062
##### Re: High way traffic simulation
« Reply #1 on: March 27, 2014, 04:01:57 pm »
Related simulation from the web
http://www.traffic-simulation.de/

#### Kasey00

• Newbie
• Posts: 0
##### Re: High way traffic simulation
« Reply #2 on: December 04, 2019, 11:13:47 pm »
This is a three lanes high way traffic simulation.
You can adjust number of cars with slider when it is paused.
The color turn yellow when it is accelerating, turn red when hit brake, turn green when in the same speed.
It turn into blue when changing lanes.

You can click one of the car to change id and use slider to change it's maximum speed when in pause mode.

n1 slider is the maximum number of cars per line: the simulation will be initialized when n1 is changed.

Checkbox:
if "change" is checked: Car can change lane when there is car too close in front.
if "pushed" is checked: Car can change lane when there is car tracing behind it.
if "safe" is checked: reaction time for each driver is considered. (minimum distance between cars= velocity * reaction time)

Have fun!

1. add segments to represent the displacement(angle circulate the path). The color of each segment represent it's lane (red-green-blue: red segment mean innermost lane).
2. add arrow to represent maximum velocity for each car (yellow dot to show velocity V(t))--- (move mouse to the tip of the arrow to show/modify properties for that car).

This looks amazing . Really fine work done. How can I relocate the cars?