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

      • computeCapacityPcuH

        public double computeCapacityPcuH()
        Return the total capacity Compute the total capacity by multiplying the capacity per lane and number of lanes
        Specified by:
        computeCapacityPcuH in interface MacroscopicLinkSegment
        Returns:
        linkSegmentCapacity in PCU/h
      • computeFreeFlowTravelTime

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

        public 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
        Specified by:
        getModelledSpeedLimitKmH in interface MacroscopicLinkSegment
        Parameters:
        mode - to collect modelled maximum speed for
        Returns:
        modelled speed limit, when mode is not allowed on link, 0 is returned
      • 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