ElectricVehicleOptions
public struct ElectricVehicleOptions : Hashable
These options define the parameters of the electric vehicle. Note: This is a beta release of this feature, so there could be a few bugs and unexpected behaviors. Related APIs may change for new releases without a deprecation process.
-
Ensure that the vehicle does not run out of energy along the way. Requires valid
battery_specifications. It also requires thatRouteOptions.optimizationMode=OptimizationMode.fastest,RouteOptions.speedCapInMetersPerSecondis not set, andAvoidanceOptionsis empty. Otherwise, this object is considered invalid. Setting this flag enables calculation of a route optimized for electric vehicles. Charging stations may be added along the route to ensure that the vehicle does not run out of energy along the way. It is especially useful for longer routes, because after all, charging stations are much less common than petrol stations.Note An
RoutingError.invalidParameteris generated when this option is set totruein casesdk.routing.RoutingEngine.import_routeis called. Defaults tofalse.Note Not supported for offline routing.
Note Only supported for car routing.
Declaration
Swift
public var ensureReachability: Bool -
Defines the preferred E-Mobility Service Providers. The The E-Mobility Service Provider Partner Ids can be received from https://www.here.com/docs/bundle/ev-charge-points-api-developer-guide/page/topics/resource-roamings.html An alternative way to get
partnerIdis theeMobilityServiceProviders.partnerIdas part ofHERE SDK Search. Maximum number of E-Mobility Service Providers is limited to 10. By default, all providers are used. Note Not yet supported for offline routing.Declaration
Swift
public var evMobilityServiceProviderPreferences: EVMobilityServiceProviderPreferences -
Defines the empirical consumption model. The model is used to calculate the energy consumption for the vehicle on a given route. Note Only one consumption model is supported per route.
Declaration
Swift
public var empiricalConsumptionModel: EmpiricalConsumptionModel? -
Defines the physical consumption model. The model is used to calculate the energy consumption for the vehicle on a given route. Note Only one consumption model is supported per route.
Declaration
Swift
public var physicalConsumptionModel: PhysicalConsumptionModel? -
Parameters that describe the electric vehicle’s battery. By default, it is set to
nil.Declaration
Swift
public var batterySpecifications: BatterySpecifications? -
init(ensureReachability:evMobilityServiceProviderPreferences: empiricalConsumptionModel: physicalConsumptionModel: batterySpecifications: ) Creates a new instance.
Parameters
- ensureReachability: Ensure that the vehicle does not run out of energy along the way.
Requires valid
battery_specifications. It also requires thatRouteOptions.optimizationMode=OptimizationMode.fastest,RouteOptions.speedCapInMetersPerSecondis not set, andAvoidanceOptionsis empty. Otherwise, this object is considered invalid. Setting this flag enables calculation of a route optimized for electric vehicles. Charging stations may be added along the route to ensure that the vehicle does not run out of energy along the way. It is especially useful for longer routes, because after all, charging stations are much less common than petrol stations.
Note An
RoutingError.invalidParameteris generated when this option is set totruein casesdk.routing.RoutingEngine.import_routeis called. Defaults tofalse.Note Not supported for offline routing.
Note Only supported for car routing.
- evMobilityServiceProviderPreferences: Defines the preferred E-Mobility Service Providers.
The The E-Mobility Service Provider Partner Ids can be received from
https://www.here.com/docs/bundle/ev-charge-points-api-developer-guide/page/topics/resource-roamings.html
An alternative way to get
partnerIdis theeMobilityServiceProviders.partnerIdas part ofHERE SDK Search. Maximum number of E-Mobility Service Providers is limited to 10. By default, all providers are used. Note Not yet supported for offline routing. - empiricalConsumptionModel: Defines the empirical consumption model. The model is used to calculate the energy consumption for the vehicle on a given route. Note Only one consumption model is supported per route.
- physicalConsumptionModel: Defines the physical consumption model. The model is used to calculate the energy consumption for the vehicle on a given route. Note Only one consumption model is supported per route.
- batterySpecifications: Parameters that describe the electric vehicle’s battery.
By default, it is set to
nil.
- ensureReachability: Ensure that the vehicle does not run out of energy along the way.
Requires valid
Declaration
Swift
public init(ensureReachability: Bool = false, evMobilityServiceProviderPreferences: EVMobilityServiceProviderPreferences = EVMobilityServiceProviderPreferences(), empiricalConsumptionModel: EmpiricalConsumptionModel? = nil, physicalConsumptionModel: PhysicalConsumptionModel? = nil, batterySpecifications: BatterySpecifications? = nil)