Enforce speed limits
In many instances, dispatchers find it essential to set speed limits for vehicles. This practice is widespread across various use cases to ensure safety, especially when transporting people or fragile goods, aligning with company policies or local laws, or adhering to limits for new or inexperienced drivers. With this feature, dispatchers can define specific speed caps for each vehicle type, empowering precise control over vehicle speeds to enhance safety and operational efficiency.
Additionally, it's important to clarify that this feature specifically governs the upper-speed limit of the vehicle. For instance, if there are roads with normal speeds of 30kph, 50kph, and 70kph, and you set a speed cap of 65kph, this cap will be effective only on the roads where the normal speed is more than 65kph, as the other roads are already below the 65kph limit.
In some scenarios, dispatchers require custom speed adjustments universally, modifying the vehicle's speed relative to the standard speed. To cater to this need, there is another feature called speedFactor, enabling adjustments to the driving duration by altering the vehicle's speed. For example, setting a speedFactor of 0.5 reduces the speed to 50% of the normal speed, effectively doubling the time the vehicle takes to cover the same distance.
The speedCap parameter allows you to limit the maximum speed in meters per second (m/s). Travel times are computed taking into account that the maximum speed cannot be exceeded by the vehicle. This limitation is available for car, truck and scooter vehicle profiles.
Problem
In the example below, driving time is increased due to max speed limit for the car, set to 5 m/s. Modifying this parameter will impact driving time for specific tour and total driving time for the solution.
Click to expand/collapse the sample JSON
{
"fleet": {
"profiles": [
{
"type": "car",
"name": "car_1",
"options": {
"speedCap": 5
}
}
],
"types": [
{
"id": "6290a20b08a7",
"profile": "car_1",
"costs": {
"fixed": 10.0,
"distance": 0.001,
"time": 0.006
},
"shifts": [
{
"start": {
"time": "2021-08-27T08:03:00Z",
"location": {
"lat": 52.530971,
"lng": 13.384915
}
},
"end": {
"time": "2021-08-27T16:03:00Z",
"location": {
"lat": 52.530971,
"lng": 13.384915
}
}
}
],
"capacity": [
50
],
"amount": 1
}
]
},
"plan": {
"jobs": [
{
"id": "job_1",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-08-27T09:03:00Z",
"2021-08-27T18:03:00Z"
]
],
"location": {
"lat": 52.59175589353722,
"lng": 13.350747750372257
},
"duration": 360
}
],
"demand": [
1
]
}
]
}
},
{
"id": "job_2",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-08-27T08:03:00Z",
"2021-08-27T18:03:00Z"
]
],
"location": {
"lat": 52.43363386232821,
"lng": 13.403232562191313
},
"duration": 540
}
],
"demand": [
1
]
}
]
}
}
]
}
}Solution with speed cap limit
The solution for such a problem will look as follows:
Click to expand/collapse the sample JSON
{
"statistic": {
"cost": 127.941,
"distance": 50573,
"duration": 11228,
"times": {
"driving": 10328,
"serving": 900,
"waiting": 0,
"stopping": 0,
"break": 0
}
},
"tours": [
{
"vehicleId": "6290a20b08a7_1",
"typeId": "6290a20b08a7",
"stops": [
... TOUR STOPS
],
"statistic": {
"cost": 127.941,
"distance": 50573,
"duration": 11228,
"times": {
"driving": 10328,
"serving": 900,
"waiting": 0,
"stopping": 0,
"break": 0
}
},
"shiftIndex": 0
}
]
}Solution without speed cap limit
For the same problem, but without speed cap limit, total driving time should be different. The solution will look as follows:
Click to expand/collapse the sample JSON
{
"statistic": {
"cost": 92.404,
"distance": 51030,
"duration": 5229,
"times": {
"driving": 4329,
"serving": 900,
"waiting": 0,
"stopping": 0,
"break": 0
}
},
"tours": [
{
"vehicleId": "6290a20b08a7_1",
"typeId": "6290a20b08a7",
"stops": [
... TOUR STOPS
],
"statistic": {
"cost": 92.404,
"distance": 51030,
"duration": 5229,
"times": {
"driving": 4329,
"serving": 900,
"waiting": 0,
"stopping": 0,
"break": 0
}
},
"shiftIndex": 0
}
]
}Next steps
- For more information, see the following articles:
- To explore other limit types, see Set route limits.
Updated 28 days ago