Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 1.35 KB

README.md

File metadata and controls

61 lines (45 loc) · 1.35 KB

Traffic Assignment (TA) Tutorial

The only MSA + FW + PBA code implementation you can find in Python. The implementation is based on the book Transportation Network Analysis by Stephen D. Boyles, Nicholas E. Lownes, and Avinash Unnikrishnan.

Please note that the code is for educational purposes only. The code is not optimized for large-scale networks.

If you find the code helpful, please consider giving it a star.

0. Prerequisite

1. Clone the repository

git clone https://github.com/sguo28/Traffic_Assignment_Tutorial.git
cd Traffic_Assignment_Tutorial

2. Pacakges installation

conda create --name ta python=3.9
conda activate ta
pip install -r requirements.txt
# (requirements.txt)
networkx==3.1
pandas==2.1.4
numpy==1.26.3
scipy==1.11.4
matplotlib==3.8.0

Install Jupiter Notebook

conda install -c conda-forge jupyterlab

Run Jupyter Notebook

jupyter lab

3. Run the Code

TA_MSA.ipynb
TA_FW.ipynb

Supported Functions

  • Frank-Wolfe Algorithm
  • Method of Successive Averages (MSA)
  • Path-based Algorithm (PBA)
  • User Equilibrium (UE)
  • System Optimal (SO)