[Step 3/5] Generate trip demand (trips.xml) for SUMO simulation.
Creates origin-destination trip definitions. This tool ONLY generates trips —
route assignment is done separately by route_generate().
Previous step: net_convert() to get .net.xml file.
Next step: route_generate() to assign routes to trips.
=== THREE MODES ===
1. RandomOD — Random trip generation:
- trip_type: "RandomOD"
- traffic_condition (REQUIRED): "light" | "medium" | "heavy"
* light: ~20% of edge count (rural, off-peak)
* medium: ~80% of edge count (typical urban)
* heavy: ~150% of edge count (rush hour, dense urban)
2. RealOD-coordinate — Real OD from coordinate CSV:
- trip_type: "RealOD", od_type: "coordinate"
- od_data_file: Path to CSV file
- Default columns: O_lon, O_lat, D_lon, D_lat, O_time_relative
- Use column_mapping if your CSV has different column names
3. RealOD-zone — Real OD from zone CSV + shapefile:
- trip_type: "RealOD", od_type: "zone"
- od_data_file: Path to OD CSV file
- zone_shp_file: Path to zone shapefile (.shp)
- Default columns: h3_lv9_O, h3_lv9_D, O_time_relative
- Default shapefile ID column: h3_indx
- Use column_mapping to override any of these
=== COLUMN MAPPING ===
For non-standard CSV files, provide column_mapping to map standard names to actual column names.
Coordinate mode mapping keys:
"O_lon", "O_lat", "D_lon", "D_lat", "O_time_relative"
Zone mode mapping keys:
"zone_O", "zone_D", "O_time_relative", "zone_id_column"
Example: {"O_lon": "pickup_lng", "O_lat": "pickup_lat", "D_lon": "dropoff_lng", "D_lat": "dropoff_lat", "O_time_relative": "start_sec"}
=== RETURNS ===
- trip_file: Path to generated .trips.xml file (pass to route_generate)
- trip_count: Number of trips generated