Class RoutedTripFrequencyUtils


  • public class RoutedTripFrequencyUtils
    extends Object
    Utilities for RoutedTripFrequency class
    Author:
    markr
    • Constructor Detail

      • RoutedTripFrequencyUtils

        public RoutedTripFrequencyUtils()
    • Method Detail

      • isRoutedTripFrequencyMappedToServiceNetwork

        public static boolean isRoutedTripFrequencyMappedToServiceNetwork​(RoutedTripFrequency routedTripFrequency,
                                                                          ServiceNetworkLayer serviceNetworkLayer)
        Verify if all the routed frequency's leg segments are mapped to the service network, i.e., its service leg segments and their service nodes also exist on the service network containers. Can be used to identify invalidated routed trip frequensies in case service network has been modified and routed trip frequencies were not simultaneously updated (for some reason).
        Parameters:
        routedTripFrequency - to verify
        serviceNetworkLayer - the service network to check against
        Returns:
        true when mapped service network references exist and are valid, false otherwise
      • findServiceLegSegmentsNotMappedToServiceNetwork

        public static List<Integer> findServiceLegSegmentsNotMappedToServiceNetwork​(RoutedTripFrequency routedTripFrequency,
                                                                                    ServiceNetworkLayer serviceNetworkLayer)
        Identify which service leg segments that make up the routed trip frequency are in fact not valid anymore due to being absent in the provided service network
        Parameters:
        routedTripFrequency - to check
        serviceNetworkLayer - to use for cross-referencing validity of mapping
        Returns:
        ascending ordered list of service leg segment indices that are not present in the service network