EV Trip Planner
EV Trip Planner
This feature will plan the best route with or without a charge station based on the current electric quantity. Before using this feature, you should set vehicle information, for details please refer to Set electric information.
Note: this feature only support offboard mode
Planner Request
Most of the parameters in an EvTripPlanningRequest are the same as those in a route request, like route preference,waypoints, heading,speed, origin, and destination. But there is an import parameter: tn::direction::models::v2::ChargingPlanPreference in the EV trip planner request.
ChargingPlanPreference
Parameter | description |
---|---|
enable_charging_planning | True: It will enable automatically charging station planning if current electricity can't arrive at the destination. False: Disable charge station planning automatically. |
strategy | 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. |
preferred_connector_types | The types of connector preferred to be used for charging. |
preferred_charger_brands | The charger brands preferred to be used for charging. |
preferred_arrival_battery_level | The percentage of battery capacity preferred when arriving at final destination. |
prefer_to_charge_upon_arrival | Prefer to select charge at destination |
preferred_start_charging_battery_level | The percentage of battery capacity preferred to start charging at charging stations. |
preferred_stop_charging_battery_level | The percentage of battery capacity preferred to stop charging at charging stations. |
charging_station_blocklist | 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. In the callback, an error code will be provided 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.