sdk-routing / com.tomtom.online.sdk.routing.data.matrix / MatrixRoutingQueryBuilder

MatrixRoutingQueryBuilder

@DeprecatedSince(2020, 6) class MatrixRoutingQueryBuilder
Deprecated: Replaced by the MatrixRoutesSpecification.Builder

The default builder for MatrixRoutingQuery objects.

Constructors

<init>

MatrixRoutingQueryBuilder(origins: List<LatLng>, destinations: List<LatLng>)

The default builder for MatrixRoutingQuery objects.

Functions

build

fun build(): MatrixRoutingQuery

Creates new instance of MatrixRoutingQuery.

withAccelerationEfficiency

fun withAccelerationEfficiency(accelerationEfficiency: Double): MatrixRoutingQueryBuilder

Specifies the efficiency of converting kinetic energy to saved (not consumed) fuel when the vehicle decelerates (i.e. ChemicalEnergySaved/KineticEnergyLost). ChemicalEnergySaved is obtained by converting saved (not consumed) fuel to energy using fuelEnergyDensityInMJoulesPerLiter. Applicable only for combustion engines. If used at all, must be used in conjunction with .withAccelerationEfficiency. If used, .withVehicleWeightInKg has to be used as well.

withAdrTunnelRestrictionCode

fun withAdrTunnelRestrictionCode(adrTunnelRestrictionCode: AdrTunnelRestrictionCode?): MatrixRoutingQueryBuilder

If vehicleAdrTunnelRestrictionCode is specified, the vehicle is subject to ADR tunnel restrictions.

withAuxiliaryPowerInKW

fun withAuxiliaryPowerInKW(auxiliaryPowerInKW: Double?): MatrixRoutingQueryBuilder

Specifies the amount of power consumed for sustaining auxiliary systems, in kilowatts (kW). It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc.

withAuxiliaryPowerInLitersPerHour

fun withAuxiliaryPowerInLitersPerHour(auxiliaryPowerInLitersPerHour: Double): MatrixRoutingQueryBuilder

Specifies the amount of fuel consumed for sustaining auxiliary systems of the vehicle, in liters per hour. It can be used to specify consumption due to devices and systems such as AC systems, radio, heating, etc. Applicable only for combustion engines.

withAvoidList

fun withAvoidList(avoidList: List<Avoid>): MatrixRoutingQueryBuilder

Specifies what the route calculation should try to avoid when determining the route. Can be specified multiple times.

withAvoidType

fun withAvoidType(avoidType: Avoid): MatrixRoutingQueryBuilder

Specifies what the route calculation should try to avoid when determining the route. Can be specified multiple times.

withConsiderTraffic

fun withConsiderTraffic(considerTraffic: Boolean): MatrixRoutingQueryBuilder

Specifies if all available traffic information should be considered during routing.

withConstantSpeedConsumptionInKWhPerHundredKm

fun withConstantSpeedConsumptionInKWhPerHundredKm(constantSpeedConsumptionInKWhPerHundredKm: SpeedToConsumptionMap?): MatrixRoutingQueryBuilder

Specifies the speed-dependent component of consumption. Provided as an unordered list of speed/consumption-rate in kWh pairs. Applicable only for electric engines.

withConstantSpeedConsumptionInLitersPerHundredKm

fun withConstantSpeedConsumptionInLitersPerHundredKm(constantSpeedConsumptionInLitersPerHundredKm: SpeedToConsumptionMap): MatrixRoutingQueryBuilder

Specifies the speed-dependent component of consumption. Provided as an unordered list of speed/consumption-rate in liters-per-100km pairs. Applicable only for combustion engines.

withCurrentChargeInKWh

fun withCurrentChargeInKWh(currentChargeInKWh: Double?): MatrixRoutingQueryBuilder

Specifies the current electric energy supply in kilowatt hours (kWh). Applicable only for electric engines. If used at all, must be used in conjunction with MatrixRoutingQueryBuilder.withMaxChargeInKWh.

withCurrentFuelInLiters

fun withCurrentFuelInLiters(currentFuelInLiters: Double): MatrixRoutingQueryBuilder

Specifies the current supply of fuel in liters. Applicable only for combustion engines.

withDecelerationEfficiency

fun withDecelerationEfficiency(decelerationEfficiency: Double?): MatrixRoutingQueryBuilder

Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation (i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed is obtained by converting consumed fuel to chemical energy using fuelEnergyDensityInMJoulesPerLiter. Applicable only for combustion engines. If used at all, must be used in conjunction with .withDownhillEfficiency. If used, .withVehicleWeightInKg has to be used as well.

withDepartAt

fun withDepartAt(departAt: Date): MatrixRoutingQueryBuilder

Specifies the departure time.

withDownhillEfficiency

fun withDownhillEfficiency(downhillEfficiency: Double?): MatrixRoutingQueryBuilder

Specifies the efficiency of converting potential energy to saved (not consumed) fuel when the vehicle loses elevation (i.e. ChemicalEnergySaved/PotentialEnergyLost). ChemicalEnergySaved is obtained by converting saved (not consumed) fuel to energy using fuelEnergyDensityInMJoulesPerLiter. Applicable only for combustion engines. If used at all, must be used in conjunction with MatrixRoutingQueryBuilder.withUphillEfficiency. If used, MatrixRoutingQueryBuilder.withVehicleWeightInKg has to be used as well.

withFuelEnergyDensityInMJoulesPerLiter

fun withFuelEnergyDensityInMJoulesPerLiter(fuelEnergyDensityInMJoulesPerLiter: Double): MatrixRoutingQueryBuilder

Specifies the amount of chemical energy stored in one liter of fuel in megajoules (MJ). It is used in conjunction with the *Efficiency parameters for conversions between saved or consumed energy and fuel. For example, energy density is 34.2 MJ/l for gasoline, and 35.8 MJ/l for Diesel fuel. Applicable only for combustion engines.

withHilliness

fun withHilliness(hilliness: Hilliness): MatrixRoutingQueryBuilder

Specifies the hilliness type for route calculation.

withMaxChargeInKWh

fun withMaxChargeInKWh(maxChargeInKWh: Double?): MatrixRoutingQueryBuilder

Specifies the capacity of the vehicle's battery in kilowatt hours (kWh). Applicable only for electric engines. If used at all, must be used in conjunction with MatrixRoutingQueryBuilder.withCurrentChargeInKWh.

withRouteType

fun withRouteType(routeType: RouteType): MatrixRoutingQueryBuilder

Specifies the route type.

withTravelMode

fun withTravelMode(travelMode: TravelMode): MatrixRoutingQueryBuilder

Specifies the travel mode for route calculation.

withUphillEfficiency

fun withUphillEfficiency(uphillEfficiency: Double): MatrixRoutingQueryBuilder

Specifies the efficiency of converting chemical energy stored in fuel to potential energy when the vehicle gains elevation (i.e. PotentialEnergyGained/ChemicalEnergyConsumed). ChemicalEnergyConsumed is obtained by converting consumed fuel to chemical energy using fuelEnergyDensityInMJoulesPerLiter. Applicable only for combustion engines. If used at all, must be used in conjunction with MatrixRoutingQueryBuilder.withDownhillEfficiency. If used, .withVehicleWeightInKg has to be used as well.

withVehicleAxleWeightInKg

fun withVehicleAxleWeightInKg(vehicleAxleWeightInKg: Int): MatrixRoutingQueryBuilder

Specifies the vehicle axle weight for route calculation.

withVehicleCommercial

fun withVehicleCommercial(vehicleCommercial: Boolean): MatrixRoutingQueryBuilder

Specifies if the vehicle is used for commercial to calculate route.

withVehicleEngineType

fun withVehicleEngineType(vehicleEngineType: VehicleEngineType): MatrixRoutingQueryBuilder

Specifies the vehicle engine type for route query.

withVehicleHeightInMeters

fun withVehicleHeightInMeters(vehicleHeightInMeters: Double): MatrixRoutingQueryBuilder

Specifies the vehicle height for route calculation.

withVehicleLengthInMeters

fun withVehicleLengthInMeters(vehicleLengthInMeters: Double): MatrixRoutingQueryBuilder

Specifies the vehicle length for route calculation.

withVehicleLoadType

fun withVehicleLoadType(vehicleLoadType: VehicleLoadType): MatrixRoutingQueryBuilder

Specifies the vehicle load type for route calculation.

withVehicleMaxSpeedInKph

fun withVehicleMaxSpeedInKph(vehicleMaxSpeedInKph: Int): MatrixRoutingQueryBuilder

Specifies the vehicle max speed for route calculation.

withVehicleWeightInKg

fun withVehicleWeightInKg(vehicleWeightInKg: Int): MatrixRoutingQueryBuilder

Specifies the vehicle weight in kilograms for route calculation.

withVehicleWidthInMeters

fun withVehicleWidthInMeters(vehicleWidthInMeters: Double): MatrixRoutingQueryBuilder

Specifies the vehicle width for route calculation.

withWindingness

fun withWindingness(windingness: Windingness): MatrixRoutingQueryBuilder

Specifies the windingness type for route calculation.

Companion Object Functions

create

fun create(origins: List<LatLng>, destinations: List<LatLng>): MatrixRoutingQueryBuilder

Creates an instance of MatrixRoutingQueryBuilder with given origins and destinations lists.