route_generate
Assigns shortest-path routes to trips using the road network, converting trip files into route files required for SUMO simulation.
Instructions
[Step 4/5] Generate routes from trips using SUMO's duarouter.
Assigns shortest-path routes to each trip based on the road network.
Converts trips.xml → routes.rou.xml which is required for simulation.
Previous step: trip_generate() to get .trips.xml file.
Next step: sumo_runner() to run the simulation with net_file and route_file.
=== PARAMETERS ===
- net_file (REQUIRED): Path to SUMO network file (.net.xml, from net_convert)
- trip_file (REQUIRED): Path to trip file (.trips.xml, from trip_generate)
=== RETURNS ===
- route_file: Path to generated .rou.xml file (pass to sumo_runner)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"net_file": "<net_file>",
"trip_file": "<trip_file>"
},
"name": "route_generate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net_file | Yes | ||
| trip_file | Yes | ||
| output_dir | No | output/trips |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |