There are two models in this submission.
1. trafficpatterns - a simple model of vehicular traffic on four roads all leading to an intersection controlled by a traffic light. It turns green for each of the four paths with specified durations. Tweak the traffic light durations to study how much traffic builds up on the different paths.
2. trafficpatterns_rotary - The same intersection traffic light has now been replaced by a rotary (traffic circle). The four roads now merge onto the rotary and don't have to wait for the traffic light. There are constraints on the rotary that specify how much time it takes to cross it. Compare the results to the previous model.
Devdatt Lad (2022). Vehicle Traffic Patterns at an Intersection (SimEvents) (https://www.mathworks.com/matlabcentral/fileexchange/20287-vehicle-traffic-patterns-at-an-intersection-simevents), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!