AnyLogic 9
Expand
Font size

Road Traffic Tutorial: Intersection Model

Complexity: grade grade grade grade grade

Modeling approach: discrete-event

Features: Road Traffic Library 3D intersection parking lot bus stop traffic light custom car type

This tutorial will teach AnyLogic users to create road traffic models with the help of the  Road Traffic Library. We will show you how to model traffic flow on the intersection of two roads, Tapiolavägen and Menninkäisentie, in Tapiola area not far from Helsinki.

Modeled intersection

We will create a model that will be based on the satellite image below, where you can see all the nuances of the current road network. Both roads are two-way and have one lane for each traffic direction. There is a bus stop at the Tapiolavägen roadside and a small parking lot with five parking spaces at the Menninkäisentie roadside.

Step by step, we will build a model that demonstrates the majority of the library’s capabilities.

Short summary of the tutorial

  • Phase 1. Adding a layout, drawing Tapiolavägen. Creating a simple flowchart using the  Road Traffic Library blocks (Car Source, Car Move To, Car Dispose) to model northbound traffic along Tapiolavägen.
  • Phase 2. Adding 3D animation (adding a 3D window and creating a  Car agent type with a 3D animation visualization used to display cars).
  • Phase 3. Drawing Menninkäisentie, the road that forms an intersection when connected to Tapiolavägen. Adding new blocks to the flowchart to model traffic flow on both roads in both directions (adding more Car Source and Car Move To blocks to define new car entry points and new destinations; adding a new  Process Modeling Library block (Select Output) to divide and reroute the traffic flow).
  • Phase 4. Modeling a parking lot. Adjusting Menninkäisentie road access areas when leading to Tapiolavägen. Drawing a parking lot at the Menninkäisentie roadside and adding blocks to the flowchart (the other Car Source and Car Move To blocks, and a Process Modeling Library Delay block to set the time cars spend in the parking lot).
  • Phase 5. Modeling bus traffic. Creating a   Bus agent type and defining the animation for it. Drawing a bus stop at the Tapiolavägen roadside. Adjusting the flowchart to model the bus moving north along Tapiolavägen and stopping at a bus stop.
  • Phase 6. Adding traffic lights to control traffic on the intersection with the help of the  Traffic Light block. Experimenting with various traffic light operating modes to reach the definitive duration of the traffic lights’ red and green phases on the intersection.

Off we go!

Start the tutorial by following the link below.

How can we improve this article?