THIS SDK ISDEPRECATED.

We rolled out a new and better SDK for you.

Long Distance EV Routing

Plan a route between a given origin and destination that automatically includes charging stops along the way with the Long Distance EV Routing API available in the Maps SDK. Long Distance EV Routing automatically adds charging stops to your route based on a number of parameters specific for your electric car and driving behavior. Have a look at the Long Distance EV Routing detailed documentation.

Long Distance EV Routing can be used in variety of use cases that will help users of your app to plan routes for their electric cars to avoid car charging anxiety and enjoy peaceful driving. We prepared a few examples of such use cases.

Sample use case: You would like to plan a long route for your electric car that will take into consideration charging stops. Thanks to that, you will know in advance when you need to stop to charge your car. Also, you will be able to estimate how much energy will be consumed during the trip. Using TomTom Long Distance EV Routing you will also be provided with an energy-efficient route with accurate battery consumption calculations, that also considers the route profile and expected traffic.

Sample use case: You would like to see how much battery you have left when arriving at a stop so that you can find out what the options are if you need an alternative charger.

In order to plan an EV route, you need to set the vehicle parameters in your app such as vehicle weight, vehicle length, vehicle height, and others. For your convenience we have created predefined examples of vehicle objects representing a prototypical EV with different ranges defining how far they will actually go on a single charge. This will help you to easily try out Long Distance EV Routing functionality without specifying all the detailed parameters defining the particular vehicle model.

Use the following code snippets to try this in your app:

Example showing a possible vehicle definition for a short range vehicle

1ElectricVehicleDescriptor evDescriptor = new ElectricVehicleDescriptor.Builder(
2 new ElectricVehicleConsumption(
3 40.0,
4 20.0,
5 auxiliaryPowerInKw,
6 speedConsumptionInKwhPer100Km
7 )
8).build()
9
10ChargingDescriptor chargingDescriptor = new ChargingDescriptor(
11 minChargeAtDestinationInKwh,
12 minChargeAtChargingStopsInKwh,
13 Collections.singletonList(
14 new ChargingMode(
15 Collections.singletonList(
16 new ChargingConnection(
17 FacilityType.CHARGE_380_TO_480V_3_PHASE_AT_32A,
18 PlugType.IEC_62196_TYPE_2_OUTLET
19 )
20 ),
21 Arrays.asList(
22 new ChargingCurveSupportPoint(6.0, 360),
23 new ChargingCurveSupportPoint(40.0, 4680)
24 )
25 )
26 )
27);
28EvRouteSpecification evRouteSpecification = new EvRouteSpecification.Builder(
29 Locations.AMSTERDAM_LOCATION,
30 Locations.EINDHOVEN_LOCATION,
31 evDescriptor,
32 chargingDescriptor
33).build();
1// SPEED_CONSUMPTION_IN_KWH_PER_100_KM = mapOf(77.0 to 32.0, 18.01 to 10.87)
2// AUXILIARY_POWER_IN_KW = 1.0
3val evDescriptor = ElectricVehicleDescriptor.Builder(
4 ElectricVehicleConsumption(
5 50.0,
6 20.0,
7 AUXILIARY_POWER_IN_KW,
8 SPEED_CONSUMPTION_IN_KWH_PER_100_KM
9 )
10).build()
11
12val chargingDescriptor = ChargingDescriptor(
13 minChargeAtDestinationInkWh = 2.0,
14 minChargeAtChargingStopsInkWh = 4.0,
15 chargingModes = listOf(
16 ChargingMode(
17 listOf(
18 ChargingConnection(
19 FacilityType.CHARGE_200_TO_240V_1_PHASE_AT_16A,
20 PlugType.IEC_62196_TYPE_2_OUTLET
21 ),
22 ChargingConnection(
23 FacilityType.CHARGE_200_TO_240V_3_PHASE_AT_32A,
24 PlugType.IEC_62196_TYPE_2_OUTLET
25 ),
26 ChargingConnection(
27 FacilityType.CHARGE_380_TO_480V_3_PHASE_AT_32A,
28 PlugType.IEC_62196_TYPE_2_OUTLET
29 )
30 ),
31 listOf(
32 ChargingCurveSupportPoint(6.0, 360),
33 ChargingCurveSupportPoint(50.0, 4680)
34 )
35 )
36 )
37)
38val evRouteSpecification =
39 EvRouteSpecification.Builder(Locations.AMSTERDAM, Locations.BERLIN, evDescriptor, chargingDescriptor)
40 .routeDescriptor(
41 RouteDescriptor.Builder()
42 .routeType(RouteType.FASTEST)
43 .travelMode(TravelMode.CAR)
44 .build()
45 )
46 .build()
47return routingApi.planRoute(evRouteSpecification, evRouteCallback)

