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 |
---|---|---|---|---|---|---|
start_time | No | timestamp | NA | vehicle | {"start_time": "2023-01-01T00:00:00Z"} | ✅ |
end_time | No | timestamp | NA | vehicle | {"end_time": "2023-01-01T00:00:00Z"} | ✅ |
You can specify the time at which a vehicle starts its route, with the start_time
. By default, there are no arrival or departure times given for vehicles at stops in the solution. When you specify the start_time
for a vehicle, there is context for when the route starts, and thus, there are timestamps calculated as part of the output, such as the arrival_time
for each stop.
In addition to the start time, you can also define the latest time at which a vehicle must end its route, with the end_time
. Defining both the start_time
and end_time
defines a shift for the vehicle. Please note that the end_time
includes any time spent traveling, waiting at stops, and servicing them.
Both the start_time
and end_time
are optional.
When defining start_time
and end_time
there is a time duration defined by end_time - start_time
. The route duration is limited by the most constrained duration between end_time - start_time
and max_duration
.
Defining the start_time
on the vehicle makes it possible to calculate the arrival_time
, start_time
and end_time
for the vehicle's planned stops in the output.
Here is an example input defining the start_time
and end_time
for some vehicles. Note how defining different attributes for each vehicle leads to distinct route information. A sample output obtained after solving the problem is also shown.