Commercial Vehicle Restrictions - Spectrum_Routing_for_Big_Data - 3.0

Global Routing SDK Developer Guide

Product type
Software
Portfolio
Locate
Product family
Spectrumâ„¢ software
Product
Spatial Big Data > Routing for Big Data
Version
3.0
ft:locale
en-US
Product name
Routing for Big Data
ft:title
Global Routing SDK Developer Guide
Copyright
2024
First publish date
2007
ft:lastEdition
2024-10-15
ft:lastPublication
2024-10-15T10:39:39.482000

Description

Commercial Vehicle Restrictions (CVR) are composed of directives to the routing engine that guides the behavior and attributes of commercial vehicles making trips along the route. Depending upon vehicle attributes provided (such as height, width, length, weight) and the commercial vehicle restriction attributes present in the road network, decision is made whether to allow to route a particular vehicle over a segment or not. If there is no commercial vehicle restriction attribute present in road network, input restriction parameters will have no effect in the resultant route.

Optional Parameters

Following optional parameters can be get or set in GetRouteRequest object:

Parameter Type Description
looseningBarrierRestrictions Boolean Specifies whether the barriers will be ignored when determining the route.These restrictions are applicable when a commercial vehicle is prohibited from traversing a segment due to local ordinance or a commercial vehicle is allowed on the segment but only when it must (for example, last mile access, local delivery, and so on). Routes where a barrier has been removed will still have a higher route cost even if the route it shorter/faster than a route with no barrier.

Vehicle Attributes

These attributes specify the details of the vehicle on which the restrictions are applied. The attributes can be vehicle type, height, weight, length, or width when determining the route. Commercial vehicles are divided into different types ranging from short trailers to long triples. The Commercial Vehicle Restrictions attribution is organized on a per-vehicle type basis. This means it is entirely possible for a segment to be preferred for one vehicle type and the same segment have a restriction for another type of vehicle. Use the following types of vehicle information. Use the following optional parameters to determine the vehicle's properties:
Parameter Type Description
vehicleType String Choose either ALL or one of the types of vehicles:
  • STRAIGHT
  • SEMI_TRAILOR
  • STANDARD_DOUBLE
  • INTERMEDIATE_DOUBLE
  • LONG_DOUBLE
  • TRIPLE
  • OTHER_LONG_COMBINATION_VEHICLE
weight Double Specifies the maximum weight of a vehicle. Any vehicles over this value will be restricted when determining the route. The units of weight are:
  • kg
  • lb
  • mt
  • t
height Double Specifies the maximum height of a vehicle. Any vehicles over this value will be restricted when determining the route. The units of height are:
  • ft
  • yd
  • mi
  • m
  • km
length Double Specifies the maximum length of a vehicle. Any vehicles over this value will be restricted when determining the route. The units of length are:
  • ft
  • yd
  • mi
  • m
  • km
width Double Specifies the maximum width of a vehicle. Any vehicles over this value will be restricted when determining the route. The units of width are:
  • ft
  • yd
  • mi
  • m
  • km
Note: You need to specify either weight/height or length/width along with its corresponding unit. Based on the attributes value you can see variation in time and distance value and in route cost also.

Code Example

Simple Route with start and end points.

IPoint startPoint1 = new Point(SpatialInfo.create(CoordSysConstants.longLatWGS84), new
   DirectPosition(-73.994062, 40.76312));
IPoint startPoint2 = new Point(SpatialInfo.create(CoordSysConstants.longLatWGS84), new
   DirectPosition(-73.985124, 40.765067));
IPoint endPoint1 = new Point(SpatialInfo.create(CoordSysConstants.longLatWGS84), new
   DirectPosition(-74.005972, 40.714269));
IPoint endPoint2 = new Point(SpatialInfo.create(CoordSysConstants.longLatWGS84), new
   DirectPosition(-73.9978, 40.7509));
List < IPoint > startPoints = new ArrayList < > ();
startPoints.add(startPoint1); startPoints.add(startPoint2);
List < IPoint > endPoints = new ArrayList < > (); 
endPoints.add(endPoint1);
endPoints.add(endPoint2);
boolean returnOptimalRoutes = true; 
GetRouteCostMatrixRequest.Builder costMatrixRequestBuilder = new 
   GetRouteCostMatrixRequest.Builder(startPoints,
   endPoints).returnOptimalRoutesOnly(returnOptimalRoutes).DBResource("US"); 

VehicleAttributes attributes = new VehicleAttributes(VehicleType.ALL);
attributes.setLooseningBarrierRestrictions(false);

Length height = new Length(50.0, LinearUnit.METER); 
attributes.setHeight(height);

Length length = new Length(50.0, LinearUnit.METER); 
attributes.setLength(length);

Length width = new Length(50.0, LinearUnit.METER); 
attributes.setWidth(width);

Weight wgt = new Weight(20000, WeightUnit.POUND); 
attributes.setWeight(wgt);

costMatrixRequestBuilder.vehicleAttr(attributes); 
GetRouteCostMatrixRequest matrixRequest = costMatrixRequestBuilder.build();
matrixResponse = m_gra.getRouteCostMatrix(matrixRequest);