solve_vehicle_routing_problem
Solve the vehicle routing problem to optimize routes for multiple vehicles. Define locations, vehicles, depot, and optional distance or time matrices to find efficient routes under capacity constraints.
Instructions
Solve Vehicle Routing Problem (VRP) to optimize routes for multiple vehicles.
Args:
locations: List of location dictionaries with name, coordinates, and demand
vehicles: List of vehicle dictionaries with capacity constraints
distance_matrix: Optional pre-calculated distance matrix
time_matrix: Optional pre-calculated time matrix
depot: Index of depot location (default: 0)
time_limit_seconds: Maximum solving time in seconds (default: 30.0)
Returns:
Optimization result with routes for all vehicles
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| locations | Yes | ||
| vehicles | Yes | ||
| distance_matrix | No | ||
| time_matrix | No | ||
| depot | No | ||
| time_limit_seconds | No |