Interface LinkSegment

    • Field Detail

      • DEFAULT_NUMBER_OF_LANES

        static final short DEFAULT_NUMBER_OF_LANES
        Default number of lanes
        See Also:
        Constant Field Values
      • DEFAULT_MAX_SPEED

        static final double DEFAULT_MAX_SPEED
        Default maximum speed on a link segment
        See Also:
        Constant Field Values
      • MAXIMUM_DENSITY

        static final double MAXIMUM_DENSITY
        Default maximum link density
        See Also:
        Constant Field Values
    • Method Detail

      • getLinkSegmentId

        long getLinkSegmentId()
        Return id of this instance. This id is expected to be generated using the org.planit.utils.misc.IdGenerator
        Returns:
        link segment id
      • getNumberOfLanes

        int getNumberOfLanes()
        Collect the number of lanes of this segment
        Returns:
        number of lanes
      • setNumberOfLanes

        void setNumberOfLanes​(int numberOfLanes)
        Set the number of lanes
        Parameters:
        numberOfLanes - to set
      • getMaximumSpeed

        double getMaximumSpeed​(Mode mode)
        Return the maximum speed along this link for a specified mode
        Parameters:
        mode - the specified mode
        Returns:
        maximum speed along this link for the specified mode
      • setMaximumSpeed

        void setMaximumSpeed​(Mode mode,
                             double maximumSpeed)
        Set the maximum speed along this link for a specified mode
        Parameters:
        mode - the specified mode
        maximumSpeed - maximum speed along this link for the specified mode
      • getParentLink

        Link getParentLink()
        Return the parent link of this link segment
        Returns:
        Link object which is the parent of this link segment
      • isModeAllowedThroughLink

        boolean isModeAllowedThroughLink​(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