The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

18
The Simulation of The Simulation of Traffic Patterns and Traffic Patterns and Optimizing Traffic Optimizing Traffic Lights Lights by Gregg Tabot by Gregg Tabot

Transcript of The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Page 1: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

The Simulation of Traffic The Simulation of Traffic Patterns and Optimizing Patterns and Optimizing

Traffic LightsTraffic Lightsby Gregg Tabotby Gregg Tabot

Page 2: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

What is traffic?What is traffic?

The movement of motorized vehicles, The movement of motorized vehicles, unmotorized vehicles and pedestrians unmotorized vehicles and pedestrians on roads.on roads.

What are traffic lights?

A signaling device positioned at a road intersection or pedestrian crossing to indicate when it is safe to drive, ride or walk

Page 3: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

My Basic SimulationMy Basic Simulation

• Two road Two road intersectionintersection

• Two laned roadsTwo laned roads• No turning lanesNo turning lanes• Motorized vehicles Motorized vehicles

only (no only (no pedestrians)pedestrians)

Page 4: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Three Methods of Traffic Three Methods of Traffic Lights OptimizationLights Optimization

• Manual MethodManual Method

• Timed MethodTimed Method

• Frequency Formula MethodFrequency Formula Method

Page 5: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Manual MethodManual Method

• Make sure that the Make sure that the auto_switch?auto_switch? option is option is OffOff

• Press the Press the East-East-West SwitchWest Switch button and the button and the traffic lights for the traffic lights for the cars moving east cars moving east or west switch from or west switch from red to green or vice red to green or vice versaversa

• Similar function Similar function with the with the North-North-South SwitchSouth Switch buttonbutton

Page 6: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Manual MethodManual Method

Page 7: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Manual MethodManual Method

• Based solely on user inputBased solely on user input• If the user presses switch, the lights If the user presses switch, the lights

switchswitch

Page 8: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Manual MethodManual Method

AdvantagesAdvantages• Good for situational trafficGood for situational traffic

DisadvantagesDisadvantages• Back up the entire systemBack up the entire system• Human errorHuman error• It’s manual!It’s manual!

Page 9: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Timed MethodTimed Method

• Make sure that the Make sure that the auto-switch?auto-switch? option is option is OnOn

• Make sure that the Make sure that the formula?formula? option is option is OffOff

• Set the amount of Set the amount of time a switch stays time a switch stays green by adjusting green by adjusting the the light_timerlight_timer slider (measured in slider (measured in units)units)

Page 10: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Timed MethodTimed Method

Page 11: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Timed MethodTimed Method

• Compares the amount of time a light Compares the amount of time a light has been green with the light timer has been green with the light timer option setoption set

• If the amount of time a light has If the amount of time a light has been green is greater than or equal been green is greater than or equal to the light timer option the lights to the light timer option the lights switchswitch

Page 12: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Timed MethodTimed Method

AdvantagesAdvantages• Not manualNot manual

DisadvantagesDisadvantages• Doesn’t account for busier roadsDoesn’t account for busier roads• If there’s only one car, it may have to If there’s only one car, it may have to

wait a long timewait a long time

Page 13: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Frequency Formula MethodFrequency Formula Method

• Make sure that the Make sure that the auto-switch?auto-switch? option is option is OnOn

• Make sure that the Make sure that the formula?formula? option is option is OnOn

• Adjust the Adjust the max_waitmax_wait slider slider (measured in (measured in different units)different units)

Page 14: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Frequency Formula MethodFrequency Formula Method

Page 15: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Frequency Formula MethodFrequency Formula Method

• Compares flowing traffic frequency Compares flowing traffic frequency multiplied by a timer with the multiplied by a timer with the stopped traffic frequency multiplied stopped traffic frequency multiplied by the quantity of the timer by the quantity of the timer subtracted from maximum wait time.subtracted from maximum wait time.

• If the first quantity is greater than or If the first quantity is greater than or equal to the second quantity the light equal to the second quantity the light switches.switches.

Page 16: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Frequency Formula MethodFrequency Formula Method

AdvantagesAdvantages• Good for situational trafficGood for situational traffic• Takes into account heavily trafficated Takes into account heavily trafficated

roadsroads• Keeps traffic flowingKeeps traffic flowing

DisadvantagesDisadvantages• Could take a while if you were on a Could take a while if you were on a

less populated roadless populated road

Page 17: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

Bugs/Errors/Fixes for LaterBugs/Errors/Fixes for Later

• Sometimes the program will display Sometimes the program will display an error randomly before beginningan error randomly before beginning

• Cars do not slow to a stop, they just Cars do not slow to a stop, they just instantaneously stopinstantaneously stop

• There is no wait time in between There is no wait time in between traffic light switchestraffic light switches

• Car crashes are not yet implementedCar crashes are not yet implemented

Page 18: The Simulation of Traffic Patterns and Optimizing Traffic Lights by Gregg Tabot.

The EndThe End