Navigation Menu
Search code, repositories, users, issues, pull requests..., provide feedback.
We read every piece of feedback, and take your input very seriously.
Saved searches
Use saved searches to filter your results more quickly.
To see all available qualifiers, see our documentation .
- Notifications You must be signed in to change notification settings
A collection of open-source projects on the Traffic Assignment Problem
jdlph/TAP101
Folders and files, repository files navigation.
A collection of good open-source projects covering the fundamental components related to the Traffic Assignment Problem (TAP).
Shortest Paths
- tntp from Dr. Hillel Bar-Gera. One of the most efficient Deque implementations of the modified label correcting (MLC) algorithm in C. See mincostroutes.cpp for details. Its enhanced C++ counterpart has been served as the path engine for Path4GMNS and TransOMS .
- jdlph/shortest-path-algorithms . A comprehensive list of the three special implementations of the MLC algorithm in Python including FIFO, Deque, and Dijkstra's algorithm. It also demonstrates how to boost their performances using proper data structures. Analysis on time complexity is provided.
- nlperic/ta-lab . A simple Python implementation of the heap Dijkstra's algorithm and Yen's algorithm on solving the K-shortest paths problem (KSP) via a recursive call of the heap Dijkstra's algorithm.
Static User Equilibrium Traffic Assignment
The common approach to solve the static user equilibrium (UE) traffic assignment problem is Frank-Wolfe (FW) algorithm , which actually solves the linear approximation of the BMW model after the first-order Taylor approximation.
Two of its core steps are finding a direction and then minimizing the objective function along this direction. The latter is essentially a linear search to determine the optimal step size, which can be obtained through methods using derivatives. However, numerical procedures without using derivatives are more common in transportation literature and applications due to their simplicity. Some examples include
- Bisection method;
- Golden section method;
- 1 / i or 1 / (i + 1), where i is the current number of iteration.
They all lead to diminishing step sizes which will converge to zero. The diminishing step size is the cornerstone of convergency of traffic assignment. The first two methods deal with the derivative of the objective function (i.e., they are methods using derivatives). The third one is often referred to as the method of successive averages (MSA) in transportation literature. Note that it is just a numerical procedure to compute step size rather than an algorithm to solve the UE traffic assignment problem. In other words, any literature or application on traffic assignment claiming adopting MSA is still solving the problem using FW algorithm. There is NO such MSA which could solely solve the traffic assignment problem .
As the BMW model features the arc-based or link-based formulation, it is sometimes called as link-based UE . UE can also be captured by variational inequality with respect to path flows, which often requires path enumeration (between each OD pair), and is thus referred to as path-based UE .
Frank-Wolfe Algorithm
- AequilibraE . It provides Conjugate FW (CFW) and Biconjugate FW (BFW) for faster convergency besides the standard implementation of FW algorithm. See here for details. It is also a comprehensive Python package for transportation modeling.
- chkwon/TrafficAssignment.jl . A Julia package for finding traffic user equilibrium flow. Similar to AequilibraE, it also implements FW, CFW, and BFW along with golden section search method and Newton's method for line search.
- ZhengLi95/User-Equilibrium-Solution . A standard implementation of FW algorithm with the Golden section method in Python with a detailed writeup .
- nlperic/ta-lab . A simple implementation of FW algorithm with both the bisection method and MSA in Python only dependent on numpy.
Gradient Projection
- DTALite . A specialized gradient projection method to solve the variational inequality model for UE in C++. It is also an open-source AMS (Analysis, Modeling, and Simulation) library for efficiently macroscopic and mesoscopic traffic assignment, which has been widely used by U.S. Department of Transportation (DOT), state DOT's, local transportation agencies, etc.
- Path4GMNS . An equivalent single-processing implementation in Python intended for both transportation planning and educational enrichment. It also provides a public API to the C++-based DTALite to conduct various multimodal traffic assignments.
Dynamic Traffic Assignment
- DTALite . Simulation-based dynamic traffic assignment (DTA) to manifest traffic evolution over time through some representation of traffic dynamics including kinematic wave model, spatial queue, etc.
- Path4GMNS . A simple traffic simulator using the point queue model. The routing decisions could be from the UE traffic assignment or simply following the shortest paths.
- TransOMS . It features a modern, cross-platform, and lightning-fast DTA system besides the same functionality as DTALite.
Good References
- Sheffi, Y. (1985). Urban Transportation Networks: Equilibrium Analysis with Mathematical Programming Methods . Prentice-Hall.
- Boyles, S. D., N. E. Lownes, & A. Unnikrishnan. (2023). Transportation Network Analysis, Volume I, Version 0.91 .
- Bertsekas, D., & Gafni, E. (1983). Projected Newton methods and optimization of multicommodity flows . IEEE Transactions on Automatic Control, 28(12), 1090–1096.
- Jayakrishnan, R., Tsai, W. K., Prashker, J. N., & Rajadyaksha, S. (1994). A Faster Path-Based Algorithm for Traffic Assignment (Working Paper UCTC No. 191) . The University of California Transportation Center.
- Peeta, S., & Ziliaskopoulos, A. K. (2001). Foundations of Dynamic Traffic Assignment: The Past, the Present and the Future. Networks and Spatial Economics 2001 1:3, 1(3), 233–265. https://doi.org/10.1023/A:1012827724856
- Zhou, X., & Taylor, J. (2014). DTALite: A queue-based mesoscopic traffic simulator for fast model evaluation and calibration. Cogent Engineering, 1(1). https://doi.org/10.1080/23311916.2014.961345
dyntapy: dynamic and static traffic assignment in Python
Editor: @hugoledoux ( all papers ) Reviewers: @liberostelios ( all reviews ), @EricaEgg ( all reviews )
Paul Ortmann ( 0000-0002-1451-3662 ), Chris M.j. Tampère ( 0000-0002-5489-7816 )
Ortmann et al., (2022). dyntapy: dynamic and static traffic assignment in Python. Journal of Open Source Software, 7(77), 4593, https://doi.org/10.21105/joss.04593
dynamic traffic assignment static traffic assignment transport modeling car traffic modeling
Authors of JOSS papers retain copyright.
This work is licensed under a Creative Commons Attribution 4.0 International License .
Journal of Open Source Software is an affiliate of the Open Source Initiative .
Journal of Open Source Software is part of Open Journals , which is a NumFOCUS-sponsored project .
Table of Contents Public user content licensed CC BY 4.0 unless otherwise specified. ISSN 2475-9066
path4gmns 0.9.9
pip install path4gmns Copy PIP instructions
Released: Oct 18, 2024
An open-source, cross-platform, lightweight, and fast Python path engine for networks encoded in GMNS
Verified details
Maintainers.
Unverified details
Project links.
- License: Apache Software License (Apache License 2.0)
- Author: Dr. Xuesong Zhou, Dr. Peiheng Li
Classifiers
- OSI Approved :: Apache Software License
- OS Independent
- Python :: 3
Project description
Path4GMNS is an open-source, cross-platform, lightweight, and fast Python path engine for networks encoded in GMNS . Besides finding static shortest paths for simple analyses, its main functionality is to provide an efficient and flexible framework for column-based (path-based) modeling and applications in transportation (e.g., activity-based demand modeling). Path4GMNS supports, in short,
- finding (static) shortest path between two nodes,
- performing path-based User-Equilibrium (UE) traffic assignment,
- conducting dynamic traffic assignment (DTA) after UE.
- evaluating multimodal accessibility and equity,
- making the Origin-Destination (OD) demand matrix estimation (ODME),
- synthesizing zones and Origin-Destination (OD) demand.
Path4GMNS also serves as an API to the C++-based DTALite to conduct various multimodal traffic assignments including,
- Link-based UE,
- Path-based UE,
Quick Start
- Tutorial written in Jupyter notebook with step-by-step demonstration.
- Documentation on Installation, Use Cases, Public API, and more.
- TransOMS on the C++ equivalent.
We highly recommend that you go through the above Tutorial , no matter you are one of the existing users or new to Path4GMNS.
Installation
Path4GMNS has been published on PyPI , and can be installed using
[!IMPORTANT] v0.9.9 comes with bug fixes, new functionality, and performance improvement. Please discard all old versions .
[!NOTE] ODME is now available with v0.9.9.
[!CAUTION] Any version prior to v0.9.4 will generate INCORRECT simulation results.
[!CAUTION] Calling DTALite and synthesizing zones and OD demand are not functioning for v0.9.5 and v0.9.6 .
[!CAUTION] Zone and demand synthesis is PROBLEMATIC for any version before v0.9.9.
The Python modules are written in Python 3.x , which is the minimum requirement to explore the most of Path4GMNS. Some of its functions require further run-time support, which we will go through along with the corresponding Use Cases .
How to Cite
Li, P. and Zhou, X. (2024, October 17). Path4GMNS . Retrieved from https://github.com/jdlph/Path4GMNS
Please Contribute
Any contributions are welcomed including advise new applications of Path4GMNS, enhance documentation and docstrings in the source code, refactor and/or optimize the source code, report and/or resolve potential issues/bugs, suggest and/or add new functionalities, etc.
Path4GMNS has a very simple workflow setup, i.e., master for release (on both GitHub and PyPI) and dev for development . If you would like to work directly on the source code (and probably the documentation), please make sure that the destination branch of your pull request is dev , i.e., all potential changes/updates shall go to the dev branch before merging into master for release.
You are encouraged to join our Discord Channel for the latest update and more discussions.
Lu, C. C., Mahmassani, H. S., Zhou, X. (2009). Equivalent gap function-based reformulation and solution algorithm for the dynamic user equilibrium problem . Transportation Research Part B: Methodological, 43, 345-364.
Jayakrishnan, R., Tsai, W. K., Prashker, J. N., Rajadyaksha, S. (1994). A Faster Path-Based Algorithm for Traffic Assignment (Working Paper UCTC No. 191). The University of California Transportation Center.
Bertsekas, D., Gafni, E. (1983). Projected Newton methods and optimization of multicommodity flows . IEEE Transactions on Automatic Control, 28(12), 1090–1096.
Project details
Release history release notifications | rss feed.
Oct 18, 2024
Dec 17, 2023
Sep 14, 2023
Sep 8, 2023
Aug 16, 2023
Aug 2, 2023
Apr 8, 2023
Mar 14, 2023
Feb 11, 2023
Jan 22, 2023
0.8.8a2 pre-release
Nov 26, 2022
0.8.8a1 pre-release yanked
Oct 15, 2022
0.8.7a1 pre-release
Oct 2, 2022
Sep 28, 2022
0.8.6a2 pre-release
Sep 10, 2022
0.8.6a1 pre-release
Sep 6, 2022
Aug 7, 2022
Jul 13, 2022
Apr 30, 2022
Apr 9, 2022
Feb 6, 2022
Aug 29, 2021
Aug 14, 2021
Jul 6, 2021
Jun 6, 2021
May 16, 2021
May 8, 2021
0.7.0a1 pre-release
Apr 17, 2021
Apr 2, 2021
Mar 20, 2021
0.5.2a1 pre-release
Mar 22, 2021
Mar 15, 2021
Mar 14, 2021
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages .
Source Distribution
Uploaded Oct 18, 2024 Source
Built Distribution
Uploaded Oct 18, 2024 Python 3
File details
Details for the file path4gmns-0.9.9.tar.gz .
File metadata
- Download URL: path4gmns-0.9.9.tar.gz
- Upload date: Oct 18, 2024
- Size: 2.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
See more details on using hashes here.
Details for the file path4gmns-0.9.9-py3-none-any.whl .
- Download URL: path4gmns-0.9.9-py3-none-any.whl
- Tags: Python 3
- português (Brasil)
Supported by
IMAGES
VIDEO