/pesuelogit-computation-graph

Parameter Estimation of LOGIT-based Stochastic User Equilibrium models using computational graphs and day-to-day system-level data

Primary LanguagePythonMIT LicenseMIT

Parameter Estimation of Stochastic User Equilibrium with LOGIT assignment models (PESUELOGIT)

PESUELOGIT allows for the joint estimation of the Origin-Destination matrix using system-level data collected in multiple hourly periods and days. The diagram below shows a simplified representation of the computational graph that is solved for a toy transportation network with five nodes:

framework-1

framework-1

To understand the theory behind the algorithms and the use cases of this codebase, you can review the following resources:

Please cite this work as:

@article{guarda2024computational,
  title={Estimating network flow and travel behavior using day-to-day system-level data: A computational graph approach},
  author={Guarda, Pablo and Battifarano, Matthew and Qian, Sean},
  journal={Transportation Research Part C: Emerging Technologies},
  volume={158},
  pages={104409},
  year={2024}
}

Development Setup

If using a Windows computer or a Macbook with Intel chip, you can use poetry for python packaging and dependency management. The steps are:

  1. Clone this repository.
  2. Install the poetry cli.
  3. Create a virtual environment: poetry shell
  4. Create .lock file with project dependencies: poetry lock.
  5. Install project dependencies: poetry install.
  6. Run the tests: pytest

If using Linux or a Macbook with Apple Silicon chip, we recommend using Conda for python packaging and dependency management. The steps are:

  1. Clone this repository.
  2. Download and install Anaconda: https://docs.anaconda.com/anaconda/install/index.html
  3. Create virtual environment: conda create -n pesuelogit
  4. Activate environment: conda activate pesuelogit
  5. Install dependencies: conda env update -f pesuelogit.yml. If you are using linux, use pesuelogit-linux.yml instead.
  6. Run the tests: pytest

This repository is currently compatible with Python 3.9.x

Examples

The folder examples/notebooks contains Jupyter notebooks with code demonstrations that can be reproduced from your local environment. If you are using VS Code, please make sure to select the pesuelogit environment as your kernel to run each notebook.

Visualizations

Experiments

Model training

siouxfalls-convergence-suelogit relative-gap-siouxfalls

Origin-destination demand estimation

ode-sioux

Parameter estimation

Large-scale deployment

Model training

relative-gap-fresno

Parameter estimation

fresno-total-trips-periods fresno-utility-periods

Collaboration

For any questions or interest in collaborating on this project, please open an issue in this repository. This package was developed under the guidance of Prof. Sean Qian. This codebase is being extended in the MaTE repository.

Funding

This project was partially funded through National Science Foundation Grant CMMI-1751448: Probabilistic Network Flow Theory

🌟 Loved the Project? Give Us a Star!

We are thrilled to see you here! If you find this codebase useful for your project or it has been a helpful resource, please consider giving it a star. 🌟 Your support means a lot and it also helps others discover this work.