Class MacroscopicLinkSegmentImpl

    • Field Detail

      • linkSegmentType

        protected MacroscopicLinkSegmentType linkSegmentType
        the link type of this link containing all macroscopic features by user class
    • Constructor Detail

      • MacroscopicLinkSegmentImpl

        protected MacroscopicLinkSegmentImpl​(IdGroupingToken groupId,
                                             Link parentLink,
                                             boolean directionAB)
                                      throws PlanItException
        Constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        parentLink - the parent link of this link segment
        directionAB - direction of travel
        Throws:
        PlanItException - thrown when error
      • MacroscopicLinkSegmentImpl

        protected MacroscopicLinkSegmentImpl​(MacroscopicLinkSegmentImpl macroscopicLinkSegmentImpl)
        Copy constructor
        Parameters:
        macroscopicLinkSegmentImpl - to copy
    • Method Detail

      • computeFreeFlowTravelTimeHour

        public 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
        Specified by:
        computeFreeFlowTravelTimeHour in interface MacroscopicLinkSegment
        Parameters:
        mode - mode of travel
        Returns:
        freeFlowTravelTime for this mode
      • isModeAllowed

        public boolean isModeAllowed​(Mode mode)
        Returns whether vehicles of a specified mode are allowed through this link
        Specified by:
        isModeAllowed in interface MacroscopicLinkSegment
        Parameters:
        mode - the specified mode
        Returns:
        true if vehicles of this mode can drive along this link, false otherwise