Multi Vehicle Route Optimization Blueprint
Distribute tasks across a heterogeneous fleet, building one ordered route per vehicle that collectively covers all assignable tasks while minimising total fleet cost.
| Feature | multi-vehicle-route-optimization |
| Category | Workflow |
| Version | 1.0.0 |
| Tags | fleet-management, route-optimization, multi-vehicle, logistics |
| YAML Source | View on GitHub |
| JSON API | multi-vehicle-route-optimization.json |
Actors
| ID | Name | Type | Description |
|---|---|---|---|
fleet_manager | Fleet Manager | human | Defines the fleet and the set of tasks to complete |
dispatcher | Dispatcher | human | Reviews and adjusts generated routes before dispatch |
optimization_engine | Optimization Engine | system | Constructs and refines routes across all vehicles concurrently |
Fields
| Name | Type | Required | Label | Description |
|---|---|---|---|---|
vehicle_id | number | Yes | Vehicle ID | |
vehicle_start | json | No | Start Location | |
vehicle_end | json | No | End Location | |
vehicle_description | text | No | Vehicle Description | |
vehicle_type | text | No | Vehicle Type | |
max_tasks | number | No | Max Tasks | |
max_travel_time | number | No | Max Travel Time (s) | |
max_distance | number | No | Max Distance (m) | |
speed_factor | number | No | Speed Factor |
States
State field: fleet_route_status
Values:
| State | Initial | Terminal |
|---|---|---|
unoptimized | Yes | |
optimizing | ||
optimized | Yes |
Transitions:
| Name | From | To | Actor | Condition |
|---|---|---|---|---|
unoptimized | optimizing | fleet_manager | ||
optimizing | optimized | optimization_engine |
Rules
- one_route_per_vehicle: Each vehicle produces at most one route; a vehicle may be unused if no tasks are assigned.
- vehicle_sort_order: Vehicles are sorted by decreasing max_tasks, capacity, time-window length, and range bounds before heuristic construction.
- heterogeneous_cost_search: When the fleet has heterogeneous costs, both availability-sorted and cost-sorted orderings are tried and the better result kept.
- route_feasibility: A route is valid only if it respects capacity, skill, time-window, max_tasks, max_travel_time, and max_distance for every step.
- unassigned_not_error: Unassigned tasks are reported in the solution; they do not cause an error.
- open_trip: If only start or only end is specified the route is an open trip; the free endpoint is placed at the first or last task.
- round_trip: A round trip is formed by setting start and end to the same location.
- parallel_search: Parallel threads run independent search paths; the path with the lowest lexicographic cost indicator is selected.
Outcomes
Single_vehicle_tsp (Priority: 5)
Given:
- only one vehicle is defined or has compatible skills for all tasks
Then:
- emit_event event:
fleet.routes.optimized
Result: Solution degenerates to TSP; one route returned for the single vehicle.
Partial_assignment (Priority: 7)
Given:
- some tasks cannot be assigned due to capacity, skill, or range limits
Then:
- emit_event event:
fleet.routes.optimized - transition_state field:
fleet_route_statusfrom:optimizingto:optimized
Result: Optimised routes returned with unassigned list.
All_tasks_assigned (Priority: 10)
Given:
- fleet has sufficient capacity and compatible skills for all jobs
- all time windows and range constraints are satisfiable
Then:
- emit_event event:
fleet.routes.optimized - transition_state field:
fleet_route_statusfrom:optimizingto:optimized
Result: Every task assigned; summary reports zero unassigned, total cost, duration, and distance.
Errors
| Code | Status | Message | Retry |
|---|---|---|---|
FLEET_NO_VEHICLES | 400 | No vehicles defined in the problem. | No |
FLEET_NO_TASKS | 400 | No jobs or shipments defined in the problem. | No |
Events
| Event | Description | Payload |
|---|---|---|
fleet.routes.optimized | Multi-vehicle route optimization completed | vehicle_routes, unassigned_tasks, summary |
Related Blueprints
| Feature | Relationship | Reason |
|---|---|---|
| vrp-solving | required | |
| vehicle-capacity-constraints | optional | |
| time-window-constraints | optional | |
| skill-based-assignment | optional | |
| cost-based-route-optimization | optional | |
| routing-profile-selection | optional | |
| distance-matrix-calculation | recommended |
AGI Readiness
Goals
Reliable Multi Vehicle Route Optimization
Distribute tasks across a heterogeneous fleet, building one ordered route per vehicle that collectively covers all assignable tasks while minimising total fleet cost.
Success Metrics:
| Metric | Target | Measurement |
|---|---|---|
| processing_time | < 5s | Time from request to completion |
| success_rate | >= 99% | Successful operations divided by total attempts |
Constraints:
- performance (negotiable): Must not block dependent workflows
Autonomy
Level: semi_autonomous
Human Checkpoints:
- before transitioning to a terminal state
Escalation Triggers:
error_rate > 5
Tradeoffs
| Prefer | Over | Reason |
|---|---|---|
| reliability | speed | workflow steps must complete correctly before proceeding |
Coordination
Protocol: orchestrated
Consumes:
| Capability | From | Fallback |
|---|---|---|
vrp_solving | vrp-solving | degrade |
Safety
| Action | Permission | Cooldown | Max Auto |
|---|---|---|---|
| all_tasks_assigned | autonomous | - | - |
| partial_assignment | autonomous | - | - |
| single_vehicle_tsp | autonomous | - | - |