megacell / synthetic-traffic

Synthetic traffic data models for networks, static routing preferences, and sensor placement
1 stars 2 forks source link

synthetic-traffic

We are working on producing a set of synthetic urban traffic networks and corresponding data for benchmarking and evaluation purposes.

For example usage, please see:

Convex optimization for traffic assignment

Bayesian inference for traffic assignment

Compressive sensing for traffic assignment

Also, see our contributors!

Contents

  1. General dependencies
  2. Toy networks
  3. Grid networks
  4. Waypoints
  5. [Grid networks in UE] (#gridnetworksue)

  1. General dependencies

We use Python 2.7.

scipy
ipython
matplotlib
delegate

  1. Toy networks

Coming soon!

  1. Grid networks

Dependencies for grid networks

networkx

Usage

python static_matrix.py --prefix '' --num_rows <# ROWS OF STREETS> \
    --num_cols <# COLUMNS OF STREETS> \
    --num_routes_per_od <# ROUTES BETWEEN ODS> \
    --num_nonzero_routes_per_o <# ROUTES WITH NONZERO FLOW PER OD>

Example

python static_matrix.py --prefix '' --num_rows 2 --num_cols 2 \
    --num_routes_per_od 3 --num_nonzero_routes_per_o 3

Example grid network

Example grid network

  1. Waypoints

Dependencies for waypoint

pyshp

Load map via Shapefile

run -i find.py

Find new roads of interest

roads = find('210',sf,shapes,verbose=True)

Generate waypoints

run -i Waypoint.py

Example waypoints

Example waypoints
  1. Grid networks in UE

Dependencies for grid networks in UE

cvxopt
networkx

Running

python test_ue_solver.py
python test_path_solver.py
python test_missing.py
python test_draw.py

Coordinates for bounding box in L.A.: [-118.328299, 33.984601, -117.68132, 34.255881]

Add flow in equilibrium to recreate congestion