RouteOptions

data class RouteOptions(val avoidFlags: Set<String> = setOf(), val attachEndpointsToAllowedPathsOnly: Boolean = false, val originSpurStrategy: PathNetwork.RouteOptions.EndpointSpurStrategy = EndpointSpurStrategy.CURVED, val destinationSpurStrategy: PathNetwork.RouteOptions.EndpointSpurStrategy = EndpointSpurStrategy.CURVED)

Configuration options for route calculation.

RouteOptions allows the specification of flags to avoid during route calculation.

Since

0.0.86

Constructors

Link copied to clipboard
constructor(avoidFlags: Set<String> = setOf(), attachEndpointsToAllowedPathsOnly: Boolean = false, originSpurStrategy: PathNetwork.RouteOptions.EndpointSpurStrategy = EndpointSpurStrategy.CURVED, destinationSpurStrategy: PathNetwork.RouteOptions.EndpointSpurStrategy = EndpointSpurStrategy.CURVED)

Types

Link copied to clipboard

The possible strategies to use to attach a route endpoint to the path network.

Properties

Link copied to clipboard

Each of the route's endpoints joins the path network at its closest vertex on its level. When true, a vertex is skipped if every path leaving it, for the start, or entering it, for a destination, has a flag in avoidFlags. Paths that run both ways count as both. When false, the closest vertex is always used, which usually makes the route RouteResult.Failure.Unreachable if all its paths are avoided. If no vertex qualifies, the route is RouteResult.Failure.OriginNotOnPaths or RouteResult.Failure.DestinationsNotOnPaths.

Link copied to clipboard

A set of flags indicating path types or areas to avoid during routing

Link copied to clipboard

The mechanism to use to attach the route's destination to the path network.

Link copied to clipboard

The mechanism to use to attach the route's origin to the path network.