This repository contains the code used to produce the results of the paper SR-Traffic: Discovering Macroscopic Traffic Flow Models with Symbolic Regression
The dependencies are collected in environment.yaml and can be installed, after cloning the repository, using mamba:
$ mamba env create -f environment.yamlOnce the environment is installed and activated, install the library using
$ pip install -e .To reproduce the results of the paper just run
$ python src/sr_traffic/fund_diagrams/fund_diagrams_results.py --road_name {road_name} --task {task_name}where {road_name} is either US101 or US80, and {road_name} is either prediction or reconstruction.
To re-calibrate a given fundamental diagram, run
$ python src/sr_traffic/fund_diagrams/fund_diagrams_calibration.py --config src/sr_traffic/fund_diagrams/configs/{fnd_name}.yamlwhere{fnd_name} is either greenshields, triangular, Weidmann, del_castillo, or idm.
Finally, to perform a run of SR-Traffic, run
$ python src/sr_traffic/learning/stgp_traffic.pyYou can change the parameters of the algorithm modifying stgp_traffic.yaml.
@article{mantisr,
title={{SR}-{T}raffic: {D}iscovering {M}acroscopic {T}raffic {F}low {M}odels with {S}ymbolic {R}egression},
author={Manti, S. and Mohammadian, S. and Treiber, M. and Lucantonio, A.},
journal={Neural Information Processing Systems, ML4PS Workshop},
year={2025}
}
