> ## Documentation Index
> Fetch the complete documentation index at: https://help.bodharouteplanner.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Route Optimization

> How Bodha Route Planner optimizes routes, and every setting you can configure to get better results.

## How optimization works

When you click **Optimize**, Bodha Route Planner sends your stops, depot, driver details, and constraints to its optimization engine. The engine solves a Vehicle Routing Problem (VRP) to find the fastest sequence that respects all your constraints — drive time, time windows, shift hours, capacity, and more.

The result is an optimized stop order for each driver, with estimated arrival times (ETAs) at every stop and a total route distance and duration.

## Step-by-step: Optimizing a route

1. **Add stops** to your route (paste, import, or manually).
2. **Assign drivers** — select one or more drivers for the route.
3. **Review settings** — check your optimization preferences (see below).
4. Click **Optimize**.
5. **Review the result** — stops are reordered on the map and in the list. ETAs appear next to each stop.
6. If satisfied, click **Dispatch** to send the route to drivers.

> [!TIP]
>
> You can re-optimize at any time — even after dispatching. Add or remove stops, then click **Optimize** again. Bodha Route Planner recalculates the best sequence with the updated stop list.

***

## Optimization settings

Go to **Settings → Route Planning** to configure your defaults. These settings apply to every new route unless overridden per route.

Settings are organized into sections:

***

### How each route is built

These settings control how the optimizer plans individual routes — what it prioritizes, how stops are ordered, and what roads to use.

#### Optimize by

Choose what the optimizer prioritizes when calculating routes:

| Option | What it does | When to use |
| - | - | - |
| **Fastest time** *(recommended)* | Minimizes total driving time across all drivers. Routes may take longer roads (like highways) if they're faster. | Best for most delivery operations where getting done sooner matters more than fuel. |
| **Shortest distance** | Minimizes total kilometers or miles driven. Routes may take slower roads if they're shorter. | Best when fuel cost is your primary concern, or when you're paid per mile/km. |

> [!TIP]
>
> **Fastest time** is the default and works best for most teams. It usually produces routes that finish earlier in the day, even if the total distance is slightly longer. Switch to **Shortest distance** only if you have a specific reason to minimize mileage.

#### Arrange deliveries & pickups

If your stops include both deliveries and pickups, this setting controls the order:

| Option | What it does | When to use |
| - | - | - |
| **Best per optimization** *(recommended)* | The optimizer decides the best mix of deliveries and pickups based on geography, time windows, and efficiency. | Most flexible — use this unless you have a specific operational requirement. |
| **Deliveries first** | All delivery stops are completed before any pickups begin. | Best when you load the vehicle at the depot, deliver everything, then collect returns or pickups on the way back. |
| **Pickups first** | All pickup stops are completed before deliveries begin. | Best for collection-heavy operations where you need to pick up items before delivering them elsewhere. |

#### Default service time

The number of minutes a driver spends at each stop — parking, walking to the door, handing over packages, collecting signatures, taking photos, etc.

* Set a **default for all stops** (for example, 5 minutes)
* You can **override per individual stop** when adding or editing it
* Accurate service times lead to more realistic ETAs and better route plans

> [!TIP]
>
> Start with your average service time and adjust based on experience. If drivers consistently finish routes later than estimated, increase the service time. If they finish early, decrease it. Even a 1-minute difference per stop adds up significantly over 50+ stops.

#### Working days

Choose which days of the week your operation runs. By default, Monday through Friday are selected.

* Click any day to toggle it on or off
* This affects **Multi-Day Planning** — the planner only schedules stops on working days
* If your operation runs 7 days a week, enable all days
* If you're closed on specific days (e.g. Sunday), keep those toggled off

> [!NOTE]
>
> Working days are a tenant-wide default. Individual routes can still be created on any day — this setting mainly affects how the multi-day planner distributes work across the week.

#### Avoid road types (advanced routing)

Tell the optimizer to avoid certain road types when calculating routes. You can enable multiple options at the same time.

| Option | What it does | When to use |
| - | - | - |
| **Avoid highways** | Routes will not use motorways, interstates, or major highways. | Local delivery vehicles that should stay on surface streets. Also useful for vehicles with speed restrictions. |
| **Avoid ferries** | Routes will not include any ferry crossings. | When your vehicles can't use ferries, or when ferry schedules would make timing unpredictable. |
| **Avoid tunnels** | Routes will not go through tunnels. | Required for oversized vehicles, vehicles carrying hazardous materials, or any vehicle restricted from tunnel use. |

