edge_edit_tool
Delete road segments from a SUMO network file. Specify a road name and optionally a location with radius to close a partial section. Requires subsequent trip and route regeneration.
Instructions
Delete specific road segments from the network file.
⚠️🚨 CRITICAL: After using this tool, you MUST regenerate trips and routes!
Route files contain explicit edge lists - if those edges are deleted, the route file becomes INVALID!
Workflow: edge_edit → trip_generate → route_generate → sumo_runner (REQUIRED!)
🌟 REALISTIC USAGE: Specify reference_location + radius_km for partial road closure!
Three modes (priority order):
1. edge_ids: Delete exact edges (most precise, but requires knowing edge IDs)
2. target_road_name + reference_location + radius_km: Delete road segments near a location (REALISTIC!)
3. target_road_name only: Delete entire road (extreme scenario, use with caution!)
Examples:
# REALISTIC: Block 300m of Teheran-ro near Gangnam Station (construction scenario)
edge_edit_tool(
net_file="gangnam_station.net.xml",
target_road_name="테헤란로",
reference_location="강남역",
radius_km=0.3
)
# Then: trip_generate → sumo_runner (MUST regenerate trip!)
# EXTREME: Block entire Teheran-ro (unrealistic!)
edge_edit_tool(
net_file="gangnam_station.net.xml",
target_road_name="테헤란로"
)
# Then: trip_generate → sumo_runner (MUST regenerate trip!)
Args:
net_file: Network file path
route_file: Route file path (optional, but will be invalidated after edge deletion)
output_dir: Output directory for results
target_road_name: Road name to delete from network (e.g., '테헤란로')
edge_ids: Specific edge IDs to delete (list, optional)
reference_location: Reference point for partial deletion (str, optional, e.g., "강남역")
radius_km: Radius in km around reference (float, optional, e.g., 0.3)
Returns:
Dict with status, net_file, and requires_reroute=True (indicating trip regeneration needed)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edge_ids | No | ||
| net_file | Yes | ||
| radius_km | No | ||
| output_dir | No | output/networks | |
| route_file | No | ||
| target_road_name | No | ||
| reference_location | No |