Interface FundamentalDiagram

  • All Known Implementing Classes:
    FundamentalDiagramImpl, NewellFundamentalDiagram

    public interface FundamentalDiagram
    The base interface for the Fundamental Diagram component type. Also specifies all out-of-the-box supported fundamental diagrams supported directly by PLANit and available for users to create and register on their chosen compatible assignments.
    Author:
    markr
    • Field Detail

      • NEWELL

        static final String NEWELL
        shorthand for Newell fundamental diagram class type
    • Method Detail

      • getCongestedBranch

        FundamentalDiagramBranch getCongestedBranch()
        Congested branch of the FD
        Returns:
        congested branch
      • getCapacityFlowPcuHour

        double getCapacityFlowPcuHour()
        Provide the capacity flow rate per hour
        Returns:
        capacity flow rate in pcu per hour
      • getMaximumDensityPcuKm

        default double getMaximumDensityPcuKm()
        Collect maximum viable density
        Returns:
        jam density pcu/km
      • getMaximumSpeedKmHour

        default double getMaximumSpeedKmHour()
        Collect maximum viable speed assuming the free flow branch is concave, so maximum speed occurs at zero density
        Returns:
        max speed km/h
      • relaxedHashCode

        int relaxedHashCode​(int scale)
        A fundamental diagram is based on a limited number of double variables to define it. In case we want to use the same FD for extremely similar variables we can use this relaxed hash code that ensures that for the given precision level identical hashes are created even if the underlying floating point variables differ beyond this precision.
        Parameters:
        scale - indicating how many decimals to consider, e.g., 2 considers 2 decimals for precision
        Returns:
        created relaxed hash code
      • shallowClone

        FundamentalDiagram shallowClone()
        Shallow copy of the fundamental diagram
        Returns:
        cloned instance
      • deepClone

        FundamentalDiagram deepClone()
        deep clone of fundamental diagram
        Returns:
        cloned instance
      • setCapacityPcuHour

        void setCapacityPcuHour​(double capacityPcuHour)
        Change the capacity to the new value
        Parameters:
        capacityPcuHour - to use
      • setMaximumDensityPcuKmHour

        void setMaximumDensityPcuKmHour​(double maxDensityPcuKm)
        Change the maximum density to the new value
        Parameters:
        maxDensityPcuKm - to use
      • setMaximumSpeedKmHour

        void setMaximumSpeedKmHour​(double maxSpeedKmHour)
        Change the maximum speed to the new value
        Parameters:
        maxSpeedKmHour - to use