Overview
To create optimized delivery routes, enable route optimization in the "Add-ons" tab of your administrator's dashboard settings.
Onfleet's route optimization algorithm considers hubs, delivery locations, time windows, driver schedules, vehicle capacities, service time, historical traffic data, and road speeds/ restrictions.
In order to utilize Route Optimization you must:
Create a Hub(s)
Assign a Team to the Hub(s)
Optionally, you may:
Setup Task Quantity (see below)
Define Task Service Time (see below)
Auto Create Route Plans
Your organization can select to auto-create route plans after optimizing a route.
Once you have enabled this option, all tasks optimized will automatically be created as a route plan.
Optimization Settings
To provide further flexibility when planning optimal routes, tasks can optionally include individual "Quantity" and "Service Time" values under "Optimization Settings". You must enable route optimization to use the "Service Time" option. While Onfleet does not support an organization-wide Service Time that applies automatically to all tasks, you can specify a global Service Time during the route optimization process. This global setting will apply across the optimized route(s), providing a consistent time allocation for stops when needed.
Maximum Number of Tasks per route is the maximum number of tasks that can be assigned to a driver during one route.
Service Time describes the time a driver is expected to spend at a task's destination. It is crucial for accurate delivery ETAs and efficient route planning. When defined for an individual task, this service time value will override the global service time value defined during the route optimization process.
Maximum allowed delay per task is the maximum amount of time that each task with a Delivery Time Window may be delayed.
Set a task's quantity or service time by double-clicking a task on the sidebar or map and click "Edit". Enter the value into the designated quantity and service time fields, or use the arrows ↑ ↓ on the right to increase/decrease the value. Hit "Save" to apply the changes.
Practical Tips for Using Service Time Effectively
Customize per task: Adjust Service Time based on the specific requirements of each delivery or service stop.
Use global settings strategically: During route optimization, apply a global Service Time to streamline planning for routes with similar stop durations.
Review and adjust: Regularly review Service Time settings to ensure they align with real-world conditions and improve delivery accuracy.
Double-check parameter names: Ensure all parameter names and values in your payload are accurate before submitting a route optimization request.
Test with small batches: Test optimization settings with a small batch of tasks to identify potential issues early.
Note: Units used for task quantities must match the units used for driver capacities. If a task does not have an individual quantity defined, we assume a quantity of zero.
Troubleshooting Common Errors in Route Optimization
Invalid Max Tasks Per Route Error
Error Description: You may receive a "400 Bad Request" error with the message "Invalid Max Tasks Per Route." Cause: This error is often caused by a typo in the payload parameter name. Specifically, the field name "maxTasksPerRoute" (plural) may have been incorrectly entered as "maxTaskPerRoute" (singular). Solution:
Verify the payload parameter name in your route optimization request.
Ensure that the field name is correctly set to "maxTasksPerRoute."
Correcting this typo should resolve the error and allow the optimization request to proceed successfully.
Task Assignment Error Due to Vehicle Capacity Settings
Error Description: An error may occur when optimizing a small number of tasks, particularly if no tasks are assigned to any vehicle. Cause: This issue arises when the vehicle's optimization settings have a capacity value that is too low or set to zero. If the capacity cannot accommodate the tasks' requirements, the optimizer will fail to assign tasks. Solution:
Review the vehicle optimization settings in your configuration.
Check the "capacity" field and ensure it is set to a value that can handle the tasks' requirements.
Adjust the capacity as needed and re-run the optimization process.
