Class RouterBase
The base-class for generic routing functionality.
Inheritance
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public abstract class RouterBase
Properties
Db
ProfileFactorAndSpeedCache
Gets or sets the profile factor and speed cache.
Declaration
public ProfileFactorAndSpeedCache ProfileFactorAndSpeedCache { get; set; }
Property Value
|
ProfileFactorAndSpeedCache
|
VerifyAllStoppable
Flag to check all resolved points if stopping at the resolved location is possible.
Declaration
public bool VerifyAllStoppable { get; set; }
Property Value
|
System.Boolean
|
Methods
BuildRoute<T>(IProfileInstance, WeightHandler<T>, RouterPoint, RouterPoint, EdgePath<T>)
Builds a route based on a raw path.
Declaration
public Result<Route> BuildRoute<T>(IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint source, RouterPoint target, EdgePath<T> path)where T : struct
Parameters
|
IProfileInstance
profile
|
|
WeightHandler<T>
weightHandler
|
|
RouterPoint
source
|
|
RouterPoint
target
|
|
EdgePath<T>
path
|
Returns
|
Result<Route>
|
Type Parameters
|
T
|
BuildRoute<T>(IProfileInstance, WeightHandler<T>, RouterPoint, RouterPoint, EdgePath<T>, CancellationToken)
Builds a route based on a raw path.
Declaration
public abstract Result<Route> BuildRoute<T>(IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint source, RouterPoint target, EdgePath<T> path, CancellationToken cancellationToken)where T : struct
Parameters
|
IProfileInstance
profile
|
|
WeightHandler<T>
weightHandler
|
|
RouterPoint
source
|
|
RouterPoint
target
|
|
EdgePath<T>
path
|
|
CancellationToken
cancellationToken
|
Returns
|
Result<Route>
|
Type Parameters
|
T
|
TryCalculateRaw<T>(IProfileInstance, WeightHandler<T>, RouterPoint, RouterPoint, RoutingSettings<T>)
Calculates a route between the two locations.
Declaration
public Result<EdgePath<T>> TryCalculateRaw<T>(IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint source, RouterPoint target, RoutingSettings<T> settings = null)where T : struct
Parameters
|
IProfileInstance
profile
|
|
WeightHandler<T>
weightHandler
|
|
RouterPoint
source
|
|
RouterPoint
target
|
|
RoutingSettings<T>
settings
|
Returns
|
Result<EdgePath<T>>
|
Type Parameters
|
T
|
TryCalculateRaw<T>(IProfileInstance, WeightHandler<T>, RouterPoint, RouterPoint, RoutingSettings<T>, CancellationToken)
Calculates a route between the two locations.
Declaration
public abstract Result<EdgePath<T>> TryCalculateRaw<T>(IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint source, RouterPoint target, RoutingSettings<T> settings, CancellationToken cancellationToken)where T : struct
Parameters
|
IProfileInstance
profile
|
|
WeightHandler<T>
weightHandler
|
|
RouterPoint
source
|
|
RouterPoint
target
|
|
RoutingSettings<T>
settings
|
|
CancellationToken
cancellationToken
|
Returns
|
Result<EdgePath<T>>
|
Type Parameters
|
T
|
TryCalculateRaw<T>(IProfileInstance, WeightHandler<T>, RouterPoint, Nullable<Boolean>, RouterPoint, Nullable<Boolean>, RoutingSettings<T>)
Calculates a route between the two locations, attempts to start/end in the requested directions.
Declaration
public Result<EdgePath<T>> TryCalculateRaw<T>(IProfileInstance profileInstance, WeightHandler<T> weightHandler, RouterPoint source, bool ? sourceForward, RouterPoint target, bool ? targetForward, RoutingSettings<T> settings)where T : struct
Parameters
|
IProfileInstance
profileInstance
|
|
WeightHandler<T>
weightHandler
|
|
RouterPoint
source
|
|
System.Nullable<System.Boolean>
sourceForward
|
|
RouterPoint
target
|
|
System.Nullable<System.Boolean>
targetForward
|
|
RoutingSettings<T>
settings
|
Returns
|
Result<EdgePath<T>>
|
Type Parameters
|
T
|
TryCalculateRaw<T>(IProfileInstance, WeightHandler<T>, RouterPoint, Nullable<Boolean>, RouterPoint, Nullable<Boolean>, RoutingSettings<T>, CancellationToken)
Calculates a route between the two locations, attempts to start/end in the requested directions.
Declaration
public abstract Result<EdgePath<T>> TryCalculateRaw<T>(IProfileInstance profileInstance, WeightHandler<T> weightHandler, RouterPoint source, bool ? sourceForward, RouterPoint target, bool ? targetForward, RoutingSettings<T> settings, CancellationToken cancellationToken)where T : struct
Parameters
|
IProfileInstance
profileInstance
|
|
WeightHandler<T>
weightHandler
|
|
RouterPoint
source
|
|
System.Nullable<System.Boolean>
sourceForward
|
|
RouterPoint
target
|
|
System.Nullable<System.Boolean>
targetForward
|
|
RoutingSettings<T>
settings
|
|
CancellationToken
cancellationToken
|
Returns
|
Result<EdgePath<T>>
|
Type Parameters
|
T
|
TryCalculateRaw<T>(IProfileInstance, WeightHandler<T>, RouterPoint[], RouterPoint[], RoutingSettings<T>)
Calculates all routes between all sources and all targets.
Declaration
public Result<EdgePath<T>[][]> TryCalculateRaw<T>(IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint[] sources, RouterPoint[] targets, RoutingSettings<T> settings = null)where T : struct
Parameters
|
IProfileInstance
profile
|
|
WeightHandler<T>
weightHandler
|
|
RouterPoint[]
sources
|
|
RouterPoint[]
targets
|
|
RoutingSettings<T>
settings
|
Returns
|
Result<EdgePath<T>[][]>
|
Type Parameters
|
T
|
TryCalculateRaw<T>(IProfileInstance, WeightHandler<T>, RouterPoint[], RouterPoint[], RoutingSettings<T>, CancellationToken)
Calculates all routes between all sources and all targets.
Declaration
public abstract Result<EdgePath<T>[][]> TryCalculateRaw<T>(IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint[] sources, RouterPoint[] targets, RoutingSettings<T> settings, CancellationToken cancellationToken)where T : struct
Parameters
|
IProfileInstance
profile
|
|
WeightHandler<T>
weightHandler
|
|
RouterPoint[]
sources
|
|
RouterPoint[]
targets
|
|
RoutingSettings<T>
settings
|
|
CancellationToken
cancellationToken
|
Returns
|
Result<EdgePath<T>[][]>
|
Type Parameters
|
T
|
TryCalculateRaw<T>(IProfileInstance, WeightHandler<T>, Int64, Int64, RoutingSettings<T>)
Calculates a route between the two directed edges. The route starts in the direction of the edge and ends with an arrive in the direction of the target edge.
Declaration
public Result<EdgePath<T>> TryCalculateRaw<T>(IProfileInstance profile, WeightHandler<T> weightHandler, long sourceDirectedEdge, long targetDirectedEdge, RoutingSettings<T> settings = null)where T : struct
Parameters
|
IProfileInstance
profile
|
|
WeightHandler<T>
weightHandler
|
|
System.Int64
sourceDirectedEdge
|
|
System.Int64
targetDirectedEdge
|
|
RoutingSettings<T>
settings
|
Returns
|
Result<EdgePath<T>>
|
Type Parameters
|
T
|
TryCalculateRaw<T>(IProfileInstance, WeightHandler<T>, Int64, Int64, RoutingSettings<T>, CancellationToken)
Calculates a route between the two directed edges. The route starts in the direction of the edge and ends with an arrive in the direction of the target edge.
Declaration
public abstract Result<EdgePath<T>> TryCalculateRaw<T>(IProfileInstance profile, WeightHandler<T> weightHandler, long sourceDirectedEdge, long targetDirectedEdge, RoutingSettings<T> settings, CancellationToken cancellationToken)where T : struct
Parameters
|
IProfileInstance
profile
|
|
WeightHandler<T>
weightHandler
|
|
System.Int64
sourceDirectedEdge
|
|
System.Int64
targetDirectedEdge
|
|
RoutingSettings<T>
settings
|
|
CancellationToken
cancellationToken
|
Returns
|
Result<EdgePath<T>>
|
Type Parameters
|
T
|
TryCalculateWeight<T>(IProfileInstance, WeightHandler<T>, RouterPoint[], RouterPoint[], ISet<Int32>, ISet<Int32>, RoutingSettings<T>)
Calculates all weights between all sources and all targets.
Declaration
public Result<T[][]> TryCalculateWeight<T>(IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint[] sources, RouterPoint[] targets, ISet<int> invalidSources, ISet<int> invalidTargets, RoutingSettings<T> settings = null)where T : struct
Parameters
|
IProfileInstance
profile
|
|
WeightHandler<T>
weightHandler
|
|
RouterPoint[]
sources
|
|
RouterPoint[]
targets
|
|
ISet<System.Int32>
invalidSources
|
|
ISet<System.Int32>
invalidTargets
|
|
RoutingSettings<T>
settings
|
Returns
|
Result<T[][]>
|
Type Parameters
|
T
|
TryCalculateWeight<T>(IProfileInstance, WeightHandler<T>, RouterPoint[], RouterPoint[], ISet<Int32>, ISet<Int32>, RoutingSettings<T>, CancellationToken)
Calculates all weights between all sources and all targets.
Declaration
public abstract Result<T[][]> TryCalculateWeight<T>(IProfileInstance profile, WeightHandler<T> weightHandler, RouterPoint[] sources, RouterPoint[] targets, ISet<int> invalidSources, ISet<int> invalidTargets, RoutingSettings<T> settings, CancellationToken cancellationToken)where T : struct
Parameters
|
IProfileInstance
profile
|
|
WeightHandler<T>
weightHandler
|
|
RouterPoint[]
sources
|
|
RouterPoint[]
targets
|
|
ISet<System.Int32>
invalidSources
|
|
ISet<System.Int32>
invalidTargets
|
|
RoutingSettings<T>
settings
|
|
CancellationToken
cancellationToken
|
Returns
|
Result<T[][]>
|
Type Parameters
|
T
|
TryCheckConnectivity(IProfileInstance, RouterPoint, Single, Nullable<Boolean>)
Checks if the given point is connected to the rest of the network. Use this to detect points on routing islands.
Declaration
public Result<bool> TryCheckConnectivity(IProfileInstance profile, RouterPoint point, float radiusInMeter, bool ? forward = default (bool ? ))
Parameters
|
IProfileInstance
profile
|
|
RouterPoint
point
|
|
System.Single
radiusInMeter
The radius metric, that's always a distance. |
|
System.Nullable<System.Boolean>
forward
|
Returns
|
Result<System.Boolean>
|
TryCheckConnectivity(IProfileInstance, RouterPoint, Single, Nullable<Boolean>, CancellationToken)
Checks if the given point is connected to the rest of the network. Use this to detect points on routing islands.
Declaration
public abstract Result<bool> TryCheckConnectivity(IProfileInstance profile, RouterPoint point, float radiusInMeter, bool ? forward, CancellationToken cancellationToken)
Parameters
|
IProfileInstance
profile
|
|
RouterPoint
point
|
|
System.Single
radiusInMeter
The radius metric, that's always a distance. |
|
System.Nullable<System.Boolean>
forward
|
|
CancellationToken
cancellationToken
|
Returns
|
Result<System.Boolean>
|
TryResolve(IProfileInstance[], Single, Single, Func<RoutingEdge, Boolean>, Single, ResolveSettings)
Searches for the closest point on the routing network that's routable for the given profiles.
Declaration
public Result<RouterPoint> TryResolve(IProfileInstance[] profiles, float latitude, float longitude, Func<RoutingEdge, bool> isBetter, float searchDistanceInMeter = 50F, ResolveSettings settings = null)
Parameters
|
IProfileInstance[]
profiles
|
|
System.Single
latitude
|
|
System.Single
longitude
|
|
Func<RoutingEdge, System.Boolean>
isBetter
|
|
System.Single
searchDistanceInMeter
|
|
ResolveSettings
settings
|
Returns
|
Result<RouterPoint>
|
TryResolve(IProfileInstance[], Single, Single, Func<RoutingEdge, Boolean>, Single, ResolveSettings, CancellationToken)
Searches for the closest point on the routing network that's routable for the given profiles.
Declaration
public abstract Result<RouterPoint> TryResolve(IProfileInstance[] profiles, float latitude, float longitude, Func<RoutingEdge, bool> isBetter, float searchDistanceInMeter, ResolveSettings settings, CancellationToken cancellationToken)
Parameters
|
IProfileInstance[]
profiles
|
|
System.Single
latitude
|
|
System.Single
longitude
|
|
Func<RoutingEdge, System.Boolean>
isBetter
|
|
System.Single
searchDistanceInMeter
|
|
ResolveSettings
settings
|
|
CancellationToken
cancellationToken
|
Returns
|
Result<RouterPoint>
|