We present a novel framework that bridges the gap between deep learning-based OD traffic flow models and realistic, large-scale simulation environments for the development and validation of digital twins. Leveraging the PyTorch deep learning library, we implement a gradient-based OD estimation model and evaluate its performance on the Utah transportation network. Our simulation encompasses 3,275 nodes and 3,785 edges, modeling over 3 million agents using the MATSim platform. All code and datasets associated with this work are publicly available at: https://directlab.github.io/MatsimAI/.
Overview of the digital twin construction pipeline for large-scale traffic network simulations. The left branch shows the preprocessing of real-world geographic data, beginning with network extraction from OpenStreetMaps via JOSM, followed by data cleaning, conversion to MATSim format, and parsing into tensor representations. These are used to derive a graph structure Ĝ(V,E), which is clustered using K-means to form the clustered graph G*(C,E) and time-dependent subgraphs Gₜ(V,E), integrating UDOT traffic flows. The center illustrates the application of a traffic assignment matrix algorithm to infer origin-destination (OD) matrices. The right branch shows the iterative OD estimation process, where weights W are optimized using the ADAM optimizer to generate MATSim plans.
The mean average absolute difference between the predicted flows and the actual flows as recorded by the UDOT sensors.
@inproceedings{peterson2024digitaltwins,
author = {Isaac Peterson and Christopher Allred and Chandler Justice and Mario Harper},
title = {A Deep Learning Framework for Large-Scale Traffic Flow Digital Twin Development with MATSim},
booktitle = {IEEE Conference},
year = {2024},
}