ferrobus.parallel_detailed_journeys

ferrobus.parallel_detailed_journeys#

ferrobus.parallel_detailed_journeys(transit_model, start_point, end_points, departure_time, max_transfers=3)#

Find detailed journeys from one point to multiple destinations in parallel

Calculates detailed multimodal routes from a single origin to many destinations, returning each successful journey as a GeoJSON string. Computation is parallelized across destinations while preserving the input order in the returned list.

Parameters:
  • transit_model (TransitModel) – The transit model to use for routing.

  • start_point (TransitPoint) – Starting location for all journeys.

  • end_points (list[TransitPoint]) – Destination locations for which detailed journeys should be computed.

  • departure_time (int) – Time of departure in seconds since midnight.

  • max_transfers (int, default=3) – Maximum number of transfers allowed in route planning.

Returns:

A list with the same length and order as end_points. Each element is either: - a GeoJSON string for a reachable destination, or - None if no route is found.

Return type:

list[str or None]

Raises:

RuntimeError – If routing or GeoJSON conversion fails.

Notes

This function releases the Python GIL during computation