Route limits are useful when constraining routes for individual or all vehicles. These limits are so-called hard constraints, hence, the limits cannot be exceeded by the routes they are applicable to.
Max stops
It may be useful to limit the number of stops in a route to a particular amount. This can simply be done with the max_stops
attribute for one vehicle (on the vehicle itself) or globally for all vehicles (in the defaults/vehicles section). Individual vehicle settings take precedence over global settings.
Max distance
It may be useful to limit the distance a vehicle can travel. For example, if the vehicle has a limited range. This limit can be set via the max_distance
attribute for one vehicle (on the vehicle itself) or globally for all vehicles (in the defaults/vehicles section). Individual vehicle settings take precedence over global settings. The distance is given in meters.
Max duration
It may be useful to set a hard limit on the maximum duration of a route for a vehicle. For example, if the vehicle or vehicle driver has a limited availability. This limit can be set via the the max_duration
attribute for one vehicle (on the vehicle itself) or globally for all vehicles (in the defaults/vehicles section). Individual vehicle settings take precedence over global settings. The duration is given in seconds.
Note, there is a known accuracy issue in ETAs when combining hard_window
& max_duration
. We are working on a fix for this.