Interface Headway

    • Method Detail

      • getId

        String getId()
        Specified by:
        getId in interface Identifiable
        Returns:
        String; the id of the other object for comparison purposes, cannot be null.
      • getLength

        Length getLength()
        Returns:
        Length; the length of the other object; can be null if unknown.
      • getSpeed

        Speed getSpeed()
        Returns:
        Speed; the (perceived) speed of the other object; can be null if unknown.
      • getDistance

        Length getDistance()
        Retrieve the strongly typed distance to the other object.
        Returns:
        Length; the distance to the object, return value null indicates that the other object is parallel to the reference object
      • getObjectType

        Headway.ObjectType getObjectType()
        Returns:
        Length; the (perceived) object Type, can be null if no object type unknown.
      • getAcceleration

        Acceleration getAcceleration()
        Returns:
        Acceleration; acceleration the (perceived) acceleration of the other object; can be null if unknown.
      • getOverlapFront

        Length getOverlapFront()
        Return the (perceived) front overlap to the other object. This value should be null if there is no overlap. In the figure for two GTUs below, it is distance c, positive for GTU1, negative for GTU2.
         ----------
         |  GTU 1 |          ----->
         ----------
              ---------------
              |    GTU 2    |          ----->
              ---------------
         | a  | b |     c   |
         
        Returns:
        Length; the (perceived) front overlap to the other object or null if there is no overlap.
      • getOverlapRear

        Length getOverlapRear()
        Return the (perceived) rear overlap to the other object. This value should be null if there is no overlap.In the figure below for two GTUs, it is distance a, positive for GTU1, negative for GTU2.
         ----------
         |  GTU 1 |          ----->
         ----------
              ---------------
              |    GTU 2    |          ----->
              ---------------
         | a  | b |     c   |
         
        Returns:
        Length; the (perceived) rear overlap to the other object or null if there is no overlap.
      • getOverlap

        Length getOverlap()
        Return the (perceived) overlap with the other object. This value should be null if there is no overlap. In the figure below for two GTUs, it is distance b, positive for GTU1 and GTU2.
         ----------
         |  GTU 1 |          ----->
         ----------
              ---------------
              |    GTU 2    |          ----->
              ---------------
         | a  | b |     c   |
         
        Returns:
        Length, the (perceived) overlap with the other object or null if there is no overlap.
      • isAhead

        boolean isAhead()
        Returns:
        whether the other object is in front of the reference object.
      • isBehind

        boolean isBehind()
        Returns:
        whether the other object is behind the reference object.
      • isParallel

        boolean isParallel()
        Returns:
        whether the other object is parallel the reference object.