route_analysis_tool
Find the shortest or fastest route between two locations on a road network. Compare routes across different networks to assess changes.
Instructions
Analyze the optimal route between two locations in the network.
Accepts place names (e.g., "강남역", "Gangnam Station") or road names (e.g., "테헤란로").
TWO ROUTING MODES:
1. "distance" (default): Shortest path by edge length. Works without simulation data.
2. "traveltime": Optimal path using actual simulation results (edgedata XML) as edge weights.
Requires weight_file (edgedata XML from a previous simulation).
Can also use other attributes: "density", "CO2_abs", etc.
Use cases:
- "What is the shortest path from Gangnam Station to Samseong Station?" -> routing_mode="distance"
- "What is the optimal path based on actual travel time?" -> routing_mode="traveltime", weight_file=edgedata.xml
- "What is the lowest-CO2 path?" -> routing_mode="traveltime", weight_attribute="CO2_abs"
- "How does the path change after a road closure?" -> compare_net_file + compare_weight_file
In web mode, use [SHOW_ROUTE:edges|color|net_file_name] marker to visualize the result.
Always include net_file_name from the result so routes render on the correct network.
Args:
net_file: Network file path
origin: Origin location (place name, landmark, or road name)
destination: Destination location (place name, landmark, or road name)
routing_mode: "distance" (default, edge length) or "traveltime" (simulation-weighted)
weight_file: Edgedata XML file for weighted routing (required when routing_mode="traveltime").
Use the netstate/edgedata file from simulation output.
weight_attribute: Attribute to use as edge weight (default: "traveltime").
Other options: "density", "CO2_abs", "fuel_abs", etc.
compare_net_file: Optional second network for before/after route comparison
compare_weight_file: Optional edgedata for the comparison network
Returns:
Dict with route edges, distance, time, road names.
If comparison provided, includes both routes and diff.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origin | Yes | ||
| net_file | Yes | ||
| destination | Yes | ||
| weight_file | No | ||
| routing_mode | No | distance | |
| compare_net_file | No | ||
| weight_attribute | No | traveltime | |
| compare_weight_file | No |