Class NewellFundamentalDiagramComponent

    • Constructor Detail

      • NewellFundamentalDiagramComponent

        public NewellFundamentalDiagramComponent​(IdGroupingToken groupId)
        Constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
      • NewellFundamentalDiagramComponent

        public NewellFundamentalDiagramComponent​(NewellFundamentalDiagramComponent other,
                                                 boolean deepCopy)
        Copy constructor
        Parameters:
        other - to copy
        deepCopy - when true, create a deep copy, shallow copy otherwise
    • Method Detail

      • initialiseDefaultFundamentalDiagramsForLayer

        protected void initialiseDefaultFundamentalDiagramsForLayer​(MacroscopicNetworkLayer parentNetworkLayer)
        Populate the fundamental diagram component with FDs for each link segment type. We do not generate any specifically for a link segment unless the physical speed limit of the link is more restrictive than the one posted in the type. This however is rare and will also trigger a warning to the user. The user can then further change the used Fds via the configurator if desired.

        It will generate all fundamental diagrams per macroscopic link segment type. In case the fundamental diagrams can be constructed based solely on physical characteristics, i.e., free speed, we do so. If the registered link segment types explicitly require a particular capacity to be used than the estimated capacity of the FD is overruled with the one of the type (or if the FD cannot derive its capacity from physical characteristics, in which case either the set or default capacity of the link segment type is used).

        Specified by:
        initialiseDefaultFundamentalDiagramsForLayer in class FundamentalDiagramComponent
        Parameters:
        parentNetworkLayer - to use
      • register

        public FundamentalDiagram register​(MacroscopicLinkSegment linkSegment,
                                           NewellFundamentalDiagram fundamentalDiagram)
        Register the given Newell fundamental diagram for the link segment. This overrules the fundamental diagram that would be used based on the link segment's type. In case there already exists an identical fundamental diagram (based on relaxed hashcode comparison), the link segment is assigned the already present fundamental diagram. The fundamental diagram used for the link segment is returned, which is either the passed in one, or an already present functionally identical version
        Parameters:
        linkSegment - to use
        fundamentalDiagram - to register
        Returns:
        used Fd for the link segment, can be different (but functionally equivalent) if registered Fd was already present for another link segment
      • register

        public FundamentalDiagram register​(MacroscopicLinkSegmentType linkSegmentType,
                                           NewellFundamentalDiagram fundamentalDiagram)
        Register the given Newell fundamental diagram for the link segment type. In case there already exists an identical fundamental diagram (based on relaxed hashcode comparison), the link segment type is assigned the already present fundamental diagram. The fundamental diagram used for the link segment type is returned, which is either the passed in one, or an already present functionally identical version
        Parameters:
        linkSegmentType - to use
        fundamentalDiagram - to register
        Returns:
        used Fd for the link segment type, can be different (but functionally equivalent) if registered Fd was already present for another link segment