Class RoutedTripFrequencyUtils
- java.lang.Object
-
- org.goplanit.utils.service.routed.RoutedTripFrequencyUtils
-
public class RoutedTripFrequencyUtils extends Object
Utilities for RoutedTripFrequency class- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description RoutedTripFrequencyUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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 networkstatic 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.
-
-
-
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 verifyserviceNetworkLayer
- 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 checkserviceNetworkLayer
- 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
-
-