-> How to use vehicle routing parameters

Defining vehicle attributes

Our service considers vehicle features such as weight, height, width etc. to adhere to the road restrictions while routing a truck through a route.

Currently following vehicle properties are taken into consideration in the planning:

  • Weight (in kilograms)
  • Height (in centimetres)
  • Width (in centimetres)
  • Length (in centimetres)
  • Hazardous goods points (ADR points) (numbers)
  • Restrict vehicles to drive beyond a certain km (in kilometres)

These vehicle attributes can be used independently, and the fields are optional. However, to consider ADR points in route direction calculation, one must use the vehicle attributes feature. To get a better result in route direction calls, the user needs to specify the ADR points at the shipment and vehicle levels. We have added two new attributes in the shipment and vehicle schema to take the inputs. The capacities fields can still be used to provide the ADR points, but they won’t be considered in route direction calls.

Currently supported fields for vehicle attributes in the JSON schema:

    {
        "max_allowed_weight": 3500,
        "height": 250,
        "width": 50,
        "length": 100,
        "max_adr_points": 800,
        "max_allowed_km": 200
    }

For more information on the Vehicle schema follow this tutorial.

The new vehicle attribute fields can also be defined in the vehicle types as default values. Below are the new fields in the Vehicle type schema.

{  
    "default_max_allowed_weight": 7500,  
    "default_height": 250,  
    "default_width": 300,  
    "default_length": 200,  
    "default_max_adr_points": 1000,  
    "default_max_allowed_km": 100  
}

We also consider the option to avoid ferries in route calculations. This option can be set globally independently of the truck attributes. The avoid ferries option can be set through the query parameters. The query param field name is avoid_ferries which takes boolean values.

Note: The vehicle routing parameters will be considered only if vehicle_routing_type is set to 'truck' in the query params of the API request and also the vehicle_class is set to 'truck' field in the Vehicle schema.