iduedu.apply_urban_graph_changes

iduedu.apply_urban_graph_changes(graph_gdf, changes)[source]

Apply prepared changes to an UrbanGraph.

The function removes edges listed in changes.edges_to_delete, sets the values of changes.edges_to_update, appends new nodes and edges, and returns a new graph. The new graph has no cached adjacency matrix; routing builds it on the first query.

Parameters:
Return type:

UrbanGraph

Returns:

New UrbanGraph with changes applied.

Raises:

ValueError – If graph and change topology flags differ, if edges_to_delete or edges_to_update reference edges that are absent from the graph, or if an edge is both deleted and updated.