EV Trip Planner
EV Trip Planner
This feature plans routes based on the current electric quantity, and include charging stations if necessary. Before using this feature, you should set vehicle information.
Note: this feature only support offboard mode
Planner Request
Most parameters in an EvTripPlanningRequest are identical to those in a route request, including route preference, waypoints, heading, speed, origin, and destination. But there is an important parameter: ChargingPlanPreference in the EV trip planner request.
ChargingPlanPreference
ChargingPlanPreference
is a data class that defines user preferences for route calculation.
Parameter | description |
---|---|
enableChargingPlanning | True: It will automatically enable charging station planning if the current battery level is insufficient for the vehicle to reach the destination. False: Disable charge station planning automatically. |
planningStrategy | HigherPowerChargerStrategy:Prefer to select higher power chargers with less charging time. It is a default setting. LessDetourStrategy: Perfer to use chargers along the route. AlternativeRouteStrategy:Prefer to supply an alternative route. |
preferredConnectorTypes | The types of connector preferred to be used for charging. |
preferredChargerBrands | The charger brands preferred to be used for charging. |
preferredArrivalBatteryLevel | The percentage of battery capacity preferred when arriving at final destination. |
preferToChargeUponArrival | Prefer to select charge at destination |
preferredStartChargingBatteryLevel | The percentage of battery capacity preferred to start charging at charging stations. |
preferredStopChargingBatteryLevel | The percentage of battery capacity preferred to stop charging at charging stations. |
chargingStationBlocklist | A list of charging station entity IDs that will be avoided when selecting charging stations. |
Create a request
Request a ev trip route and disable charge station automatical selection
A route request is created through the route request builder, by providing at least the origin and destination, as shown in the example below.
Request a ev trip route and select charge station automatically
A route request is created through ev trip planner request builder, by providing at least the origin and destination and ChargingPlanPreference, as shown in the example below.
Request an EV route with multiple stops
Calculate an EV route
A request is processed through a task, which will finally provide the results through a callback. The callback includes an error code to indicate the general processing result. Also, a response will be provided with detailed routes if the calculation can be done properly. For more details, please refer to the corresponding section.
A sample of trigger an ev route.