Package org.goplanit.project
Class PlanItProjectInput
- java.lang.Object
-
- org.goplanit.project.PlanItProjectInput
-
public class PlanItProjectInput extends Object
Class that holds all the input traffic components for a PLANit project. The PLANit project holds an instance of this class and delegates all calls relating to inputs to this class.- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected ProjectDemands
demands
The registered demandsprotected Map<LayeredNetwork<?,?>,List<InitialMacroscopicLinkSegmentCost>>
initialLinkSegmentCosts
Map to store all InitialLinkSegmentCost objects for each physical networkprotected ProjectOdPathSets
odPathSets
The registered OD path setsprotected ProjectNetworks
physicalNetworks
The registered physical networksprotected Collection<PlanitComponentFactory<?>>
planitComponentFactories
available traffic assignment component factories by their derived class implementationprotected ProjectRoutedServices
routedServices
The registered routed servicesprotected ProjectServiceNetworks
serviceNetworks
The registered service networksprotected ProjectZonings
zonings
The registered zonings
-
Constructor Summary
Constructors Constructor Description PlanItProjectInput(long projectId, IdGroupingToken projectGroupId, InputBuilderListener inputBuilderListener)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Demands
createAndRegisterDemands(Zoning zoning, LayeredNetwork<?,?> network)
Create and register demands to the project inputsLayeredNetwork<?,?>
createAndRegisterInfrastructureNetwork(String infrastructureNetworkType)
Create and register an infrastructure based network on the project inputInitialMacroscopicLinkSegmentCost
createAndRegisterInitialLinkSegmentCost(LayeredNetwork<?,?> network, String fileName)
Create and register initial link segment costs from a (single) file which we assume are available in the native XML/CSV output format as provided in this project.protected InitialMacroscopicLinkSegmentCost
createAndRegisterInitialLinkSegmentCost(LayeredNetwork<?,?> network, String fileName, TimePeriod timePeriod)
Create and register initial link segment costs from a (single) file for all time periods (which are assumed are sorted by start time)OdPathSets
createAndRegisterOdPathSets(NetworkLayer networkLayer, Zoning zoning, String odPathSetInputPath)
Create and register the OD path sets on the project inputRoutedServices
createAndRegisterRoutedServices(ServiceNetwork serviceNetwork)
Create and register routed services to the project inputsServiceNetwork
createAndRegisterServiceNetwork(MacroscopicNetwork network)
Create and register service networks to the project inputsZoning
createAndRegisterZoning(LayeredNetwork<?,?> infrastructureNetwork)
Create and register the zoning system on the network and project inputList<InitialMacroscopicLinkSegmentCost>
getInitialLinkSegmentCost(LayeredNetwork<?,?> network)
Return the initial link segment costs for a network
-
-
-
Field Detail
-
initialLinkSegmentCosts
protected final Map<LayeredNetwork<?,?>,List<InitialMacroscopicLinkSegmentCost>> initialLinkSegmentCosts
Map to store all InitialLinkSegmentCost objects for each physical network
-
planitComponentFactories
protected final Collection<PlanitComponentFactory<?>> planitComponentFactories
available traffic assignment component factories by their derived class implementation
-
physicalNetworks
protected final ProjectNetworks physicalNetworks
The registered physical networks
-
demands
protected final ProjectDemands demands
The registered demands
-
zonings
protected final ProjectZonings zonings
The registered zonings
-
serviceNetworks
protected final ProjectServiceNetworks serviceNetworks
The registered service networks
-
routedServices
protected final ProjectRoutedServices routedServices
The registered routed services
-
odPathSets
protected final ProjectOdPathSets odPathSets
The registered OD path sets
-
-
Constructor Detail
-
PlanItProjectInput
public PlanItProjectInput(long projectId, IdGroupingToken projectGroupId, InputBuilderListener inputBuilderListener)
Constructor- Parameters:
projectId
- the projectIdprojectGroupId
- the id generator tokeninputBuilderListener
- the input builder to parse inputs
-
-
Method Detail
-
createAndRegisterInitialLinkSegmentCost
protected InitialMacroscopicLinkSegmentCost createAndRegisterInitialLinkSegmentCost(LayeredNetwork<?,?> network, String fileName, TimePeriod timePeriod) throws PlanItException
Create and register initial link segment costs from a (single) file for all time periods (which are assumed are sorted by start time)- Parameters:
network
- network the InitialLinkSegmentCost object will be registered forfileName
- location of file containing the initial link segment cost valuestimePeriod
- to use (may be null, in which case the data is assumed to be time period agnostic)- Returns:
- the InitialLinkSegmentCost object
- Throws:
PlanItException
- thrown if there is an error
-
createAndRegisterInfrastructureNetwork
public LayeredNetwork<?,?> createAndRegisterInfrastructureNetwork(String infrastructureNetworkType) throws PlanItException
Create and register an infrastructure based network on the project input- Parameters:
infrastructureNetworkType
- name of infrastructure network class to register- Returns:
- the generated network
- Throws:
PlanItException
- thrown if there is an error
-
createAndRegisterZoning
public Zoning createAndRegisterZoning(LayeredNetwork<?,?> infrastructureNetwork) throws PlanItException
Create and register the zoning system on the network and project input- Parameters:
infrastructureNetwork
- the infrastructure network on which the zoning will be based- Returns:
- the generated zoning object
- Throws:
PlanItException
- thrown if there is an error
-
createAndRegisterDemands
public Demands createAndRegisterDemands(Zoning zoning, LayeredNetwork<?,?> network) throws PlanItException
Create and register demands to the project inputs- Parameters:
zoning
- zoning object which defines the zones which will be used in the demand matrix to be creatednetwork
- the network which stores the modes (demands can different for each mode)- Returns:
- the generated demands object
- Throws:
PlanItException
- thrown if there is an error
-
createAndRegisterServiceNetwork
public ServiceNetwork createAndRegisterServiceNetwork(MacroscopicNetwork network) throws PlanItException
Create and register service networks to the project inputs- Parameters:
network
- the network upon which the service network is built- Returns:
- the generated service network object
- Throws:
PlanItException
- thrown if there is an error
-
createAndRegisterRoutedServices
public RoutedServices createAndRegisterRoutedServices(ServiceNetwork serviceNetwork) throws PlanItException
Create and register routed services to the project inputs- Parameters:
serviceNetwork
- the service network upon which the service are defined- Returns:
- the generated routed services object
- Throws:
PlanItException
- thrown if there is an error
-
createAndRegisterOdPathSets
public OdPathSets createAndRegisterOdPathSets(NetworkLayer networkLayer, Zoning zoning, String odPathSetInputPath) throws PlanItException
Create and register the OD path sets on the project input- Parameters:
networkLayer
- network the paths must be compatible withzoning
- zoning to match od paths toodPathSetInputPath
- path to collect the paths from- Returns:
- od path sets that have been parsed
- Throws:
PlanItException
- thrown if there is an error
-
createAndRegisterInitialLinkSegmentCost
public InitialMacroscopicLinkSegmentCost createAndRegisterInitialLinkSegmentCost(LayeredNetwork<?,?> network, String fileName) throws PlanItException
Create and register initial link segment costs from a (single) file which we assume are available in the native XML/CSV output format as provided in this project. This initial cost is not specifically tied to a particular time period and can be used as a fallback cost in case more specific costs (for a specific time period) are not available.- Parameters:
network
- network the InitialLinkSegmentCost object will be registered forfileName
- file containing the initial link segment cost values- Returns:
- the InitialLinkSegmentCost object
- Throws:
PlanItException
- thrown if there is an error
-
getInitialLinkSegmentCost
public List<InitialMacroscopicLinkSegmentCost> getInitialLinkSegmentCost(LayeredNetwork<?,?> network)
Return the initial link segment costs for a network- Parameters:
network
- the specified network- Returns:
- the initial link segment costs for the specified physical network
-
-