Class OutputConfiguration


  • public class OutputConfiguration
    extends Object
    Class containing the general output configuration and the type specific configurations for some traffic assignment
    Author:
    markr
    • Field Detail

      • persistOnlyFinalIteration

        protected boolean persistOnlyFinalIteration
        persisting final iteration only or not
      • persistZeroFlow

        protected boolean persistZeroFlow
        persisting zero flows or not
      • PERSIST_ONLY_FINAL_ITERATION

        public static final boolean PERSIST_ONLY_FINAL_ITERATION
        Default for persisting final iteration
        See Also:
        Constant Field Values
      • PERSIST_ZERO_FLOW

        public static final boolean PERSIST_ZERO_FLOW
        Default for persisting zero flows
        See Also:
        Constant Field Values
    • Constructor Detail

      • OutputConfiguration

        public OutputConfiguration()
        Base constructor
    • Method Detail

      • getActivatedOutputTypes

        public Set<OutputType> getActivatedOutputTypes()
        Collect the activated output types
        Returns:
        activated output types
      • getActivatedOutputTypeConfigurations

        public Collection<OutputTypeConfiguration> getActivatedOutputTypeConfigurations()
        Collect all output type configuration activated on this instance
        Returns:
        activated output type configruation
      • getOutputTypeConfiguration

        public OutputTypeConfiguration getOutputTypeConfiguration​(OutputType outputType)
        Collect the output type configuration for the given type if it is activated
        Parameters:
        outputType - to collect
        Returns:
        output type configuration when active, otherwise null is returned
      • deregisterOutputTypeConfiguration

        public void deregisterOutputTypeConfiguration​(OutputType outputType)
        remove the output type from the list of active types, its configuration is also nullified, this type will no longer be persisted
        Parameters:
        outputType - to deregister
      • isOutputTypeActive

        public boolean isOutputTypeActive​(OutputType outputType)
        Verify ig the output type is activated or not
        Parameters:
        outputType - to verify
        Returns:
        true when active, false otherwise
      • createAndRegisterOutputTypeConfiguration

        public OutputTypeConfiguration createAndRegisterOutputTypeConfiguration​(OutputType outputType)
                                                                         throws PlanItException
        Factory method to create an output configuration for a given type
        Parameters:
        outputType - the output type to register the configuration for
        Returns:
        outputTypeconfiguration the output type configuration that has been newly registered
        Throws:
        PlanItException - thrown if there is an error
      • setPersistOnlyFinalIteration

        public void setPersistOnlyFinalIteration​(boolean persistOnlyFinalIteration)
        Set whether only the final iteration will be recorded (default is true)
        Parameters:
        persistOnlyFinalIteration - true if only the final iteration will be recorded
      • isPersistOnlyFinalIteration

        public boolean isPersistOnlyFinalIteration()
        Returns whether only the final iteration will be recorded (default is true)
        Returns:
        true if only the final iteration will be recorded, false otherwise
      • setPersistZeroFlow

        public void setPersistZeroFlow​(boolean persistZeroFlow)
        Set whether links and paths with zero flow should be record (default is false)
        Parameters:
        persistZeroFlow - if true links and paths with zero flow are recorded
      • isPersistZeroFlow

        public boolean isPersistZeroFlow()
        Verify if we are persisting zero flow or not (default is false)
        Returns:
        true when persisting zero flows, false otherwise