Don’t hesitate to contact us:
Forum: discuss.graphhopper.com
Email: support@graphhopper.com
When optimizing delivery routes, not all time spent at a stop is the same. Over the years, we’ve added several timing parameters to model real-world scenarios more accurately. With our latest addition, setup_time, we now cover another common case: fixed overhead when arriving at a location.
Let me walk through what happens when a vehicle arrives at a delivery location:
prevLoc──travel──▶──preparation──▶──waiting──▶──setup_time──▶──duration──▶travel──▶nextLoc
│ │ │
arr_time tw.earliest end_time
arr_time): The vehicle reaches the locationend_time): Vehicle leaves for the next stop| Parameter | When charged | Charged per… | Example |
|---|---|---|---|
preparation_time |
Before arrival | Location | Finding parking |
setup_time |
After waiting, before service | Location | Dock check-in, security |
duration |
During service | Activity | Loading/unloading items |
The key difference: duration is always charged, while preparation_time and
setup_time are only charged once per location. If two deliveries happen at the same warehouse, you only check in once.
Use setup_time when you have fixed overhead at certain locations that:
{
"id": "delivery-1",
"address": { "location_id": "warehouse", ... },
"duration": 300,
"setup_time": 600
}
This models a 5-minute unloading task at a warehouse that requires 10 minutes of check-in, but if you have three deliveries at that warehouse, you only check in once.
For more details, see the setup_time documentation.
Happy optimizing!