Skip to main content

Path4GMNS

platform Downloads GitHub release Read the Docs

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,

  1. finding (static) shortest paths,
  2. performing either path-based or link-based User-Equilibrium (UE) traffic assignment,
  3. conducting dynamic traffic assignment (DTA) after UE.
  4. evaluating multimodal accessibility and equity,
  5. making the Origin-Destination (OD) demand matrix estimation (ODME),
  6. synthesizing zones and 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,
  • UE + DTA,
  • ODME.

Architecture

Quick Start

  1. Tutorial written in Jupyter notebook with step-by-step demonstration.
  2. Documentation on Installation, Use Cases, Public API, and more.
  3. OpenDTA 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

$ pip install path4gmns

[!IMPORTANT] v0.10.0 introduces the link-based UE that adopts the Frank-Wolfe algorithm with line search. As it does not preserve any paths, each iteration runs faster than the path-based procedure with less memory footprint. Besides, it fixes potential issues of invoking DTALite. Please discard all old versions.

[!WARNING] find_shortest_path() computes the shortest path per travel time rather than distance for v0.9.9.post1 and any earlier versions. See Issue #58 for details. v0.9.10 offers the correct implementation with the flexibility to switch between time and distance.

[!WARNING] Invoking find_shortest_path() and find_ue() in the same code snippet will lead to OSError: exception: access violation reading ... for v0.9.9 and any version before.

[!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.

[!NOTE] ODME is available with v0.9.9 and higher.

Dependency

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. (2025, December 15). 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.

References

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.

Metadata

Release files for path4gmns 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for path4gmns 0.10.0
File Size Uploaded Provenance
path4gmns-0.10.0.tar.gz 2.2 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for path4gmns 0.10.0
File Interpreter ABI Platform
path4gmns-0.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.4 MB

Release files / path4gmns-0.10.0.tar.gz

Download URL path4gmns-0.10.0.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
64fcd243fcb3e756388196d9c06dec4a1b2ca995733c3132985d513de57fd5ff
BLAKE2b-256 checksum
How to use checksums
5bf9bf464cf401a48794d6b78be120d6be38972a5e590eb015dd3be8446863ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / path4gmns-0.10.0-py3-none-any.whl

Download URL path4gmns-0.10.0-py3-none-any.whl
Size 2.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e60b6f2d34f3f9dd92d32756c086632eaeaa56b81becf62cb33b582a05389048
BLAKE2b-256 checksum
How to use checksums
a4d69511549313fb36202037c7c12feef55bb56f08b609cba3e21b7ae51c5c70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Security for path4gmns 0.10.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page