iduedu.dijkstra_path_length_parallel¶
- iduedu.dijkstra_path_length_parallel(urban_graph, *, source_nodes=None, gdf_sources=None, graph_node_column='graph_node_id', weight='time_min', cutoff=None, reverse=False, dtype=<class 'numpy.float32'>, max_workers=None)[source]¶
Run independent Dijkstra searches for each source.
Unlike
multi_source_dijkstra_path_length(), sources are not merged into one queue. The result contains one sparse row per source object or source node, which makes this helper suitable for per-origin isochrone calculations.- Parameters:
urban_graph (
UrbanGraph) – Urban graph with node and edge tables.source_nodes (
Optional[Iterable[Any]]) – Source node ids. Pass either this argument orgdf_sources.gdf_sources (
DataFrame|None) – DataFrame or GeoDataFrame with source objects.graph_node_column (
str) – Column containing graph node ids ingdf_sources.weight (
Literal['length_meter','time_min']) – Edge weight column.reverse (
bool) – IfTrueand the graph is directed, run on the reversed adjacency matrix.dtype (
dtype) – Floating dtype for returned sparse values.max_workers (
int|None) – Optional number of numba worker threads.
- Return type:
- Returns:
Sparse
DataFramewhose rows are source objects and whose columns are reachable graph node ids. The normalized source mapping is stored inresult.attrs["source_nodes"].