Class RoutingOptions
Class RoutingOptions
- java.lang.Object
-
- com.here.sdk.routing.RoutingOptions
-
public final class RoutingOptions extends java.lang.ObjectThe options defines how a route should be calculated.
The options are used for all transport modes and engines.
** Electric vehicle specific requirements ** Electric vehicle consumption are estimated when at least one consumption model is defined. Currently two models are supported:
- PhysicalConsumptionModel
Aside from the values in PhysicalConsumptionModel additionally these values needs to be defined:
RoutingOptions.transport_specification.vehicle_specification.current_weight_in_kilograms- Additionally
Waypoint.currentWeightChangeInKilogramscan be defined.
- EmpiricalConsumptionModel
By setting
ElectricVehicleOptions.ensureReachabilitytheRoutingEngineinserts additional charging stations to reach the waypoints. This feature requires setting theBatterySpecifications. By default a vehicle might not reach the waypoint, when the initial charge is not enough to reach all waypoints. See the parameter description below for more details.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.
- PhysicalConsumptionModel
Aside from the values in PhysicalConsumptionModel additionally these values needs to be defined:
-
-
Field Summary
Fields Modifier and Type Field Description AllowOptionsallowOptionsThe options explicitly allowed by user for route calculations.AvoidanceOptionsavoidanceOptionsOptions to specify restrictions for route calculations.ElectricVehicleOptionsevOptionsDefines the electric vehicle (EV) related parameters to calculate the consumption and reachability.java.util.List<MaxSpeedOnSegment>maxSpeedOnSegmentsSegments with restriction on maximumDynamicSpeedInfo.baseSpeedInMetersPerSecond.RouteOptionsrouteOptionsSpecifies the common route calculation options.RouteTextOptionstextOptionsCustomize textual content returned from the route calculation, such as localization, format, and unit system.TollOptionstollOptionsOptions to specify how the tolls should be calculated, such as transponders, vehicle category, and emission type.TransportSpecificationtransportSpecificationDefines the transport specification which contains the transport mode and the vehicle specifications for the transport mode chosen.
-
Constructor Summary
Constructors Constructor Description RoutingOptions()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)inthashCode()
-
-
-
Field Detail
-
transportSpecification
@NonNull public TransportSpecification transportSpecification
Defines the transport specification which contains the transport mode and the vehicle specifications for the transport mode chosen. By default generic vehicle specifications for the chosen transport mode are used. Notes:
- The transport mode
TransportMode.PUBLIC_TRANSITis not supported. - It is highly recommended to define the
truckCategorythat is being used, if thetransportModeis set toTransportMode.TRUCK. - The
TransportSpecification.vehicleSpecification.occupancywon't have effect if HOV and/or HOT lane usage is not allowed usingEVTruckOptions.allowOptions. - The
TransportSpecification.pedestrianSpecification.walkSpeedInMetersPerSecondif present, will be used by the service as the walking speed for pedestrian routing. It influences the duration of walking along the route. The provided value must be in the range [0.5, 2.0]. When the value is outside this range, an invalid parameter error is raised. Refer toRoutingErrorfor details. The default speed is 1 meter per second.
- The transport mode
-
routeOptions
@NonNull public RouteOptions routeOptions
Specifies the common route calculation options.
-
textOptions
@NonNull public RouteTextOptions textOptions
Customize textual content returned from the route calculation, such as localization, format, and unit system.
-
avoidanceOptions
@NonNull public AvoidanceOptions avoidanceOptions
Options to specify restrictions for route calculations. By default no restrictions are applied.
-
allowOptions
@NonNull public AllowOptions allowOptions
The options explicitly allowed by user for route calculations. By default no options are opt in.
-
tollOptions
@NonNull public TollOptions tollOptions
Options to specify how the tolls should be calculated, such as transponders, vehicle category, and emission type. Note Not used for offline calculations.
-
maxSpeedOnSegments
@NonNull public java.util.List<MaxSpeedOnSegment> maxSpeedOnSegments
Segments with restriction on maximum
DynamicSpeedInfo.baseSpeedInMetersPerSecond. Note Not used for offline calculations.
-
evOptions
@Nullable public ElectricVehicleOptions evOptions
Defines the electric vehicle (EV) related parameters to calculate the consumption and reachability. When no EV options are defined an internal combustion engine is assumed.
-
-