sdk-routing / com.tomtom.online.sdk.routing.ev / ElectricVehicleDescriptor / Builder

Builder

class Builder

A builder class used to create ElectricVehicleDescriptor for the Long Distance EV Routing service.

Parameters

speedConsumptionInKWhPerHundredKm - Specifies the speed-dependent component of consumption in kWh.

currentChargeInKWh - Specifies the current electric energy supply in kWh.

maxChargeInkWh - Specifies the maximum electric energy supply in kWh that may be stored in the vehicle's battery.

minChargeAtDestinationInkWh - The battery level upon arrival at the destination of the resulting route will be at least this much. Maximum value: maxChargeInkWh

minChargeAtChargingStopsInkWh - The battery level upon arrival at each intermediate charging stop of the resulting route will be at least this much. Maximum value: 0.2 × maxChargeInkWh

chargingModes - A non-empty list of at most 10 chargingModes, which the vehicle is able to use to charge. Each chargingConnection appears in at most one chargingMode.

Constructors

<init>

Builder(speedConsumptionInKWhPerHundredKm: Map<Double, Double>, currentChargeInKWh: Double, maxChargeInkWh: Double, minChargeAtDestinationInkWh: Double, minChargeAtChargingStopsInkWh: Double, chargingModes: List<ChargingMode>)

A builder class used to create ElectricVehicleDescriptor for the Long Distance EV Routing service.

Functions

auxiliaryPowerInKW

fun auxiliaryPowerInKW(auxiliaryPowerInKW: Double): ElectricVehicleDescriptor.Builder

Specifies the amount of power consumed for sustaining auxiliary systems, in kWh.

build

fun build(): ElectricVehicleDescriptor

Creates new instance of ElectricVehicleDescriptor.

vehicleAdrTunnelRestrictionCode

fun vehicleAdrTunnelRestrictionCode(restrictionCode: VehicleAdrTunnelRestrictionCode): ElectricVehicleDescriptor.Builder

Specifies the vehicle ADR tunnel restriction code for the requested route.

vehicleLoadType

fun vehicleLoadType(loadType: VehicleLoadType): ElectricVehicleDescriptor.Builder

Specifies types of cargo that may be classified as hazardous materials and restricted from some roads.