Interface GtuHeadwayType

    • Field Detail

      • WRAP

        static final GtuHeadwayType WRAP
        The GTU is wrapped, and info is taken directly from it.
      • COPY

        static final GtuHeadwayType COPY
        Info regarding the GTU is copied.
    • Method Detail

      • createHeadwayGtu

        default GtuHeadway createHeadwayGtu​(InternalLaneBasedGtu perceivingGtu,
                                            LaneBasedGtu perceivedGtu,
                                            Length distance,
                                            boolean downstream)
                                     throws GtuException,
                                            ParameterException
        Creates a headway object from a GTU, downstream or upstream. The default implementation figures out from possible negative distance whether a parallel GTU should be created.
        Parameters:
        perceivingGtu - InternalLaneBasedGtu; perceiving GTU
        perceivedGtu - LaneBasedGtu; perceived GTU
        distance - Length; distance
        downstream - boolean; downstream (or upstream) neighbor
        Returns:
        headway object from a gtu
        Throws:
        GtuException - when headway object cannot be created
        ParameterException - on invalid parameter value or missing parameter
      • createParallelGtu

        GtuHeadway createParallelGtu​(InternalLaneBasedGtu perceivingGtu,
                                     LaneBasedGtu perceivedGtu,
                                     Length overlapFront,
                                     Length overlap,
                                     Length overlapRear)
                              throws GtuException
        Creates a headway object from a GTU, parallel.
        Parameters:
        perceivingGtu - InternalLaneBasedGtu; perceiving GTU
        perceivedGtu - LaneBasedGtu; perceived GTU
        overlapFront - Length; front overlap
        overlap - Length; overlap
        overlapRear - Length; rear overlap
        Returns:
        headway object from a gtu
        Throws:
        GtuException - when headway object cannot be created