Package org.planit.project
Class PlanItProjectInput
- java.lang.Object
-
- org.planit.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classPlanItProjectInput.ProjectDemandsInternal class for registered demandsclassPlanItProjectInput.ProjectNetworksInternal class for registered physical networksclassPlanItProjectInput.ProjectODPathSetsInternal class for registered od path setsclassPlanItProjectInput.ProjectZoningsInternal class for registered zonings
-
Field Summary
Fields Modifier and Type Field Description PlanItProjectInput.ProjectDemandsdemandsThe registered demandsprotected TrafficAssignmentComponentFactory<Demands>demandsFactoryObject factory for demands objectprotected TreeMap<Long,Demands>demandsMapThe demands registered on this projectprotected TrafficAssignmentComponentFactory<Network>infrastructureNetworkFactoryObject Factory for infrastructure network objectprotected TreeMap<Long,InfrastructureNetwork>infrastructureNetworkMapThe physical networks registered on this projectprotected Map<InfrastructureNetwork,List<InitialLinkSegmentCost>>initialLinkSegmentCostsMap to store all InitialLinkSegmentCost objects for each physical networkprotected TrafficAssignmentComponentFactory<InitialPhysicalCost>initialPhysicalCostFactoryObject factory for physical costsPlanItProjectInput.ProjectODPathSetsodPathSetsThe registered OD path setsprotected TrafficAssignmentComponentFactory<ODPathSets>odPathSetsFactoryObject factory for od path sets objectprotected TreeMap<Long,ODPathSets>odPathSetsMapThe od path sets registered on this projectPlanItProjectInput.ProjectNetworksphysicalNetworksThe registered physical networksprotected TrafficAssignmentComponentFactory<Zoning>zoningFactoryObject factory for zoning objectsPlanItProjectInput.ProjectZoningszoningsThe registered zoningsprotected TreeMap<Long,Zoning>zoningsMapThe zonings registered on this project
-
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 DemandscreateAndRegisterDemands(Zoning zoning, InfrastructureNetwork network)Create and register demands to the project inputsInfrastructureNetworkcreateAndRegisterInfrastructureNetwork(String infrastructureNetworkType)Create and register an infrastructure based network on the project inputInitialLinkSegmentCostcreateAndRegisterInitialLinkSegmentCost(InfrastructureNetwork 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 projectList<InitialLinkSegmentCostPeriod>createAndRegisterInitialLinkSegmentCost(InfrastructureNetwork network, String fileName, Demands demands)Create and register initial link segment costs from a (single) file for all time periods in Demands objectInitialLinkSegmentCostPeriodcreateAndRegisterInitialLinkSegmentCost(InfrastructureNetwork network, String fileName, TimePeriod timePeriod)Create and register initial link segment costs from a (single) file for each time periodODPathSetscreateAndRegisterOdPathSets(InfrastructureLayer networkLayer, Zoning zoning, String odPathSetInputPath)Create and register the OD path sets on the project inputZoningcreateAndRegisterZoning(InfrastructureNetwork infrastructureNetwork)Create and register the zoning system on the network and project inputList<InitialLinkSegmentCost>getInitialLinkSegmentCost(InfrastructureNetwork network)Return the initial link segment costs for a network
-
-
-
Field Detail
-
infrastructureNetworkMap
protected final TreeMap<Long,InfrastructureNetwork> infrastructureNetworkMap
The physical networks registered on this project
-
odPathSetsMap
protected final TreeMap<Long,ODPathSets> odPathSetsMap
The od path sets registered on this project
-
initialLinkSegmentCosts
protected final Map<InfrastructureNetwork,List<InitialLinkSegmentCost>> initialLinkSegmentCosts
Map to store all InitialLinkSegmentCost objects for each physical network
-
infrastructureNetworkFactory
protected TrafficAssignmentComponentFactory<Network> infrastructureNetworkFactory
Object Factory for infrastructure network object
-
demandsFactory
protected TrafficAssignmentComponentFactory<Demands> demandsFactory
Object factory for demands object
-
zoningFactory
protected TrafficAssignmentComponentFactory<Zoning> zoningFactory
Object factory for zoning objects
-
odPathSetsFactory
protected TrafficAssignmentComponentFactory<ODPathSets> odPathSetsFactory
Object factory for od path sets object
-
initialPhysicalCostFactory
protected TrafficAssignmentComponentFactory<InitialPhysicalCost> initialPhysicalCostFactory
Object factory for physical costs
-
physicalNetworks
public final PlanItProjectInput.ProjectNetworks physicalNetworks
The registered physical networks
-
demands
public final PlanItProjectInput.ProjectDemands demands
The registered demands
-
zonings
public final PlanItProjectInput.ProjectZonings zonings
The registered zonings
-
odPathSets
public final PlanItProjectInput.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
-
createAndRegisterInfrastructureNetwork
public InfrastructureNetwork 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(InfrastructureNetwork 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, InfrastructureNetwork 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
-
createAndRegisterOdPathSets
public ODPathSets createAndRegisterOdPathSets(InfrastructureLayer 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 InitialLinkSegmentCost createAndRegisterInitialLinkSegmentCost(InfrastructureNetwork 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- 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
-
createAndRegisterInitialLinkSegmentCost
public InitialLinkSegmentCostPeriod createAndRegisterInitialLinkSegmentCost(InfrastructureNetwork network, String fileName, TimePeriod timePeriod) throws PlanItException
Create and register initial link segment costs from a (single) file for each time period- Parameters:
network- network the InitialLinkSegmentCost object will be registered forfileName- location of file containing the initial link segment cost valuestimePeriod- the current time period- Returns:
- the InitialLinkSegmentCost object
- Throws:
PlanItException- thrown if there is an error
-
createAndRegisterInitialLinkSegmentCost
public List<InitialLinkSegmentCostPeriod> createAndRegisterInitialLinkSegmentCost(InfrastructureNetwork network, String fileName, Demands demands) throws PlanItException
Create and register initial link segment costs from a (single) file for all time periods in Demands object- Parameters:
network- network the InitialLinkSegmentCost object will be registered forfileName- location of file containing the initial link segment cost valuesdemands- the Demands object- Returns:
- the InitialLinkSegmentCost object
- Throws:
PlanItException- thrown if there is an error
-
getInitialLinkSegmentCost
public List<InitialLinkSegmentCost> getInitialLinkSegmentCost(InfrastructureNetwork 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
-
-