SubPathSearchOptions

class SubPathSearchOptions(val searchTime: Duration = DEFAULT_SUB_PATH_SEARCH_TIME, val searchDistance: PathSearchDistance = PathSearchDistance( maxHorizonLength = DEFAULT_SUB_PATH_MAX_HORIZON_LENGTH, ))

Horizon search options for a sub-path level.

These options specify the search distance and the search time for a sub-path level. The level of a sub-path is the number of times the user would have to deviate, starting from the main path, in order to reach that sub-path. The search distance and the search time define the extent of sub-paths of that level in the horizon.

To specify options for a sub-path level, create an instance of this class:

val subPathSearchOptionsLevel1 = SubPathSearchOptions(
searchTime = 5.minutes,
searchDistance = PathSearchDistance(
maxHorizonLength = Distance.kilometers(2)
)
)

For more information on horizon paths see HorizonEngine.

For more information on horizon options see HorizonOptions.

If both search time and search distance are specified (i.e., the options specify both a search time and a search distance) for a given sub-path level, the horizon engine extends horizon sub-paths of that level until both time and distance have reached the limit. If only the search distance is specified for a given sub-path level, the horizon engine works with a default value DEFAULT_SUB_PATH_SEARCH_TIME for the search time and extends the sub-paths of that level based on the search distance. If only the search time is specified for a given sub-path level, the horizon engine works with a default value of DEFAULT_SUB_PATH_MAX_HORIZON_LENGTH maximum extension length for the search distance and extends sub-paths of that level until both time and distance reach the limit.

To subscribe to sub-paths, numberOfPaths in HorizonOptions should be greater than 1.

Throws

Constructors

Link copied to clipboard
constructor(searchTime: Duration = DEFAULT_SUB_PATH_SEARCH_TIME, searchDistance: PathSearchDistance = PathSearchDistance( maxHorizonLength = DEFAULT_SUB_PATH_MAX_HORIZON_LENGTH, ))

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Path search time. The default value is DEFAULT_SUB_PATH_SEARCH_TIME.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String