Command line¶
Every command runs as python -m ridegraph <command>. This page is
generated from the argument parser itself when the docs are built.
usage: ridegraph [-h]
{fetch,build,info,validate,serve,osrm-prepare,compare-osrm,live,route,eta,contract,bench,eta-train,reach,tour,dispatch,export-web}
...
Quickest-route search on real road networks.
positional arguments:
{fetch,build,info,validate,serve,osrm-prepare,compare-osrm,live,route,eta,contract,bench,eta-train,reach,tour,dispatch,export-web}
fetch download drivable roads from OpenStreetMap
build convert raw OSM JSON into a road network
info print graph statistics
validate compare simulated speeds with published London figures
serve run the HTTP routing API
osrm-prepare write OSM XML and segment speeds for OSRM
compare-osrm compare routes and times with a running OSRM
live fetch current TfL road disruptions
route quickest route between two coordinates
eta how one trip's time and route change through the day
contract preprocess the network into a Contraction Hierarchy
bench compare all algorithms on random queries
eta-train train and compare learned ETA models
reach area reachable within a time budget
tour best order to visit several stops
dispatch simulate ride dispatch and compare policies
export-web export graph and hierarchies for the map demo
options:
-h, --help show this help message and exit
fetch¶
usage: ridegraph fetch [-h] [--city {london,nicosia,new-york}]
[--bbox SOUTH WEST NORTH EAST] [--out OUT] [--url URL]
options:
-h, --help show this help message and exit
--city {london,nicosia,new-york}
--bbox SOUTH WEST NORTH EAST
override the city's area
--out OUT
--url URL use only this Overpass server (default: try several)
build¶
usage: ridegraph build [-h] [--city {london,nicosia,new-york}] [--raw RAW]
[--out OUT]
options:
-h, --help show this help message and exit
--city {london,nicosia,new-york}
--raw RAW
--out OUT
info¶
usage: ridegraph info [-h] [--network NETWORK]
options:
-h, --help show this help message and exit
--network NETWORK
validate¶
usage: ridegraph validate [-h] [--network NETWORK] [--trips TRIPS]
options:
-h, --help show this help message and exit
--network NETWORK
--trips TRIPS
serve¶
usage: ridegraph serve [-h] [--network NETWORK] [--eta-model ETA_MODEL]
[--host HOST] [--port PORT] [--workers WORKERS]
options:
-h, --help show this help message and exit
--network NETWORK
--eta-model ETA_MODEL
eta-model.json from eta-train or export-web
--host HOST
--port PORT
--workers WORKERS worker processes
osrm-prepare¶
usage: ridegraph osrm-prepare [-h] [--raw RAW] [--network NETWORK] [--out OUT]
options:
-h, --help show this help message and exit
--raw RAW
--network NETWORK
--out OUT
compare-osrm¶
usage: ridegraph compare-osrm [-h] [--network NETWORK] [--url URL]
[--queries QUERIES] [--seed SEED] [--out OUT]
options:
-h, --help show this help message and exit
--network NETWORK
--url URL
--queries QUERIES
--seed SEED
--out OUT also save the summary as JSON
live¶
usage: ridegraph live [-h] [--network NETWORK] [--out OUT]
options:
-h, --help show this help message and exit
--network NETWORK
--out OUT save the feed for export-web --tfl
route¶
usage: ridegraph route [-h] [--network NETWORK]
[--algorithm {ch,astar,bidirectional,dijkstra}]
[--alternatives] [--avoid-charge] [--live] [--tfl TFL]
[--at HH:MM] [--weekend] [--turns]
origin destination
positional arguments:
origin lat,lon
destination lat,lon
options:
-h, --help show this help message and exit
--network NETWORK
--algorithm {ch,astar,bidirectional,dijkstra}, -a {ch,astar,bidirectional,dijkstra}
--alternatives also offer up to two different routes
--avoid-charge keep out of the Congestion Charge zone
--live route around current TfL closures (Customizable CH)
--tfl TFL use saved TfL disruptions instead of fetching
--at HH:MM time of day for traffic
--weekend use the weekend traffic curve
--turns charge for turns and traffic lights
eta¶
usage: ridegraph eta [-h] [--network NETWORK] [--times HH:MM [HH:MM ...]]
[--weekend] [--turns]
origin destination
positional arguments:
origin lat,lon
destination lat,lon
options:
-h, --help show this help message and exit
--network NETWORK
--times HH:MM [HH:MM ...]
times of day to compare
--weekend
--turns
contract¶
usage: ridegraph contract [-h] [--network NETWORK] [--at HH:MM] [--weekend]
[--turns]
options:
-h, --help show this help message and exit
--network NETWORK
--at HH:MM time of day for traffic
--weekend use the weekend traffic curve
--turns charge for turns and traffic lights
bench¶
usage: ridegraph bench [-h] [--network NETWORK] [--grid GRID]
[--queries QUERIES] [--seed SEED] [--at HH:MM]
[--weekend] [--turns]
options:
-h, --help show this help message and exit
--network NETWORK
--grid GRID use a synthetic N x N grid instead
--queries QUERIES
--seed SEED
--at HH:MM time of day for traffic
--weekend use the weekend traffic curve
--turns charge for turns and traffic lights
eta-train¶
usage: ridegraph eta-train [-h] [--network NETWORK] [--trips TRIPS]
[--seed SEED] [--out OUT]
options:
-h, --help show this help message and exit
--network NETWORK
--trips TRIPS
--seed SEED
--out OUT save the gradient-boosted model as JSON
reach¶
usage: ridegraph reach [-h] [--network NETWORK] [--bands MIN [MIN ...]]
[--arriving] [--compare COMPARE] [--at HH:MM]
[--weekend]
point
positional arguments:
point lat,lon
options:
-h, --help show this help message and exit
--network NETWORK
--bands MIN [MIN ...]
--arriving journeys into the point
--compare COMPARE hour to compare with
--at HH:MM time of day for traffic
--weekend use the weekend traffic curve
tour¶
usage: ridegraph tour [-h] [--network NETWORK] [--open] [--at HH:MM]
[--weekend]
stops [stops ...]
positional arguments:
stops lat,lon (depot first)
options:
-h, --help show this help message and exit
--network NETWORK
--open end at the last stop
--at HH:MM time of day for traffic
--weekend use the weekend traffic curve
dispatch¶
usage: ridegraph dispatch [-h] [--network NETWORK] [--drivers DRIVERS]
[--demand DEMAND] [--start START] [--hours HOURS]
[--days DAYS]
options:
-h, --help show this help message and exit
--network NETWORK
--drivers DRIVERS
--demand DEMAND peak ride requests per minute
--start START hour the simulated window starts
--hours HOURS
--days DAYS simulated mornings to average over
export-web¶
usage: ridegraph export-web [-h] [--city {london,nicosia,new-york}]
[--network NETWORK] [--out OUT] [--raw RAW]
[--eta-trips ETA_TRIPS]
[--dispatch-days DISPATCH_DAYS] [--name NAME]
[--tfl TFL]
options:
-h, --help show this help message and exit
--city {london,nicosia,new-york}
--network NETWORK
--out OUT default web/data/<city>
--raw RAW raw OSM download, for rivers
--eta-trips ETA_TRIPS
simulated trips to train the ETA model on (0 to skip;
needs scikit-learn)
--dispatch-days DISPATCH_DAYS
simulated mornings for the dispatch comparison (0 to
skip; needs scikit-learn)
--name NAME
--tfl TFL saved TfL disruptions (from `live --out`)