Class TrafficAssignmentConfigurator<T extends TrafficAssignment>

    • Constructor Detail

      • TrafficAssignmentConfigurator

        public TrafficAssignmentConfigurator​(Class<T> instanceType)
        Constructor
        Parameters:
        instanceType - the class type of the instance we are configuring
    • Method Detail

      • setInfrastructureNetwork

        protected void setInfrastructureNetwork​(LayeredNetwork<?,​?> network)
        Set the network
        Parameters:
        network - to set
      • setZoning

        protected void setZoning​(Zoning zoning)
        Set the zoning
        Parameters:
        zoning - to set
      • setDemands

        protected void setDemands​(Demands demands)
        Set the demands
        Parameters:
        demands - to set
      • setOutputManager

        protected void setOutputManager​(OutputManager outputManager)
        Set the output manager
        Parameters:
        outputManager - to set
      • getOutputManager

        protected OutputManager getOutputManager()
        Collect the registered output manager
        Returns:
        collected outputManager
      • getInfrastructureNetwork

        public LayeredNetwork<?,​?> getInfrastructureNetwork()
        collect the registered network
        Returns:
        network
      • getZoning

        public Zoning getZoning()
        Get the registered zoning
        Returns:
        zoning
      • getDemands

        public Demands getDemands()
        Get the registered demands
        Returns:
        demands
      • setLogSettings

        public void setLogSettings​(boolean flag)
        Set the flag for logging all settings
        Parameters:
        flag - to set
      • isLogSettings

        public boolean isLogSettings()
        Get the flag for logging all settings
        Returns:
        true when logging false otherwise
      • createAndRegisterGapFunction

        public GapFunctionConfigurator<? extends GapFunction> createAndRegisterGapFunction​(String gapFunctionType)
                                                                                    throws PlanItException
        Create and Register gapFunction component
        Parameters:
        gapFunctionType - the type of gap function component to be created
        Returns:
        gap function configuration object
        Throws:
        PlanItException - thrown if there is an error
      • createAndRegisterSmoothing

        public SmoothingConfigurator<? extends Smoothing> createAndRegisterSmoothing​(String smoothingType)
                                                                              throws PlanItException
        Create and Register smoothing component
        Parameters:
        smoothingType - the type of smoothing component to be created
        Returns:
        Smoothing configuration object
        Throws:
        PlanItException - thrown if there is an error
      • createAndRegisterPhysicalCost

        public PhysicalCostConfigurator<? extends AbstractPhysicalCost> createAndRegisterPhysicalCost​(String physicalTravelTimeCostFunctionType)
                                                                                               throws PlanItException
        Create and register physical link cost function to determine travel time
        Parameters:
        physicalTravelTimeCostFunctionType - the type of cost function to be created
        Returns:
        the physical cost created
        Throws:
        PlanItException - thrown if there is an error
      • createAndRegisterVirtualCost

        public VirtualCostConfigurator<? extends AbstractVirtualCost> createAndRegisterVirtualCost​(String virtualTraveltimeCostFunctionType)
                                                                                            throws PlanItException
        Create and Register virtual link cost function to determine travel time
        Parameters:
        virtualTraveltimeCostFunctionType - the type of cost function to be created
        Returns:
        the cost function created
        Throws:
        PlanItException - thrown if there is an error
      • registerOutputFormatter

        public void registerOutputFormatter​(OutputFormatter outputFormatter)
                                     throws PlanItException
        Register an output formatter
        Parameters:
        outputFormatter - OutputFormatter being registered
        Throws:
        PlanItException - thrown if there is an error or validation failure during setup of the output formatter
      • unregisterOutputFormatter

        public void unregisterOutputFormatter​(OutputFormatter outputFormatter)
                                       throws PlanItException
        Remove an output formatter which has already been registered This is used by the Python interface, which registers the PlanItIO formatter by default
        Parameters:
        outputFormatter - the output formatter to be removed
        Throws:
        PlanItException - thrown if there is an error during removal of the output formatter
      • getOutputFormatters

        public List<OutputFormatter> getOutputFormatters()
        Returns a list of output formatters registered on this assignment
        Returns:
        List of OutputFormatter objects registered on this assignment
      • registerInitialLinkSegmentCost

        public void registerInitialLinkSegmentCost​(InitialMacroscopicLinkSegmentCost initialLinkSegmentCost)
        Register all available initial costs, both time period agnostic and time period specific, 1:1 on the assignment
        Parameters:
        initialLinkSegmentCost - initial link segment cost for the current traffic assignment
      • registerInitialLinkSegmentCost

        public void registerInitialLinkSegmentCost​(InitialModesLinkSegmentCost initialLinkSegmentCost)
        Register the initial link segment cost without relating it to a particular period, meaning that it is applied to all time periods that do not have a specified initial link segment costs registered for them
        Parameters:
        initialLinkSegmentCost - initial link segment cost for the current traffic assignment
      • registerInitialLinkSegmentCost

        public void registerInitialLinkSegmentCost​(TimePeriod timePeriod,
                                                   InitialModesLinkSegmentCost initialLinkSegmentCost)
                                            throws PlanItException
        Register the initial link segment cost for a specified time period
        Parameters:
        timePeriod - the specified time period
        initialLinkSegmentCost - initial link segment cost for the current traffic assignment
        Throws:
        PlanItException - thrown if time period is null
      • activateOutput

        public OutputTypeConfiguration activateOutput​(OutputType outputType)
                                               throws PlanItException
        Method that allows one to activate specific output types for persistence on the traffic assignment instance
        Parameters:
        outputType - OutputType object to be used
        Returns:
        outputTypeConfiguration the output type configuration that is now active
        Throws:
        PlanItException - thrown if there is an error activating the output
      • deactivateOutput

        public void deactivateOutput​(OutputType outputType)
        Deactivate an output type
        Parameters:
        outputType - OutputType to be deactivated
      • isOutputTypeActive

        public boolean isOutputTypeActive​(OutputType outputType)
        Verify if a given output type is active
        Parameters:
        outputType - the output type to verify for
        Returns:
        true if active, false otherwise
      • getOutputConfiguration

        public OutputConfiguration getOutputConfiguration()
        Provide the output configuration for user access
        Returns:
        outputConfiguration for this traffic assignment
      • getSmoothing

        public SmoothingConfigurator<? extends Smoothing> getSmoothing()
        Collect the smoothing entity registered on the traffic assignment
        Returns:
        smoothing