Interface MacroscopicLinkSegment

    • Method Detail

      • isModeAllowed

        boolean isModeAllowed​(Mode mode)
        Returns whether vehicles of a specified mode are allowed through this link
        Parameters:
        mode - the specified mode
        Returns:
        true if vehicles of this mode can drive along this link, false otherwise
      • getAllowedModes

        Set<Mode> getAllowedModes()
        Returns the modes that are allowed on the link segment
        Returns:
        allowed modes
      • computeCapacityPcuH

        double computeCapacityPcuH()
        Return the total link segment capacity in pcu/h
        Returns:
        linkSegmentCapacity in PCU/h
      • computeFreeFlowTravelTime

        double computeFreeFlowTravelTime​(Mode mode)
        Compute the free flow travel time by mode, i.e. when the link's maximum speed might be capped by the mode's maximum speed If the input data are invalid, this method logs the problem and returns a negative value.
        Parameters:
        mode - mode of travel
        Returns:
        freeFlowTravelTime for this mode
      • getModelledSpeedLimitKmH

        double getModelledSpeedLimitKmH​(Mode mode)
        Collect the maximum speed limit for the mode by taking the minimum of: (i) physical speed limit, (ii) mode's maximum speed limit, (iii) link segment type's mode specific speed limit. It is possible the link segment type's mode specific speed limit exceeds the physical speed limit. This can happen when the user has assigned a type to the link that is less restrictive than the physical speed limit sign indicates It is also possible the link segment type's mode specific speed limit is more restrictive than the physical speed limit. For example when trucks are on a motorway and they have a designated lower speed limit. It is also possible the mode's global speed limit is more restrictive than the physical speed limit. For example when trucks are on a motorway and the physical speed limit exceeds the mode specific one Hence, it is important to always use this speed limit value when collecting speed limits, rather than collecting the physical, mode specific, or link type/mode specific speed limits
        Parameters:
        mode - to collect modelled maximum speed for
        Returns:
        modelled speed limit, when mode is not allowed on link, 0 is returned
      • setLinkSegmentType

        void setLinkSegmentType​(MacroscopicLinkSegmentType linkSegmentType)
        Set the link segment type this link segment adheres to
        Parameters:
        linkSegmentType - the link segment type
      • getLinkSegmentType

        MacroscopicLinkSegmentType getLinkSegmentType()
        Collect the link segment type of the link segment
        Returns:
        the link segment
      • hasLinkSegmentType

        default boolean hasLinkSegmentType()
        Verify if link segment type is present on the link segment
        Returns:
        true if present, false otherwise