Example showing a possible vehicle definition for a long range vehicle

1ElectricVehicleDescriptor evDescriptor = new ElectricVehicleDescriptor.Builder(
2 new ElectricVehicleConsumption(
3 80.0,
4 40.0,
5 auxiliaryPowerInKw,
6 speedConsumptionInKwhPer100Km
7 )
8).build();
9
10ChargingDescriptor chargingDescriptor = new ChargingDescriptor(
11 minChargeAtDestinationInKwh,
12 minChargeAtChargingStopsInKwh,
13 Collections.singletonList(
14 new ChargingMode(
15 Collections.singletonList(
16 new ChargingConnection(
17 FacilityType.CHARGE_380_TO_480V_3_PHASE_AT_32A,
18 PlugType.IEC_62196_TYPE_2_OUTLET
19 )
20 ),
21 Arrays.asList(
22 new ChargingCurveSupportPoint(6.0, 360),
23 new ChargingCurveSupportPoint(80.0, 6680)
24 )
25 )
26 )
27);
28EvRouteSpecification evRouteSpecification = new EvRouteSpecification.Builder(
29 Locations.AMSTERDAM_LOCATION,
30 Locations.EINDHOVEN_LOCATION,
31 evDescriptor,
32 chargingDescriptor
33).build();
1// SPEED_CONSUMPTION_IN_KWH_PER_100_KM = mapOf(77.0 to 32.0, 18.01 to 10.87)
2// AUXILIARY_POWER_IN_KW = 1.0
3val evDescriptor = ElectricVehicleDescriptor.Builder(
4 ElectricVehicleConsumption(
5 100.0,
6 40.0,
7 AUXILIARY_POWER_IN_KW,
8 SPEED_CONSUMPTION_IN_KWH_PER_100_KM
9 )
10).build()
11
12val chargingDescriptor = ChargingDescriptor(
13 minChargeAtDestinationInkWh = 4.0,
14 minChargeAtChargingStopsInkWh = 8.0,
15 chargingModes = listOf(
16 ChargingMode(
17 listOf(
18 ChargingConnection(
19 FacilityType.CHARGE_200_TO_240V_1_PHASE_AT_16A,
20 PlugType.IEC_62196_TYPE_2_OUTLET
21 ),
22 ChargingConnection(
23 FacilityType.CHARGE_200_TO_240V_3_PHASE_AT_32A,
24 PlugType.IEC_62196_TYPE_2_OUTLET
25 ),
26 ChargingConnection(
27 FacilityType.CHARGE_380_TO_480V_3_PHASE_AT_32A,
28 PlugType.IEC_62196_TYPE_2_OUTLET
29 )
30 ),
31 listOf(
32 ChargingCurveSupportPoint(6.0, 360),
33 ChargingCurveSupportPoint(100.0, 6680)
34 )
35 )
36 )
37)
38val evRouteSpecification =
39 EvRouteSpecification.Builder(Locations.AMSTERDAM, Locations.BERLIN, evDescriptor, chargingDescriptor)
40 .routeDescriptor(
41 RouteDescriptor.Builder()
42 .routeType(RouteType.FASTEST)
43 .travelMode(TravelMode.CAR)
44 .build()
45 )
46 .build()
47return routingApi.planRoute(evRouteSpecification, evRouteCallback)

image

EV route with short range vehicle

image

EV route with long range vehicle