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
      • computeFreeFlowTravelTimeHour

        double computeFreeFlowTravelTimeHour​(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. In case the mode is not supported the maximum possible double value is returned as the free flow travel time
        Parameters:
        mode - mode of travel
        Returns:
        freeFlowTravelTime for this mode
      • getModelledSpeedLimitKmH

        default 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
      • getAllowedModesFrom

        default Set<Mode> getAllowedModesFrom​(Collection<Mode> modes)
        collect the allowed modes from the passed in modes
        Parameters:
        modes - to choose from
        Returns:
        allowed modes
      • getCapacityOrDefaultPcuH

        default double getCapacityOrDefaultPcuH()
        Collect the explicitly available/set capacity in PCU/hour. In case no explicit capacity is provided a default is to be returned
        Specified by:
        getCapacityOrDefaultPcuH in interface PcuCapacitated
        Returns:
        capacity in PCu/h
      • getCapacityOrDefaultPcuHLane

        default double getCapacityOrDefaultPcuHLane()
        Collect the explicitly available/set capacity in PCU/hour/lane. In case no explicit capacity is provided a default is to be returned
        Specified by:
        getCapacityOrDefaultPcuHLane in interface PcuCapacitated
        Returns:
        capacity in PCu/h