Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

teraffic

teraffic is a Python prototype for route planning under convoy movement constraints in dense city traffic.

The current implementation works in three steps:

  1. Download the drivable road network for Mumbai from OpenStreetMap.
  2. Compute a shortest main route between fixed start and end coordinates.
  3. Identify feeder paths that connect into that main route and render everything on an interactive map.

This repository is not a production traffic control system yet. It is a research-style simulation workflow you can run locally.

project status

  • Stage: prototype / research workflow
  • What works now: network download, route computation, feeder extraction, map output
  • What is hardcoded: city (Mumbai, India) and example coordinates in src/downm.py and src/jsonroute.py
  • What is missing for production: live signal control logic, APIs, tests, packaging, and deployment automation

repository layout

teraffic/
├── src/
│   ├── downm.py      # downloads OSM road graph and saves GraphML
│   ├── jsonroute.py  # computes main route + feeder paths, writes JSON
│   └── visu.py       # renders map layers to HTML
├── requirements.txt
└── README.md

prerequisites

  • Python 3.10+
  • pip
  • Internet access (required for OpenStreetMap download in downm.py)

setup

python -m venv .venv

Windows:

.venv\Scripts\activate

Linux/macOS:

source .venv/bin/activate

Install dependencies:

pip install -r requirements.txt

Create output folders (ignored by git):

mkdir downloads
mkdir visual

run the pipeline

From the teraffic root:

  1. Download city road network:
python src/downm.py
  1. Compute route and feeder paths:
python src/jsonroute.py
  1. Generate the visualization:
python src/visu.py

Expected outputs:

  • downloads/mumbai_drive_network.graphml
  • src/feeder_route_data.json
  • visual/mumbai_road_network_with_feeder_routes.html

Open the HTML file in a browser to inspect the result.

configuration points

To try another scenario, edit:

  • place_name in src/downm.py
  • start_coords and end_coords in src/jsonroute.py

known limitations

  • No command-line arguments or config file yet.
  • No validation for impossible routes or missing files.
  • Route quality is based on road length only (weight='length').
  • No automated test coverage at the moment.

next upgrades

  • Add CLI arguments for city and coordinates.
  • Add route quality options (time, congestion proxy, blocked intersections).
  • Add unit tests for feeder path extraction.
  • Wrap the workflow in a small API service for integration with other tools.

About

a system to simulate safe passage of convoys through populated cities to leave as minimal impact on traffic fingerprint of local traffic network.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages