HERE iOS SDK Developer's Guide

NMARouteConsumption

Class Summary

class NMARouteConsumption

Derived from: NSObject

Represents a handler of a route consumption model.

Include: NMAKit.framework/headers/NMARouteConsumption.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMARouteConsumption

[For complete information, see the section Class Details]

See also:

NMARouteConsumptionParameters

NMADynamicPenalty

Instance Method Summary

Table 1. Instance Methods
Instance Method Summary

-(NSUInteger) firstAvailableConsumptionIndex

Provides the index of the first element with consumption available

-(NSInteger) getConsumptionWithIndex:(NSUInteger) index

Returns the consumption value according to the given route element index

-(nonnull instancetype) init

Class Method Summary

Table 2. Class Methods
Class Methods

+(nonnull instancetype) new

Class Details

Represents a handler of a route consumption model.

A route consumption model is route-specific. It describes consumption behaviour based on vehicle consumption parameters and the route's possible penalties. This model is needed to provide accurate energy consumption results when the route is calculated.

An NMARouteConsumption can be reused for multiple calculations with the same route.

IMPORTANT: Consumption calculation is a Beta feature. The related classes and methods are subject to change without notice.

Note:

You do not create instances of this class directly - use -consumptionWithParameters:dynamicPenalty: on NMARoute instead.

See also:

NMARouteConsumptionParameters

NMADynamicPenalty

Instance Method Details

-(NSUInteger) firstAvailableConsumptionIndex

Provides the index of the first element with consumption available. This index corresponds to the indexes in the array of route elements returned by NMARoute::routeElements.

Returns:

Index of the route element

-(NSInteger) getConsumptionWithIndex:(NSUInteger) index

Returns the consumption value according to the given route element index. These indexes correspond to the indexes in the array of route elements returned by NMARoute::routeElements.

Returns zero when index is out of range or less then first available consumption index (see firstAvailableConsumptionIndex).

Parameters:

  • index

    Index of the route element.

Returns:

Consumption value in capacity units if available, or 0 otherwise.

-(nonnull instancetype) init

Instances of this class should not be initialized directly

Class Method Details

+(nonnull instancetype) new

Instances of this class should not be initialized directly