Class ConnectIfInLineOfSigthOnMap

  • All Implemented Interfaces:
    it.unibo.alchemist.model.LinkingRule , java.io.Serializable

    
    public final class ConnectIfInLineOfSigthOnMap<T extends Object>
    extends AbstractLocallyConsistentLinkingRule<T, 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).

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Double getMaxRange()
      final Double getTolerance()
      Neighborhood<T> computeNeighborhood(Node<T> center, Environment<T, GeoPosition> environment)
      • Methods inherited from class it.unibo.alchemist.model.linkingrules.AbstractLocallyConsistentLinkingRule

        isLocallyConsistent, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait