SubPathSearchOptions
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_MAX_HORIZON_SUB_PATH_LENGTH maximum extension length for the search distance and extends sub-paths of that level until both time and distance reach the limit.
Important: This is a Public Preview API. It may be changed or removed at any time.
Throws
if searchTime is negative or searchDistance is invalid.
Constructors
Properties
Path search distance. The default value is PathSearchDistance (DEFAULT_MAX_HORIZON_SUB_PATH_LENGTH).
Path search time. The default value is DEFAULT_SUB_PATH_SEARCH_TIME.