Class GtfsServicesAndZoningIntegratorData
- java.lang.Object
-
- org.goplanit.gtfs.converter.intermodal.GtfsServicesAndZoningIntegratorData
-
public class GtfsServicesAndZoningIntegratorData extends Object
Data for integration where we create some local mappings based on the mode mapping from the settings among other things
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GtfsServicesAndZoningIntegratorData(ServiceNetwork serviceNetwork, RoutedServices routedServices, Zoning zoning, GtfsIntermodalReaderSettings settings)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Mode>
expandWithCompatibleModes(Mode planitMode)
Expand the mode to all compatible modes (if any) including the mode itselfCollection<Mode>
getActivatedPlanitModes()
activated planit modes, note that initialise should have been called before this is populatedList<Mode>
getCompatiblePlanitModesIfActivated(RouteType gtfsMode)
Collect PLANit modes if it is known as being activated and compatible, otherwise return nullSet<Mode>
getCompatiblePlanitModesIfActivated(Mode planitMode)
Collect compatible PLANit modes from a given PLANit mode (if any).Set<DirectedConnectoid>
getConnectoidsByAccessZone(TransferZone transferZone)
Mode
getExpectedModeForServiceLeg(ServiceLeg serviceLeg)
Determine the expected mode to be used for a given service legMode
getPrimaryPlanitModeIfActivated(RouteType gtfsMode)
Collect PLANit mode if it is known as being activated, otherwise return nullServiceNetwork
getServiceNetwork()
Access to the service networkGtfsIntermodalReaderSettings
getSettings()
ShortestPathAStar
getShortestPathAlgoByMode(Mode mode)
Shortest path algorithm by mode initialised with the costs for that mode per link segment, requiresinitialise()
to be invoked beforehandZoning
getZoning()
void
initialise()
Initialise before start of integration on the owner of this instance.void
reset()
-
-
-
Constructor Detail
-
GtfsServicesAndZoningIntegratorData
protected GtfsServicesAndZoningIntegratorData(ServiceNetwork serviceNetwork, RoutedServices routedServices, Zoning zoning, GtfsIntermodalReaderSettings settings)
Constructor- Parameters:
serviceNetwork
- to useroutedServices
- to usezoning
- to usesettings
- to extract mode mapping from
-
-
Method Detail
-
initialise
public void initialise()
Initialise before start of integration on the owner of this instance. Only after initialisation the available public getters/settings can be used
-
getServiceNetwork
public ServiceNetwork getServiceNetwork()
Access to the service network- Returns:
- the service network being populated
-
getZoning
public Zoning getZoning()
-
getActivatedPlanitModes
public Collection<Mode> getActivatedPlanitModes()
activated planit modes, note that initialise should have been called before this is populated- Returns:
- activated planit mode instances including predefined mode versions
-
getExpectedModeForServiceLeg
public Mode getExpectedModeForServiceLeg(ServiceLeg serviceLeg)
Determine the expected mode to be used for a given service leg- Parameters:
serviceLeg
- to find mode for based on routed services that use it- Returns:
- mode, null if entry does not exist
-
getPrimaryPlanitModeIfActivated
public Mode getPrimaryPlanitModeIfActivated(RouteType gtfsMode)
Collect PLANit mode if it is known as being activated, otherwise return null- Parameters:
gtfsMode
- to check for- Returns:
- PLANit mode
-
getCompatiblePlanitModesIfActivated
public List<Mode> getCompatiblePlanitModesIfActivated(RouteType gtfsMode)
Collect PLANit modes if it is known as being activated and compatible, otherwise return null- Parameters:
gtfsMode
- to check for- Returns:
- all compatible PLANit modes in order from primary compatible to alternatives that one might consider, null if not present
-
getCompatiblePlanitModesIfActivated
public Set<Mode> getCompatiblePlanitModesIfActivated(Mode planitMode)
Collect compatible PLANit modes from a given PLANit mode (if any). These only exist if a GTFS mode listed more than one mapped PLANit mode, e.g. lightrail and tram, in which case lightrail would return tram and vice versa.- Parameters:
planitMode
- to check for- Returns:
- all compatible PLANit modes
-
expandWithCompatibleModes
public Set<Mode> expandWithCompatibleModes(Mode planitMode)
Expand the mode to all compatible modes (if any) including the mode itself- Parameters:
planitMode
- to expand- Returns:
- original mode supplemented with any compatible modes
-
getSettings
public GtfsIntermodalReaderSettings getSettings()
-
getConnectoidsByAccessZone
public Set<DirectedConnectoid> getConnectoidsByAccessZone(TransferZone transferZone)
-
getShortestPathAlgoByMode
public ShortestPathAStar getShortestPathAlgoByMode(Mode mode)
Shortest path algorithm by mode initialised with the costs for that mode per link segment, requiresinitialise()
to be invoked beforehand- Parameters:
mode
- to get shortest path algorithm for- Returns:
- algo
-
reset
public void reset()
-
-