Class MacroscopicModePropertiesFactory


  • public class MacroscopicModePropertiesFactory
    extends Object
    Create Mode specific properties for the macroscopic perspective on the supply side, i.e. on a link segment of a particular type
    Author:
    markr
    • Constructor Detail

      • MacroscopicModePropertiesFactory

        public MacroscopicModePropertiesFactory()
    • Method Detail

      • create

        public static MacroscopicModeProperties create​(double maxSpeedKmH,
                                                       double criticalSpeedKmH)
        factory method
        Parameters:
        maxSpeedKmH - maximum speed for this mode in this context
        criticalSpeedKmH - critical speed for this mode in this context
        Returns:
        created properties
      • create

        public static MacroscopicModeProperties create​(double maxSpeedKmH)
        factory method adopting default value for critical speed
        Parameters:
        maxSpeedKmH - maximum speed for this mode in this context
        Returns:
        created properties
      • create

        public static MacroscopicModeProperties create()
        factory method adopting default values
        Returns:
        created properties
      • createOnLinkSegmentType

        public static void createOnLinkSegmentType​(MacroscopicLinkSegmentType linkSegmentType,
                                                   Collection<Mode> modesToAdd,
                                                   double maxSpeedKmH)
        add mode properties for the passed in modes to the passed in link segment type where we cap the max and critical speed based on the minimum of the mode's maximum speed and the osmway type's maximum speed
        Parameters:
        linkSegmentType - to populate for
        modesToAdd - to add
        maxSpeedKmH - maxSpeed to set
      • createOnLinkSegmentType

        public static void createOnLinkSegmentType​(MacroscopicLinkSegmentType linkSegmentType,
                                                   Mode modeToAdd,
                                                   double maxSpeedKmH)
        add mode properties for the passed in modes to the passed in link segment type where we cap the max and critical speed based on the minimum of the mode's maximum speed and the osmway type's maximum speed
        Parameters:
        linkSegmentType - to populate for
        modeToAdd - to add
        maxSpeedKmH - maxSpeed to set