> [!WARNING]
>
> Enabling road avoidances can significantly increase route times and distances — especially "Avoid highways" in areas where the highway is the only practical connection between locations. Test with a sample route before applying to your full fleet.

#### Curbside routing

Controls which side of the street the driver approaches each stop from. This prevents drivers from having to cross traffic to reach a delivery address.

| Option | What it does | When to use |
| - | - | - |
| **Auto** *(default)* | The optimizer chooses the best approach side for each stop based on the overall route efficiency. | Use this if curbside preference isn't important to your operation. |
| **Right-hand side** | The driver always approaches stops from the right side of the road. | Best for right-hand traffic countries (US, most of Europe, etc.) where stopping on the right avoids crossing traffic. |
| **Left-hand side** | The driver always approaches stops from the left side of the road. | Best for left-hand traffic countries (UK, Australia, Japan, India, etc.). |

> [!NOTE]
>
> Curbside routing is available on the **Pro** plan.

***

### How work is split across drivers

When a route has **multiple drivers**, the optimizer needs to decide how to distribute stops among them. This is one of the most impactful settings for fleet operations.

#### Workload preference

| Strategy | What it does | Best when... |
| - | - | - |
| **Balance workload & efficiency** *(recommended)* | Distributes stops fairly across drivers while still optimizing for speed. No driver is overloaded while another has almost nothing. | You want drivers to share the load without wasting time. This is the right choice for most teams. |
| **Equalize workload** | Distributes stops as evenly as possible, even if it means slightly longer total route times. Every driver gets roughly the same number of stops. | Fair distribution matters more than raw speed — for example, when drivers are paid per stop or when you want everyone finishing at roughly the same time. |
| **Maximize efficiency** | Minimizes total fleet driving time. One driver may get significantly more stops than another if that's the fastest overall plan. | Total fleet speed matters and uneven loads are acceptable — for example, when you're trying to complete all deliveries as early as possible regardless of individual driver workload. |
| **Minimize drivers** | Fills up each driver's schedule completely before assigning stops to the next driver. Uses as few drivers as possible. | You'd rather run fewer vehicles — for example, to reduce fuel costs, or when some drivers are on standby and you want to avoid activating them unless needed. |
| **Assign to selected only** | Uses only the drivers you've manually selected for this route. No additional drivers are pulled in. | You've already decided which drivers should handle this route and don't want the optimizer choosing others. |

> [!TIP]
>
> **Balance workload & efficiency** works well for 90% of operations. Switch to another strategy only when you have a specific reason — and remember, you can change this per route without affecting your global default.

***

### Vehicle capacity (Pro plan)

Set limits on what each vehicle can carry. The optimizer ensures no vehicle is overloaded during planning.

#### Capacity mode

| Mode | What it does | When to use |
| - | - | - |
| **Off** | No capacity checks. Stops are assigned based on time and distance only. | When vehicle capacity isn't a concern (e.g. documents, small packages). |
| **Show load** *(recommended)* | The route shows how full each vehicle is, but doesn't enforce limits. Stops are still assigned freely. | When you want visibility into vehicle loads — helpful for dispatchers to spot potential overloads — without hard constraints that might leave stops unassigned. |
| **Fit to capacity** | The optimizer strictly respects capacity limits. Any stop that would exceed a vehicle's capacity is left **unassigned** instead. | When overloading is not an option — for example, weight-restricted vehicles, refrigerated vans with fixed shelf space, or courier bikes with a parcel limit. |

#### Capacity dimensions

You can set limits on up to **three dimensions** at the same time:

| Dimension | What it measures | Example |
| - | - | - |
| **Weight** | Total weight the vehicle can carry | 1,000 kg per van, 5,000 kg per truck |
| **Volume** | Total volume (cubic space) available | 12 cubic meters per van |
| **Parcel count** | Number of individual parcels or packages | 80 parcels per vehicle |

**How it works:**

