Class TntpInputBuilder

    • Constructor Detail

      • TntpInputBuilder

        public TntpInputBuilder​(String networkFileLocation,
                                String nodeCoordinateFileLocation,
                                String demandFileLocation)
                         throws PlanItException
        Constructor. Most barebones constructor, requires user to change underlying settings regarding configuration of network, zoning etc. before continuing.
        Parameters:
        networkFileLocation - network file location
        nodeCoordinateFileLocation - optional provision of node coordinates (may be null)
        demandFileLocation - demand file location optional provision of demand file location (may be null)
        Throws:
        PlanItException - thrown if there is an error during running
    • Method Detail

      • populateMacroscopicNetwork

        protected void populateMacroscopicNetwork​(MacroscopicNetwork macroscopicNetwork)
                                           throws PlanItException
        Creates the physical network object from the data in the input file
        Parameters:
        macroscopicNetwork - the network object to be populated from the input data
        Throws:
        PlanItException - thrown if there is an error reading the input file
      • populateDemands

        protected void populateDemands​(Demands demands,
                                       Zoning zoning,
                                       MacroscopicNetwork network)
                                throws PlanItException
        Populates the Demands object from the input file
        Parameters:
        demands - the Demands object to be populated from the input data
        zoning - Zoning object previously defined
        network - Network to use
        Throws:
        PlanItException - thrown if there is an error reading the input file
      • populateZoning

        protected void populateZoning​(Zoning zoning,
                                      Object parameter1)
                               throws PlanItException
        Creates the Zoning object and connectoids from the data in the network file In TNTP this method does not need to read a TAZ file. It simply uses the number of zones, which has already been read in from the network file.
        Parameters:
        zoning - the Zoning object to be populated from the input data
        parameter1 - the physical network object previously created
        Throws:
        PlanItException - thrown if there is an error reading the input file
      • populatePhysicalCost

        protected void populatePhysicalCost​(AbstractPhysicalCost costComponent,
                                            MacroscopicNetwork parentNetwork)
        Populate the BPR parameters
        Parameters:
        costComponent - the BPRLinkTravelTimeCost to be populated
        parentNetwork - top use for costs
      • onPlanitComponentEvent

        public void onPlanitComponentEvent​(PlanitComponentEvent event)
                                    throws PlanItException
        Whenever a project component is created this method will be invoked
        Parameters:
        event - event containing the created (and empty) project component
        Throws:
        PlanItException - thrown if there is an error