Mobility pattern prediction

Published on marzo 3, 2020

Ferran Torrent

Senior Data Scientist at Aimsun

Aimsun Live predicts road traffic in real-time by simulating how mobility demand interacts with the infrastructure. Unlike purely data-driven methods, a simulation-based approach allows the system to not only predict traffic under recurrent conditions, but also deal with any changes in the infraestructure, such as incidents or changes to traffic control plans. This approach has three main requirements:

  • Good calibration of the infraestructure – demand supply
  • Good calibration of the mobility demand
  • Prediction of the demand

 

In this article I want to show how good Aimsun Live is at predicting mobility patterns that are then used to simulate road traffic.

As a reminder, in a previous article I focused on the importance of mobility patterns for simulating and predicting mobility and the advantages of applying unsupervised learning – clustering – to mobility data for extracting date-related patterns. We showed such advantages with a real example with traffic data of the city of Wiesbaden. For example, Figure 1, on the left, shows the distribution of patterns over two years: each column is a day of the week, each row is a week, and each color represents a day-mobility pattern. On the right, it shows the %GEH<5 comparing each day with its pattern using the patterns extracted with clustering or other patterns calculated by grouping days according to the day of the week and holidays.

 

If we want to simulate the demand on a given future day, then the problem is that this procedure requires a prediction of the right pattern for that day. Let’s say, for example, that you want to simulate what will happen over the next hour, like Aimsun Live does. You can predict the mobility pattern associated with a particular mobility demand, but you’ll need to have built a good pattern classifier. 

The left-most pattern in Figure 2 shows the ground truth (it is in fact the same as the first figure above). Then, moving across one image to the right, you’ll see the prediction made using logistic regression, then a random forest, and then the pattern matcher that is part of Aimsun Live.

Figure 3 shows the %GEH<5 obtained for each pattern. Each value in the curve represents one day, and the days are ordered from the worst to the best according to the %GEH<5. 

A simple model like logistic regression can’t model how patterns are distributed, especially for atypical weeks or days related to holidays.

A random forest is more successful, and it doesn’t do a bad job of predicting the right patterns even on atypical days, but it fails completely on around 10 days; 10 failed days is not very significant over 730 days/2 years, but on these 10 days the pattern chosen is radically different from the right one. In other words, there is room for improvement in terms of modeling how good each pattern is for each day.

The pattern predictor we use in Aimsun Live has slightly lower accuracy in terms of counting the best possible pattern, but its accuracy in terms of %GEH<5 does not suffer severe drops. It does a good job modeling how good each pattern is for each day, and when it fails it tends to choose the 2nd or 3rd best option. This limits the loss of accuracy when the prediction is not optimal. Note that the results are using 5-fold cross-validation, meaning that there is no overfitting.

The predictions showed use calendar features, such as day of the week, holidays, or month, for predicting the pattern. However, for short-term predictions (like one-hour-ahead), mobility data is available right up until the moment of the prediction, which can improve accuracy. This is the case in Aimsun Live and you can see the results in Figure 4, which shows that when Aimsun Live’s predictor uses mobility data it achieves almost optimal accuracy in terms of %GEH<5. Moreover, the predictor is trained with the same number of examples as logistic regression and random forest, meaning that each day represents one example in the supervised learning process, meaning that the approach does not require more resources.

Machine learning offers many ways of tackling the same problem, but its successful deployment ultimately depends on a deep understanding of the problem so that we can choose the best tools and tune the algorithms correctly.

Aimsun
  • ¿Tienes alguna pregunta? Ponte en contacto.

    ¡Estamos aquí para ayudarte!

  • ¿Tienes alguna pregunta? Ponte en contacto.

    ¡Estamos aquí para ayudarte!

SHARE

Citar Aimsun Next

Aimsun Next 23

Aimsun (2023). Aimsun Next 23 Manual del usuario, Aimsun Next Versión 23.0.0, Barcelona, España. Acceso: 19, 2023. [Online].
Disponible en: https://docs.aimsun.com/next/23.0.0/


Aimsun Next 20.0.5

Aimsun (2021). Aimsun Next 20.0.5 Manual del usuario, Aimsun Next Versión 20.0.3, Barcelona, España. Acceso: May. 1, 2021. [En software].
Disponible: qthelp://aimsun.com.aimsun.20.0/doc/UsersManual/Intro.html

Aimsun Next 23

@manual {​​​​​​​​AimsunManual,

título = {​​​​​​​​Aimsun Next 23 User’s Manual}​​​​​,
autor = {​​​​​​​​Aimsun}​​​​​​​​,
edición = {​​​​​​​​​​​​​​​Aimsun Next 23.0.0}​​​​​​​​​​​​​​​,
domicilio = {​​​​​​​​​​​​​​​Barcelona, Spain}​​​​​​​​​​​​​​​,
año = {​​​​​​​​​​​​​​​2023. [Online]}​​​​​​​​​​​​​​​,
mes = {​​​​​​​​​​​​​​​Accessed on: Month, Day, Year}​​​​​​​​​​​​​​​,
url = {​​​​​​​​​​​​​​​https://docs.aimsun.com/next/23.0.0/}​​​​​​​​​​​​​​​,
}​​​​​​​​​​​​​​​


Aimsun Next 20.0.5

@manual {​​​​​​​​AimsunManual,

título = {​​​​​​​​Aimsun Next 20.0.5 User’s Manual}​​​​​​​​,
autor = {​​​​​​​​Aimsun}​​​​​​​​,
edición = {​​​​​​​​​​​​​​​Aimsun Next 20.0.5}​​​​​​​​​​​​​​​,
domicilio = {​​​​​​​​​​​​​​​Barcelona, Spain}​​​​​​​​​​​​​​​,
año = {​​​​​​​​​​​​​​​2021. [En software]}​​​​​​​​​​​​​​​,
mes = {​​​​​​​​​​​​​​​Accessed on: Month, Day, Year}​​​​​​​​​​​​​​​,
url = {​​​​​​​​​​​​​​​qthelp://aimsun.com.aimsun.20.0/doc/UsersManual/Intro.html}​​​​​​​​​​​​​​​,
}​​​​​​​​​​​​​​​

Aimsun Next 23

TY – COMP
T1 – Manual del usuario de Aimsun Next 23
A1 – Aimsun
ET – Aimsun Next Version 23.0.0
Y1 – 2023
Y2 – Acceso: Mes, Día, Año
CY – Barcelona, España
PB – Aimsun
UR – [En software]. Disponible en: https://docs.aimsun.com/next/23.0.0/


Aimsun Next 20.0.5

TY – COMP
T1 – Manual del usuario de Aimsun Next 20.0.5
A1 – Aimsun
ET – Aimsun Next Version 20.0.5
Y1 – 2021
Y2 – Acceso: Mes, Día, Año
CY – Barcelona, España
PB – Aimsun
UR – [In software]. Available: qthelp://aimsun.com.aimsun.20.0/doc/UsersManual/Intro.html