1. **Set a fleet default** — Under vehicle capacity, enter the default capacity for your fleet (e.g. 100 parcels). This applies to all drivers unless overridden.
2. **Override per driver** — If some vehicles have different capacities, set individual limits on each driver's profile.
3. **Set demand per stop** — Each stop can specify its demand (weight, volume, parcel count) during import or on the stop detail page.
4. The optimizer adds up the demand of all stops assigned to a vehicle and ensures it stays within limits.

> [!WARNING]
>
> **90% fill factor:** The optimizer uses a 90% fill factor internally. A vehicle with a max capacity of 100 parcels will effectively hold 90 parcels. This accounts for real-world loading inefficiencies (odd-shaped packages, wasted space, etc.). If stops are being left unassigned unexpectedly, check that your capacity isn't set too tight.

> [!TIP]
>
> Start with **Show load** mode to see how your vehicles are being utilized. Once you're confident in your capacity numbers, switch to **Fit to capacity** for automatic enforcement.

***

### Overnight haul planning (Pro plan)

For multi-day trips where a driver stays out on the road — long-haul trucking, multi-day service routes, regional delivery circuits. See the dedicated [Multi-Day & Haul Planning](https://help.bodharouteplanner.com/help/multi-day-planning.md) article for full details.

In **Settings → Route Planning**, you can enable haul planning globally and configure:

| Setting | Options | What it does |
| - | - | - |
| **Enable overnight haul** | On / Off | Makes the haul planning option available when creating multi-day plans. |
| **Firm days** | 1 / **2** *(recommended)* / 3 | How many days at the start of a haul are locked in. The optimizer won't move stops out of firm days when re-planning. |
| **Notify policy** | **Auto** *(recommended)* / Review date changes / Manual | How drivers are notified when the plan changes. "Auto" sends updates immediately. "Review" lets you approve date changes before drivers see them. "Manual" requires you to dispatch each change. |

***

### Shift hours (driver working hours)

Set the start and end time for your drivers' working day:

* **Shift start** — When drivers begin (e.g. 8:00 AM)
* **Shift end** — When drivers must finish (e.g. 5:00 PM)

The optimizer will not schedule stops outside shift hours. If all stops can't fit within the shift, some stops will be marked as **unassigned**.

You can set default shift hours at the **depot level**, then override per individual driver in their profile.

### Return to depot

| Setting | What it does |
| - | - |
| **Enabled** | Routes end back at the depot. The return drive time counts toward the shift, so the driver must finish their last stop early enough to drive back. |
| **Disabled** | Routes end at the last stop. The driver finishes wherever their last delivery is. Use this if drivers go home from their last stop rather than returning to base. |

### Driver breaks

Schedule a mandatory break during each driver's day. Breaks are configured with a **tri-state** system:

| Option | What it does |
| - | - |
| **Inherit from depot** | The driver uses whatever break schedule is set on their depot. This is the default — change the depot break and all drivers at that depot update automatically. |
| **Custom break** | Set a specific break for this driver. Configure: **Break window** (the time range the break must start, e.g. 12:00 PM – 1:00 PM) and **Break duration** (how long, e.g. 30 minutes). |
| **No break** | This driver doesn't take a scheduled break. |

The optimizer fits the break into the route at the best time within the break window, without violating time windows or causing late arrivals at subsequent stops.

> [!NOTE]
>
> Driver breaks are available on **all plans**. You can set breaks at the depot level, per driver, or per route.

***

## Time windows (Pro plan)

Time windows specify when a customer expects their delivery:

* Set per stop: **Earliest arrival** and **Latest arrival** (e.g. 9:00 AM – 12:00 PM)
* The optimizer ensures the driver arrives within the window
* If a time window can't be met, the stop may be marked as **unassigned** with the reason "Time window conflict"

### Tips for time windows

* **Use wide windows** (4-hour ranges or more) for better optimization. Narrow windows severely constrain the optimizer and may cause more stops to be unassigned.
* **Only set windows on stops that need them.** Leave them blank for flexible deliveries. Fewer constrained stops = better optimization results.
* **Format carefully:** Use the format "09:00" (with leading zero), not "9:00". The optimizer may drop incorrectly formatted time windows.

***

## Understanding optimization results

After optimization completes, review the results:

### Route map

* Each driver's route is shown in a different color
* Stops are numbered in their optimized sequence
* The depot is marked as the start (and end, if return-to-depot is enabled)

### Stats bar

| Metric | What it shows |
| - | - |
| **Total stops** | How many stops were assigned across all drivers |
| **Total distance** | Combined driving distance |
| **Total drive time** | Combined driving time |
| **Estimated finish** | When the last driver is expected to complete |

### Unassigned stops

If some stops couldn't be assigned, they appear in the **Unassigned** list with a reason code. Here's what each reason means and how to fix it:

| Reason | What it means | What to do |
| - | - | - |
| **Time window conflict** | The stop's time window can't be reached given other constraints and the route sequence. | Widen the time window, remove the window entirely, or add another driver. |
| **Capacity exceeded** | Adding this stop would overload the vehicle beyond its weight, volume, or parcel limit. | Reduce the stop's demand, increase vehicle capacity, or add another driver. |
| **Shift too short** | The driver doesn't have enough working hours left to reach this stop and complete it. | Extend shift hours, start the shift earlier, or add another driver. |
| **Unreachable** | The address couldn't be routed to — for example, an island without road access or an invalid geocode. | Check the address. Re-geocode the stop. Make sure it's a real, road-accessible location. |
| **Max distance exceeded** | The stop is too far from the depot or other stops to fit within distance constraints. | Check the address for errors. If correct, consider whether this stop belongs on a separate route. |
| **Vehicle type mismatch** | The stop requires a vehicle type that none of the assigned drivers have. | Assign a driver with the correct vehicle type, or remove the vehicle requirement from the stop. |
| **Skill mismatch** | The stop requires a driver skill (e.g. hazmat certification) that no assigned driver has. | Assign a qualified driver, or remove the skill requirement. |

> [!TIP]
>
> If many stops are unassigned, the most common fixes are: **add another driver**, **extend shift hours**, or **widen time windows**. Start with whichever constraint is most restrictive.

***

## Re-optimization

You can re-optimize a route at any time:

* **Before dispatch** — Add, remove, or edit stops, then click **Optimize** again.
* **After dispatch** — Add a late-breaking stop, click **Optimize**, and re-dispatch. Drivers receive the updated route on their app.

Re-optimization recalculates the entire route from scratch with the current stop list. It does not preserve the previous sequence — every stop is repositioned for the best result.

***

## Optimization FAQ

> **How long does optimization take?**
>
> Typically 5–30 seconds depending on the number of stops and drivers. Large routes (200+ stops, 10+ drivers) may take up to a minute. The progress indicator shows when the engine is working.

> **Can I manually reorder stops after optimization?**
>
> Yes. After optimization, you can drag stops to reorder them manually. This overrides the optimized sequence for those stops. If you re-optimize, manual changes are recalculated.

> **Does optimization use real-time traffic?**
>
> The optimization engine uses historical and typical drive time data for road segments, not live traffic. This means routes are planned based on average conditions for the time of day. During active routes, live GPS data from drivers improves ETA accuracy for remaining stops.

> **Why are some stops left unassigned?**
>
> Stops are left unassigned when they can't fit within the given constraints — time windows, shift hours, capacity, or road network limitations. See the [unassigned reasons table](#understanding-optimization-results) above for specific causes and fixes.

> **Can I lock a stop's position in the sequence?**
>
> You can set a stop as the first or last stop in the sequence. For full control over stop order, use manual reordering after optimization or the "keep order" option.

> **What's the difference between 'Optimize by time' and 'Optimize by distance'?**
>
> **Fastest time** may route a driver onto a highway even if it's a longer distance, because it's faster. **Shortest distance** may route a driver through city streets because the path is shorter, even if it takes longer due to traffic lights and slower speeds. For most delivery operations, time optimization produces better results because it gets drivers done sooner.

> **How does capacity enforcement work with mixed load sizes?**
>
> Each stop specifies its demand (weight, volume, parcels). The optimizer adds up demand as it assigns stops to a vehicle. When a stop would push any dimension past the vehicle's limit (accounting for the 90% fill factor), that stop is left unassigned. The optimizer tries different combinations to fit as many stops as possible.

> **Can different drivers have different settings?**
>
> Yes. While optimization settings are set globally in **Settings → Route Planning**, several settings can be overridden per driver: shift hours, break schedule, vehicle capacity, and vehicle type. Per-driver overrides take effect whenever that driver is included in a route.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.