Hypraptor¶
Module contains HypRAPTOR implementation
-
Algorithms.RAPTOR.hypraptor.
hypraptor
(SOURCE: int, DESTINATION: int, D_TIME, MAX_TRANSFER: int, WALKING_FROM_SOURCE: int, CHANGE_TIME_SEC: int, PRINT_ITINERARY: int, stop_out: dict, route_groups: dict, routes_by_stop_dict: dict, stops_dict: dict, stoptimes_dict: dict, footpath_dict: dict, idx_by_route_stop_dict: dict) → list[source]¶ Standard HypRaptor implementation
- Parameters
SOURCE (int) – stop id of source stop.
DESTINATION (int) – stop id of destination stop.
D_TIME (pandas.datetime) – departure time.
MAX_TRANSFER (int) – maximum transfer limit.
WALKING_FROM_SOURCE (int) – 1 or 0. 1 means walking from SOURCE is allowed.
CHANGE_TIME_SEC (int) – change-time in seconds.
PRINT_ITINERARY (int) – 1 or 0. 1 means print complete path.
stop_out (dict) – key: stop-id (int), value: stop-cell id of key (int). Note: stop-cell id=-1 denotes cut stop.
route_groups (dict) – key: tuple of all possible combinations of stop cell id, value: set of route ids belonging to the stop cell combination.
routes_by_stop_dict (dict) – preprocessed dict. Format {stop_id: [id of routes passing through stop]}.
stops_dict (dict) – preprocessed dict. Format {route_id: [ids of stops in the route]}.
stoptimes_dict (dict) – preprocessed dict. Format {route_id: [[trip_1], [trip_2]]}.
footpath_dict (dict) – preprocessed dict. Format {from_stop_id: [(to_stop_id, footpath_time)]}.
idx_by_route_stop_dict (dict) – preprocessed dict. Format {(route id, stop id): stop index in route}.
- Returns
list of pareto-optimal arrival Timestamps.
- Return type
out (list)
Examples
>>> output = hypraptor(36, 52, pd.to_datetime('2019-06-10 00:00:00'), 4, 1, 0, 1, stop_out, route_groups, routes_by_stop_dict, stops_dict, stoptimes_dict, footpath_dict, idx_by_route_stop_dict)
See also
HypTBTR, RAPTOR