Skip to content

Simulation Process

Mesoscopic Simulation

Mesoscopic simulation is a "middle" mode of simulation lying between microsimulation of individual vehicles and macro assignment of traffic flows. Mesoscopic traffic simulation can take many different forms, some oriented close to microsimulation, some closer to macroscopic modeling and each traffic modeling methodology defines mesoscopic differently.

In Aimsun Next, mesoscopic simulation refers to a link and lane based simulation of individual vehicles where the level of knowledge of vehicle activity is much reduced from that used in microsimulation. In a mesoscopic simulation, a vehicle is considered only as enters and as it exits a road section and the intervening movement is not simulated. The figure below summarizes the difference between the 3 levels of simulation.


Simulation Levels

  • In Microsimulation; time is incremented by Δt at every time step, every vehicle then considers its speed and lane choice and is moved by the distance determined for that time step.

  • In Mesoscopic simulation, time is moved to the next event where the event is a vehicle entering or leaving a section or node. In the figure, at time t~1~, the vehicle enters a section, at t~2~ it leaves that section and a predicted speed and in a predicted lane and t~3~, it enters the next section. Not all vehicles are updated every time, only those vehicles that are at the head of the queue are considered leading to a large reduction in computer time required to run the simulation.

  • In Macroscopic simulation, there are no individual vehicles, instead vehicles are aggregated to flows which are assigned to the network to balance load and minimize journey time.

Discrete-Event Simulation

The Aimsun Next, the mesoscopic simulation approach is based on a discrete-event simulation, where each node works as a queue server for all input sections. The simulation time changes as the simulation proceeds to the points in time at which an event occurs, where an event is defined as an instantaneous occurrence that might change the state of the system, in this case the state of the traffic network. There are different types of events:

  • Vehicle generation (Vehicle Entrance),
  • Vehicle system entrance (Virtual Queue),
  • Vehicle node movement, (Vehicle dynamics)
  • Change in traffic light state (Control),
  • Statistics (Outputs),
  • Matrix changed, (Traffic Demand)

All events in Aimsun Next have a time and a priority. Both are used to sort the events on the event list. For example, events related to a change a traffic light or a new vehicle arrival will be treated before events related to statistics or vehicle node movements.

Components of the Discrete-Event Simulation

Discrete-Event simulations, Law and Kelton (1991) are used for a large number of different real-world systems. They all share a number of common components. In this explanation, only the more important ones are described.

System state In this case, the system state refers to the network status: number of vehicles on sections and lanes, state of the leader vehicles for each section and lane, state of the traffic lights, etc.

Simulation Clock The clock keeps track of the current simulation time in seconds. As opposed to the microscopic simulator, time can change to any future time and does not depend on a fixed simulation step.

Events List The simulator maintains one list of all simulation events. An event has an event time and a priority. Both parameters are used to order the Events list accordingly. For example, at time T the Events list could be as follows for node "148":

  1. Time 4:55:34 - Update Vehicle 12. Move vehicle 12 to the downstream section.
  2. Time 4:55:56 - New Vehicle from centroid 134.
  3. Time 4:56:03 - New Vehicle from centroid 135.
  4. Time 4:56:30 – Change traffic light from node 148
  5. Time 5:00:30 – Gather statistics


Node Server example

Statistical counters The statistics module gathers the simulation statistics at specified intervals.

Event routine A routine that, for each event type, updates the simulation clock and the system state. There is one event route for each event type. An example of an event routine can be the event that moves a vehicle from one section to the downstream section. In this case, it changes the traffic conditions of two sections and the vehicle status.

Random Number Generator Pseudo random numbers are used to generate the vehicle arrivals as well as control the vehicle movement through the network. In the mesoscopic module the random number generator is used for both the mesoscopic and microsimulation mode.

Main Program The main program orchestrates the events and controls the simulation. Its main tasks are:

  • Initialize the network structures and the simulation status.
  • Determine the next event to be resolved.
  • Invoke the event route to update the network status.
  • Check the ending condition that is to reach the simulation end time.

Mesoscopic Initial State

A mesoscopic initial state is different from the microscopic initial state. The microscopic initial state holds a set of vehicles and these vehicles are inserted into the network. In a mesoscopic model, the initial state stores the network status, vehicle definitions and positions and the internal variables used in the mesoscopic calculations. The initial state is then only valid if the network is exactly the same. Any change in the supply or any change in the transit definition can invalidate the initial state.