Optimisation, Optimisation Settings & Constraints
For a planner who wants to know how Tarot plans Runs, and for whoever sets up optimisation for your organisation. This page explains what happens when you click Let's route!, the settings that shape the result, and the constraints every Run has to respect.
How optimisation works
When you click Let's route!, Tarot sends the Scenario's Jobs and Active Drivers to the Route Optimisation API. The Algorithm evaluates millions of possible route plans and keeps the best one it finds that respects every constraint.
"Best" means the lowest total time, unless your organisation has chosen distance or cost as its Optimisation Objective (see Optimisation Settings below). Any Jobs the Algorithm can't fit without breaking a constraint are left as Unserved Jobs.
How long it takes
As a guide, allow 0.5 to 1 second per Job, so 60 Jobs take between 30 and 60 seconds. While the Algorithm works, the Let's route! button shows an estimated time.
The Algorithm stops when one of these happens:
- it reaches its time limit;
- it stops finding meaningful improvements (the big gains come early, and later ones get smaller);
- with Quick Optimisation on, it finds its first good plan.
Two things affect how long that takes:
| Factor | Effect |
|---|---|
| Number of Jobs and Drivers | More Jobs and Drivers means many more possible plans to consider |
| Constraints | Some make the calculation faster by ruling plans out, such as Types. Others make it slower because every plan has to be rechecked, such as time windows. |
Optimisation Settings
These apply to your whole organisation. An administrator sets them in the Admin Panel under Organisation Settings → Optimisation Settings. See Optimisation Settings.
| Setting | What it does |
|---|---|
| Optimisation Objective | What "best" means: Time (the default), Distance or Cost. Cost needs costs set up for every Driver. |
| Quick Optimisation | Stops at the first good plan. It's faster, but complex Scenarios may get better results with it off. |
| Allocate Jobs Fairly Between Drivers | Spreads Jobs more evenly between Drivers, rather than giving some Drivers long Runs and others short ones |
| Default Job Duration | The time a Driver is expected to spend at each Job |
Constraints
Constraints are the rules every Run must follow. They come from your Jobs and your Drivers.
Job constraints
Set these on each Job, with Edit Job or as columns in your spreadsheet. You can see them on the Job's Constraints tab. See Jobs.
| Field | What it does |
|---|---|
| Duration | Minutes the Driver spends at the Job, including parking and walking to the door and back. Often called the service time. |
| Arrive After | The earliest time the Driver may start the Job |
| Leave By | The latest time the Driver may finish the Job |
| Size | Counts towards the Driver's Capacity. The total Size of a Driver's Jobs can't go over their Capacity. Use any unit, as long as it matches the one used for Capacity. |
| Spec Type | Only a Driver with at least one matching Type can do the Job |
| Priority | When not every Job can be served, priority Jobs are served, even if several others aren't |
| Pickup from | Links a delivery Job to its pickup Job, so the same Driver collects first and delivers later in the same Run |
Driver constraints
Set these on each Driver with Edit Driver. See Driver settings that affect routing for each one in detail.
| Field | What it does |
|---|---|
| Shift Start and Shift End | The Run has to fit between them |
| Break Time, Break Duration, Break Latest Start | Leaves time in the Run for the Driver's break |
| Capacity | How much the vehicle can hold, matched against Jobs' Size |
| Type | The skills or vehicle type the Driver has, matched against Jobs' Spec Type |
| Territories | The areas the Driver can visit. Draw them in the Territory Builder. |
| Speed Multiplier | Makes the Driver's travel faster or slower than normal |
| End of Run | Where the Run finishes: back at the start, at an end address, or at the last Job |
Full reference
Each constraint is explained in detail, with examples, in the Route Optimisation API docs. See Concepts and Constraints there. That's also where to look for constraints this page doesn't cover yet, such as multi-dimension Capacity, pickup and delivery intervals and range limits.