ConnectIfInLineOfSigthOnMap

class ConnectIfInLineOfSigthOnMap<T> @JvmOverloads constructor(environment: Environment<T, GeoPosition>, val maxRange: Double, val tolerance: Double = 0.1) : ObservingRangeBasedNetworkModel<T, GeoPosition, GeoPosition>

This rule connects nodes that are within maxRange distance, but only if there are not too many obstacles separating their line of sight. The base idea is that line-of-sight distance and routing distance should not differ "too much", as captured by tolerance. tolerance measures the maximum allowed relative difference between the line-of-sight and the route distance. It's default 0.1 (10%) means that if LOS-distance is more than 10% shorter than route-distance, then the nodes are considered disconnected. Route distance is taken two-ways (to account for one-way roads) and the shortest one is considered (wireless signals do not need to follow one-way roads).

Constructors

Link copied to clipboard
constructor(environment: Environment<T, GeoPosition>, maxRange: Double, tolerance: Double = 0.1)

Properties

Link copied to clipboard
Link copied to clipboard

The neighborhood of this node, as provided by neighborhoodOf.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun neighborhoodOf(center: Node<T>): Observable<Neighborhood<T>>

The neighborhood of center, a node of the environment of this model, as an observable of immutable snapshots that emits whenever the neighborhood changes.

Link copied to clipboard
infix fun NetworkModel<*>.shouldEqual(other: NetworkModel<*>)
Link copied to clipboard
override fun toString(): String