This feature is configurable via .json input, without the need for code customization and is available for both the Marketplace app and Platform. You can find a list of all available features here.
The format for timestamps should be RFC3339, e.g.: "2023-01-01T00:00:00Z".
This how-to guide assumes you already completed the get started with vehicle routing tutorial.
| Field name | Required | Data type | SI Unit | Defined on | Example | Configurable via defaults |
|---|---|---|---|---|---|---|
max_wait | No | int | seconds | vehicle | {"max_wait": 123} | ✅ |
max_wait | No | int | seconds | stop | {"max_wait": 123} | ✅ |
The max_wait feature is the maximum amount of time, in seconds, a vehicle is allowed to wait at a stop for the start_time_window to open, in case the vehicle arrives at the stop early.
- When defining
max_waiton a stop, the vehicle waiting time at the stop is limited. - When defining
max_waiton a vehicle, the total waiting time aggregated for all assigned stops ain the vehicle's route is limited. max_waitcan be defined on both stops and vehicles.- If the vehicle has to wait at a stop, there is additional information displayed on the output, such as the
waiting_durationfor a stop or theroute_waiting_durationfor a vehicle.
Please note that waiting time is constrained only for stops that have a start_time_window defined. This happens because there is no waiting time if there is no earliest start time defined for the stop.
Here is an example that defines the maximum wait time for stops. A sample output obtained after solving the problem is also shown.
Here is another example that defines the maximum wait time for a vehicle. Notice that the max_wait is noticeably larger compared to the first example, given that when the feature is defined on the vehicle, the aggregate waiting time is the one constrained. A sample output obtained after solving the problem is also shown.