Class RoutedServices
- java.lang.Object
-
- org.goplanit.component.PlanitComponent<RoutedServices>
-
- org.goplanit.service.routed.RoutedServices
-
- All Implemented Interfaces:
Serializable
,Comparable<IdAble>
,EventListener
,PlanitComponentListener
,EventListener
,ExternalIdAble
,IdAble
public class RoutedServices extends PlanitComponent<RoutedServices> implements Serializable
Routed services are service that follow a predefined paths (route) on a service network layer that are offered as a service of some sort, i.e., it either follows a schedule or a frequency. The most well known routed service would a public transport service, or alternatively scheduled freight movements between warehouses.Each routed service can have one or more trips based on a schedule. The trips follow a service path comprising of legs between predefined stopping points. In PLANit these points are modelled as connectoids. Since connectoids are in turn connected to (transfer) zones, the combination of (travel) demand between zones and routed services allows for a multi-modal trip chain using one or more routed services. This holds for people but potentially also for goods.
Routed services rely on routes that exist within a single layer of a (service) network. Therefore any instance of routesServices resides within this layer rather than on the network as a whole.
Routed services are a top-level input in PLANit and therefore extend TrafficAssignmentComponent such that they can be integrated into any input builder
- Author:
- markr
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RoutedServices(RoutedServices other, boolean deepCopy, BiConsumer<RoutedServicesLayer,RoutedServicesLayer> mapper)
Copy constructorRoutedServices(IdGroupingToken tokenId, ServiceNetwork parentServiceNetwork)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
collectSettingsAsKeyValueMap()
Provide all the settings of this particular component by name and value, where each value is a string representation of the underlying entityPlanitComponent<RoutedServices>
deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possibleRoutedServicesLayers
getLayers()
Provide access to the layer specific routed servicesServiceNetwork
getParentNetwork()
Collect the parent service network on top of which these services are definedvoid
logInfo(String prefix)
Log the stats for the routed services , e.g., the layers and their aggregate contentsvoid
reset()
reset by removing all layers and what is in themPlanitComponent<RoutedServices>
shallowClone()
Create a shallow copy of this entity-
Methods inherited from class org.goplanit.component.PlanitComponent
equals, getComponentType, getExternalId, getId, getIdGroupingToken, getKnownSupportedEventTypes, getXmlId, hashCode, onPlanitComponentEvent, setExternalId, setXmlId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.event.EventListener
hasKnownSupportedEventTypes
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
appendExternalId, appendExternalId, getIdsAsString, getSplitExternalId, getSplitExternalId, hasExternalId, hasXmlId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, idEquals, idHashCode
-
-
-
-
Constructor Detail
-
RoutedServices
public RoutedServices(IdGroupingToken tokenId, ServiceNetwork parentServiceNetwork)
Constructor- Parameters:
tokenId
- to use for generation of the id of this routed services instanceparentServiceNetwork
- the parent service network for these routed services
-
RoutedServices
public RoutedServices(RoutedServices other, boolean deepCopy, BiConsumer<RoutedServicesLayer,RoutedServicesLayer> mapper)
Copy constructor- Parameters:
other
- to copydeepCopy
- when true, create a deep copy, shallow copy otherwisemapper
- to use for tracking mapping between original and copied entity (may be null)
-
-
Method Detail
-
shallowClone
public PlanitComponent<RoutedServices> shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in classPlanitComponent<RoutedServices>
- Returns:
- shallow copy of entity
-
deepClone
public PlanitComponent<RoutedServices> deepClone()
deep clone on planit component should attempt to also update internal dependencies between deep cloned containers where possible- Specified by:
deepClone
in interfaceIdAble
- Specified by:
deepClone
in classPlanitComponent<RoutedServices>
- Returns:
- deep copy of entity
-
reset
public void reset()
reset by removing all layers and what is in them- Specified by:
reset
in classPlanitComponent<RoutedServices>
-
collectSettingsAsKeyValueMap
public Map<String,String> collectSettingsAsKeyValueMap()
Provide all the settings of this particular component by name and value, where each value is a string representation of the underlying entity- Specified by:
collectSettingsAsKeyValueMap
in classPlanitComponent<RoutedServices>
- Returns:
- name-value map of all (user configurable) settings
-
getParentNetwork
public ServiceNetwork getParentNetwork()
Collect the parent service network on top of which these services are defined- Returns:
- parent service network
-
getLayers
public RoutedServicesLayers getLayers()
Provide access to the layer specific routed services- Returns:
- routed services layers container
-
logInfo
public void logInfo(String prefix)
Log the stats for the routed services , e.g., the layers and their aggregate contents- Parameters:
prefix
- to apply
-
-