iduedu.multi_source_dijkstra

iduedu.multi_source_dijkstra(urban_graph, *, source_nodes=None, gdf_sources=None, graph_node_column='graph_node_id', target_nodes=None, weight='time_min', cutoff=None, reverse=False, output='both', path_storage='eager', dtype=<class 'numpy.float32'>, distance_format='frame')[source]

Search from the nearest member of one combined source set.

Options and Series results follow single_source_dijkstra. Supply either source_nodes or gdf_sources; geometries without graph_node_column are matched to nearest graph nodes. A combined result also exposes nearest_sources as a pandas Series in distance order, with target node labels in every format and None for unreachable targets. Ties choose the source appearing first in graph node order. This differs from dijkstra_parallel, which runs an independent search for each source.

With output="distances" or "both", distance_format="dense" uses a one-dimensional NumPy array with np.inf for unreachable or out-of-cutoff nodes. With target_nodes=None, it covers all nodes in nodes_gdf order. The default "frame" returns a Series. "sparse" is available only for matrix results.

Return type:

Series | ShortestPathResult | ndarray

Parameters: