Class AccessGroupPropertiesImpl

  • All Implemented Interfaces:
    Cloneable, AccessGroupProperties

    public class AccessGroupPropertiesImpl
    extends Object
    implements AccessGroupProperties
    Group of modes with specific properties for the macroscopic perspective on the supply side, i.e. on a link segment of a particular type. While the group specifies the allowed modes, it is not compulsory to define restricted maximum and or critical speeds. When absent context of the mode and links is to be used to determine the applied maximum speeds.
    Author:
    markr
    • Field Detail

      • maxSpeedKmH

        protected Double maxSpeedKmH
        Maximum speed of mode (tied to a road segment type) in km/h
      • criticalSpeedKmH

        protected Double criticalSpeedKmH
        Maximum speed of mode (tied to a road segment type) in km/h
      • supportedModes

        protected final Set<Mode> supportedModes
        modes supported by this access group
    • Constructor Detail

      • AccessGroupPropertiesImpl

        public AccessGroupPropertiesImpl​(Collection<Mode> accessModes)
        access properties with only defining allowed modes without setting any restrictive speeds compared to the physical speed on the links it is applied on
        Parameters:
        accessModes - to allow
      • AccessGroupPropertiesImpl

        public AccessGroupPropertiesImpl​(AccessGroupPropertiesImpl other)
        Copy constructor
        Parameters:
        other - to copy
    • Method Detail

      • removeAccessMode

        public boolean removeAccessMode​(Mode toBeRemovedMode)
        Remove access mode
        Specified by:
        removeAccessMode in interface AccessGroupProperties
        Parameters:
        toBeRemovedMode - the to be removed mode
        Returns:
        true when success, false otherwise
      • isEqualExceptForModes

        public boolean isEqualExceptForModes​(AccessGroupProperties accessProperties)
        Verify if equal to given properties except for the allowed modes
        Specified by:
        isEqualExceptForModes in interface AccessGroupProperties
        Parameters:
        accessProperties - to compare against
        Returns:
        true when deemed equal, false otherwise
      • addAccessMode

        public void addAccessMode​(Mode mode)
        Add mode to access group. Use with caution if registered on a link segment type, in which case adding the mode here is not sufficient since it also requires mode based indexing on the type. Better to use the link segment type methods to properly update the group access instead
        Specified by:
        addAccessMode in interface AccessGroupProperties
        Parameters:
        mode - to add