Experimental
Builds capacity-constrained multi-depot VRPTW routes with heterogeneous fleet settings, break windows, and objective-mode controls.
vector network routing optimization time-window
| Name | Description | Required | Default |
|---|---|---|---|
network | Input line network layer (validated for contract parity). | Required | network.gpkg |
depot_points | Depot point layer; each point can contribute one or more vehicles. | Required | depots.gpkg |
stop_points | Delivery stop point layer with demand and time-window fields. | Required | stops.gpkg |
demand_field | Numeric demand field in stop_points (default: demand). | Optional | demand |
priority_field | Optional stop priority field using values like required/high/normal/low or numeric ranks. | Optional | priority |
allowed_vehicle_profiles_field | Optional stop field listing compatible vehicle profiles (comma/semicolon/pipe-delimited). | Optional | — |
allowed_route_classes_field | Optional alias of allowed_vehicle_profiles_field for route-class compatibility rules. | Optional | — |
tw_start_field | Numeric time-window start field in stop_points (default: tw_start). | Optional | tw_start |
tw_end_field | Numeric time-window end field in stop_points (default: tw_end). | Optional | tw_end |
service_time_field | Numeric per-stop service time field in stop_points (default: service_time). | Optional | service_time |
depot_id_field | Optional depot ID field used in route/assignment outputs. | Optional | — |
vehicle_count_field | Optional depot field for number of vehicles spawned at each depot. | Optional | — |
vehicle_capacity_field | Optional depot field overriding vehicle_capacity per depot/vehicle template. | Optional | — |
vehicle_fixed_cost_field | Optional depot field overriding vehicle_fixed_cost per depot/vehicle template. | Optional | — |
travel_speed_field | Optional depot field overriding travel_speed per depot/vehicle template. | Optional | — |
max_route_distance_field | Optional depot field overriding max_route_distance per depot/vehicle template. | Optional | — |
max_route_time_field | Optional depot field overriding max_route_time per depot/vehicle template. | Optional | — |
vehicle_profile_field | Optional depot field defining vehicle profile/category token used for stop compatibility. | Optional | — |
vehicle_route_class_field | Optional alias of vehicle_profile_field for route-class compatibility rules. | Optional | — |
depot_close_time_field | Optional depot field overriding depot_close_time per depot/vehicle template. | Optional | — |
break_start_field | Optional depot field overriding break_start_time per depot/vehicle template. | Optional | — |
break_end_field | Optional depot field overriding break_end_time per depot/vehicle template. | Optional | — |
break_duration_field | Optional depot field overriding break_duration per depot/vehicle template. | Optional | — |
vehicle_capacity | Per-vehicle capacity (> 0). | Required | 100.0 |
vehicle_fixed_cost | Optional fixed cost charged per dispatched vehicle/route (default: 0). | Optional | 0.0 |
start_time | Route start time in model time units (default: 0). | Optional | 0.0 |
travel_speed | Travel speed in coordinate-units per time unit (default: 1). | Optional | 1.0 |
enforce_time_windows | When true, only stops with lateness <= allowed_lateness are eligible for assignment (default: false). | Optional | False |
allowed_lateness | Maximum lateness tolerated when enforce_time_windows=true (default: 0). | Optional | 0.0 |
depot_close_time | Optional hard close time by which each route must return to depot. | Optional | — |
break_start_time | Optional global break-window start time for all vehicles. | Optional | — |
break_end_time | Optional global break-window end time for all vehicles. | Optional | — |
break_duration | Optional global break duration applied once per route when break window is intersected. | Optional | — |
use_priority_scoring | When true, ranks feasible candidates by projected lateness/slack before travel distance; when false, uses nearest-neighbour baseline (default: true). | Optional | True |
max_vehicles | Optional maximum number of vehicles/routes to construct. | Optional | — |
max_route_distance | Optional maximum route travel distance, including return to depot. | Optional | — |
max_route_time | Optional maximum route duration in model time units, including return to depot. | Optional | — |
max_stops_per_vehicle | Optional maximum number of stops assigned to each vehicle route. | Optional | — |
objective_mode | Route-construction objective: minimize_lateness, minimize_distance, minimize_vehicles, or minimize_cost. | Optional | minimize_lateness |
output | Output route line vector path. | Required | — |
assignment_output | Optional stop assignment point output with time-window diagnostics. | Optional | — |
Builds baseline VRPTW routes and reports time-window diagnostics.
wbe.vehicle_routing_vrptw(allowed_lateness=0.0, demand_field='demand', depot_points='depots.gpkg', enforce_time_windows=False, network='network.gpkg', objective_mode='minimize_lateness', output='vrptw_routes.gpkg', priority_field='priority', service_time_field='service_time', start_time=0.0, stop_points='stops.gpkg', travel_speed=1.0, tw_end_field='tw_end', tw_start_field='tw_start', use_priority_scoring=True, vehicle_capacity=100.0, vehicle_fixed_cost=0.0)