TransportedCargo
public struct TransportedCargo : Hashable
This struct defines the transported cargo and weight of the vehicle.
Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
-
The current weight in kilograms.
This parameter is used to provide a more accurate consumption prediction for electric vehicles.
grossWeightInKilogramsis used for vehicle restrictions on the road.The value is used to define the electrical vehicle consumption along the route.
Declaration
Swift
public var currentWeightInKilograms: Int32? -
Truck weight including trailers and shipped goods in kilograms. The provided value must be greater than or equal to 0. By default, it is not set.
Declaration
Swift
public var grossWeightInKilograms: Int32? -
Heaviest weight per axle, regardless of axle type or axle group. It is evaluated against all axle weight restrictions, including single axle and tandem axle weight restrictions. The provided value must be greater or equal to 0. By default, it is not set. Note:
weight_per_axle_in_kilogramsandweight_per_axle_groupare incompatible. When available for your edition, if both attributes are set, during online RoutingEngine an [sdk.routing.RoutingError.INVALID_PARAMETER] error is generated. Otherwise, when offline RoutingEngine is in place, both parameters are evaluated and the maximum value between them will be used.Declaration
Swift
public var weightPerAxleInKilograms: Int32? -
Allows specification of axle weights in a more fine-grained way than
weight_per_axle_in_kilograms. This is relevant in countries with signs and regulations that specify different limits for different axle groups, like the USA and Sweden. By default is not set. Note:weight_per_axle_in_kilogramsandweight_per_axle_groupare incompatible. When available for your edition, if both attributes are set, during online RoutingEngine an [sdk.routing.RoutingError.INVALID_PARAMETER] error is generated. Otherwise, when offline RoutingEngine is in place, both parameters are evaluated and the maximum value between them will be used.Declaration
Swift
public var weightPerAxleGroup: WeightPerAxleGroup? -
Specifies the tunnel categories to restrict certain route links. The route will pass only through tunnels of a less strict category. Refer to
TunnelCategoryfor the available options.Declaration
Swift
public var linkTunnelCategory: TunnelCategory? -
Specifies a list of hazardous materials shipped in the vehicle. Refer to
HazardousMaterialfor the available options.Declaration
Swift
public var hazardousMaterials: [HazardousMaterial] -
Specifies a list of avoided truck road types for vehicle. Refer to
TruckRoadTypefor the available options.Declaration
Swift
public var avoidedTruckRoadTypes: [TruckRoadType] -
init(currentWeightInKilograms:grossWeightInKilograms: weightPerAxleInKilograms: weightPerAxleGroup: linkTunnelCategory: hazardousMaterials: avoidedTruckRoadTypes: ) Creates a new instance.
Parameters
- currentWeightInKilograms: The current weight in kilograms.
This parameter is used to provide a more accurate consumption prediction for electric vehicles.
grossWeightInKilogramsis used for vehicle restrictions on the road.The value is used to define the electrical vehicle consumption along the route.
- grossWeightInKilograms: Truck weight including trailers and shipped goods in kilograms. The provided value must be greater than or equal to 0. By default, it is not set.
- weightPerAxleInKilograms: Heaviest weight per axle, regardless of axle type or axle group.
It is evaluated against all axle weight restrictions, including single axle and tandem axle weight restrictions.
The provided value must be greater or equal to 0.
By default, it is not set.
Note:
weight_per_axle_in_kilogramsandweight_per_axle_groupare incompatible. When available for your edition, if both attributes are set, during online RoutingEngine an [sdk.routing.RoutingError.INVALID_PARAMETER] error is generated. Otherwise, when offline RoutingEngine is in place, both parameters are evaluated and the maximum value between them will be used. - weightPerAxleGroup: Allows specification of axle weights in a more fine-grained way than
weight_per_axle_in_kilograms. This is relevant in countries with signs and regulations that specify different limits for different axle groups, like the USA and Sweden. By default is not set. Note:weight_per_axle_in_kilogramsandweight_per_axle_groupare incompatible. When available for your edition, if both attributes are set, during online RoutingEngine an [sdk.routing.RoutingError.INVALID_PARAMETER] error is generated. Otherwise, when offline RoutingEngine is in place, both parameters are evaluated and the maximum value between them will be used. - linkTunnelCategory: Specifies the tunnel categories to restrict certain route links.
The route will pass only through tunnels of a less strict category.
Refer to
TunnelCategoryfor the available options. - hazardousMaterials: Specifies a list of hazardous materials shipped in the vehicle.
Refer to
HazardousMaterialfor the available options. - avoidedTruckRoadTypes: Specifies a list of avoided truck road types for vehicle.
Refer to
TruckRoadTypefor the available options.
Declaration
Swift
public init(currentWeightInKilograms: Int32? = nil, grossWeightInKilograms: Int32? = nil, weightPerAxleInKilograms: Int32? = nil, weightPerAxleGroup: WeightPerAxleGroup? = nil, linkTunnelCategory: TunnelCategory? = nil, hazardousMaterials: [HazardousMaterial] = [], avoidedTruckRoadTypes: [TruckRoadType] = [])