Repository navigation
Releases: harisbal/pytraf
Release list
PyTraf 0.3.1
Fixes the 0.3.0 upload to PyPI: the source distribution now includes the license file. No code changes. See 0.3.0 for the rename from PyTA to PyTraf.
Install: pip install pytraf (Python 3.9 or newer; wheels for Linux, macOS and Windows, also attached below).
PyTraf 0.3.0
PyTA is now PyTraf
The package is renamed PyTraf (pip install pytraf, import pytraf), because the name PyTA is taken on PyPI. Nothing else changes in behaviour. This is the first release on PyPI.
- Install:
pip install pytraf. Wheels for Linux (x86_64, aarch64), macOS (Intel, Apple silicon) and Windows (x86_64), Python 3.9 or newer; they are also attached below. - Update your code:
import pytabecomesimport pytraf. - The repository is now https://github.com/harisbal/pytraf and the documentation https://harisbal.github.io/pytraf/.
PyTA 0.2.0
What's new
A cleaner Python API. The old names keep working with a DeprecationWarning and are removed in 0.3.0; the changelog maps each old name to its replacement.
network.assign(classes, ...)runs an assignment (pyta.assign(network, classes, ...)is the same function). Options afterclassesare keyword-only.- A grouped result:
result.linksandresult.turns(flow,by_class,volume,preload,time,table()),result.paths,result.unrouted,result.diagnosticsandresult.summary(). OrderandUnreachablestring enums fororderandunreachable. Plain strings still work, and a wrong value lists the valid ones.- The error for demand no allowed path serves now names the pairs, with their count and trips.
- Renames:
is_endpointisis_centroid,zone_nodes_are_endpointsiszone_nodes_are_centroids, andDemand.skipped_flowisDemand.unknown_zone_flow.
Install
PyTA is not on PyPI yet. Download the wheel for your platform from the assets below (Linux x86_64 and aarch64, macOS Intel and Apple silicon, Windows x86_64; Python 3.9 or newer) and run pip install <wheel file>, or build from source; see Getting started.
Documentation: https://harisbal.github.io/pyta/
PyTA 0.1.1
What's new
assign(..., unreachable="skip"): demand between nodes that no allowed path joins no longer aborts the assignment. Unroutable OD pairs are left out before the solve and reported on the result:result.unrouted_flow: trips left out, one total per classresult.unrouted(): NumPy arraysclass,origin,destination,flowresult.unrouted_table(): the same as a pandas DataFrame
- The default stays
unreachable="error", so existing code behaves as before. - Prebuilt wheels for Linux (x86_64, aarch64), macOS (Intel, Apple silicon) and Windows (x86_64), plus the source distribution, are attached below. Each wheel works on Python 3.9 and newer.
Install
PyTA is not on PyPI yet. Download the wheel for your platform from the assets below and run pip install <wheel file>, or build from source; see Getting started.
Documentation: https://harisbal.github.io/pyta/
PyTA 0.1.0
First public release of PyTA: path-based static traffic assignment with a Rust core and a Python interface.
Features
- User-equilibrium assignment by path-based gradient projection, with Frank-Wolfe as a reference method (Rust).
- Turn-aware routing: turn bans, fixed penalties and flow-dependent turn delays, exact through link-labelled shortest paths.
- Multi-class assignment with class-specific demand, passenger-car equivalents, extra link costs (tolls) and link restrictions.
- Background traffic as fixed link and turn preloads.
- Results as tables:
link_table(),turn_table()andpath_table()return pandas DataFrames; the NumPy arrays remain available. - Inputs: pandas DataFrames or NumPy arrays (
Network.from_tables,Demand.from_table), TNTP files and GMNS datasets. - Validation against the published equilibria of Sioux Falls and Anaheim, and against independent models for turns and classes.
Install
PyTA is not on PyPI yet. Build it from source with Rust and maturin; see Getting started.
Documentation: https://harisbal.github.io/pyta/