walk_scenario_close: Simulate Street Closure or Pedestrianization Intervention...

View source: R/scenarios.R

walk_scenario_closeR Documentation

Simulate Street Closure or Pedestrianization Intervention Scenario

Description

Creates an independent copy of a walkable street network with specified street segments (edges) or junctions (nodes) removed (simulating street cuts, construction, or pedestrianization). Reconstructs Compressed Sparse Row topology and component connectivity using compiled Rust.

Usage

walk_scenario_close(
  network,
  edge_indices = NULL,
  node_indices = NULL,
  name = "scenario_closure"
)

Arguments

network

A walk_network object produced by walk_build_network().

edge_indices

Integer vector of edge row indices to remove (1-indexed).

node_indices

Optional integer vector of node indices whose attached edges will be removed.

name

Descriptive character label for this intervention scenario.

Value

A new walk_network S3 object representing the modified scenario, with metadata storing the closed edges.

Examples

data(streets_cusco)
net <- walk_build_network(streets_cusco, verbose = FALSE)
cierre <- walk_scenario_close(net, edge_indices = c(5, 12), name = "Peatonalizacion Central")
print(cierre)

walkability documentation built on Nov. 17, 2026, 5:09 p.m.