Class 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
    • Constructor Detail

      • PlanItProjectInput

        public PlanItProjectInput​(long projectId,
                                  IdGroupingToken projectGroupId,
                                  InputBuilderListener inputBuilderListener)
        Constructor
        Parameters:
        projectId - the projectId
        projectGroupId - the id generator token
        inputBuilderListener - the input builder to parse inputs
    • Method Detail

      • createAndRegisterPhysicalNetwork

        public PhysicalNetwork createAndRegisterPhysicalNetwork​(String physicalNetworkType)
                                                         throws PlanItException
        Create and register a physical network on the project input
        Parameters:
        physicalNetworkType - name of physical network class to register
        Returns:
        the generated physical network
        Throws:
        PlanItException - thrown if there is an error
      • createAndRegisterZoning

        public Zoning createAndRegisterZoning​(PhysicalNetwork physicalNetwork)
                                       throws PlanItException
        Create and register the zoning system on the network and project input
        Parameters:
        physicalNetwork - the physical 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,
                                                PhysicalNetwork physicalNetwork)
                                         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 created
        physicalNetwork - the physical network which stores the modes (demands can different for each mode)
        Returns:
        the generated demands object
        Throws:
        PlanItException - thrown if there is an error
      • createAndRegisterODRouteSets

        public ODRouteSets createAndRegisterODRouteSets​(PhysicalNetwork physicalNetwork,
                                                        Zoning zoning,
                                                        String odRouteSetInputPath)
                                                 throws PlanItException
        Create and register the OD route sets on the project input
        Parameters:
        physicalNetwork - network the routes must be compatible with
        zoning - zoning to match od routes to
        odRouteSetInputPath - path to collect the routes from
        Returns:
        od route sets that have been parsed
        Throws:
        PlanItException - thrown if there is an error
      • createAndRegisterInitialLinkSegmentCost

        public InitialLinkSegmentCost createAndRegisterInitialLinkSegmentCost​(PhysicalNetwork 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 - physical network the InitialLinkSegmentCost object will be registered for
        fileName - file containing the initial link segment cost values
        Returns:
        the InitialLinkSegmentCost object
        Throws:
        PlanItException - thrown if there is an error
      • createAndRegisterInitialLinkSegmentCost

        public InitialLinkSegmentCostPeriod createAndRegisterInitialLinkSegmentCost​(PhysicalNetwork network,
                                                                                    String fileName,
                                                                                    TimePeriod timePeriod)
                                                                             throws PlanItException
        Create and register initial link segment costs from a (single) file for each time period
        Parameters:
        network - physical network the InitialLinkSegmentCost object will be registered for
        fileName - location of file containing the initial link segment cost values
        timePeriod - the current time period
        Returns:
        the InitialLinkSegmentCost object
        Throws:
        PlanItException - thrown if there is an error
      • createAndRegisterInitialLinkSegmentCost

        public List<InitialLinkSegmentCostPeriod> createAndRegisterInitialLinkSegmentCost​(PhysicalNetwork 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 - physical network the InitialLinkSegmentCost object will be registered for
        fileName - location of file containing the initial link segment cost values
        demands - the Demands object
        Returns:
        the InitialLinkSegmentCost object
        Throws:
        PlanItException - thrown if there is an error
      • getInitialLinkSegmentCost

        public List<InitialLinkSegmentCost> getInitialLinkSegmentCost​(PhysicalNetwork network)
        Return the initial link segment costs for a network
        Parameters:
        network - the specified physical network
        Returns:
        the initial link segment costs for the specified physical network