VehicleSpec Structure |
Namespace: Telogis.GeoBase.Routing
The VehicleSpec type exposes the following members.
Name | Description | |
---|---|---|
Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType.) | |
FromXml |
Used to deserialize a VehicleSpec
object from XML.
| |
GetHashCode |
Returns a unique integer for this object.
(Overrides ValueTypeGetHashCode.) | |
GetLoadInfo |
Returns the type and weight (measured in kilograms)
for one of the loads that the vehicle (represented by this VehicleSpec) object
is carrying.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
SetLoadInfo |
Sets the type and weight (measured in kilograms)
of one of the loads that the vehicle (represented by this VehicleSpec) object
is carrying.
| |
ToString | Returns the fully qualified type name of this instance. (Inherited from ValueType.) | |
ToXml |
Used to serialize a VehicleSpec
object to XML.
|
Name | Description | |
---|---|---|
GrossWeight_kg |
Total weight of the vehicle (including fuel, cargo and passengers), measured in kilograms.
| |
Height_cm |
Maximum height of the vehicle, measured in centimeters.
| |
KingpinToEnd_cm |
Distance from the kingpin to the end of the trailer, measured in centimeters.
| |
KingpinToLastAxle_cm |
Distance from the kingpin to the last trailer axle, measured in centimeters.
| |
KingpinToMiddleOfLastTandem_cm |
Distance from the kingpin to the center of the last tandem axle, measured in centimeters.
| |
Length_cm |
Maximum length of the vehicle, measured in centimeters.
| |
LoadLength |
Maximum number of allowed loads.
| |
MaxAxleWeight_kg |
Maximum (distributed) weight supported by an axle, measured in kilograms.
| |
MaxTandemAxleWeight_kg |
Maximum (distributed) weight supported by a tandem axle, measured in kilograms.
| |
MaxTrailerLength_cm |
Maximum length of the trailer, measured in centimeters.
| |
MaxTridemAxleWeight_kg |
Maximum (distributed) weight supported by a tridem axle, measured in kilograms.
| |
NumberOfAxles |
Total number of axles on this vehicle (including trailers).
| |
NumberOfAxlesOnTrailers |
Sum total of the number of axles on each trailer.
| |
NumberOfTrailers |
Total number of trailers pulled by this vehicle.
| |
NumberOfWheels |
Total number of wheels on this vehicle.
| |
TractorLength_cm |
Maximum length of the tractor, measured in centimeters.
| |
UnladenWeight_kg |
Unladen (without cargo) weight of the vehicle, measured in kilograms.
| |
VehicleType |
Classification of this vehicle, as a VehicleType.
| |
WeightPerInchWidthOfTire_kg |
Maximum weight per inch of width of tire. This is a measure of the maximum pressure
exterted by this vehicle onto the road surface.
| |
Width_cm |
Maximum width of the vehicle, measured in centimeters.
|
Each Route, Navigator and NavigationManager has a VehicleSpec. When optimizing a route, or obtaining driving directions the Route, Navigator or NavigationManager will consider the attributes specified in its VehicleSpec property to ensure that the route is safe.
Use the SetLoadInfo(Int32, LoadType, UInt32) method to configure the load that the vehicle is carrying. This load may include HAZMAT designations. See LoadType for possible designations.
You may use the ConvertUnits(Double, DistanceUnit, DistanceUnit) to convert between distance units.
Note that it may be necessary to call ForceRecalculate if a vehicle's specifications are changed after a route has been calculated.Related articles: Using Truck Attributes.
VehicleSpec vs = new VehicleSpec(); vs.VehicleType = VehicleType.StraightTruck; // straight flat-bed truck vs.Height_cm = 467; // about 15 feet vs.SetLoadInfo(0, LoadType.Forestry, 2000); // 2 tonnes of timber vs.SetLoadInfo(1, LoadType.Hazmat_3, 80); // 80 kg of paint myRoute.VehicleSpec = vs; // now, when we call myRoute.GetDirections() the route will be calculated // for a 15'-high truck carrying 2 tonnes of timber and 80 kg of paint...