Package org.planit.output.configuration
Class OutputConfiguration
- java.lang.Object
-
- org.planit.output.configuration.OutputConfiguration
-
public class OutputConfiguration extends Object
Class containing the general output configuration and the type specific configurations for some traffic assignment- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<OutputType,OutputTypeConfiguration>outputTypeConfigurationsoutput configurations per output typestatic booleanPERSIST_ONLY_FINAL_ITERATIONDefault for persisting final iterationstatic booleanPERSIST_ZERO_FLOWDefault for persisting zero flowsprotected booleanpersistOnlyFinalIterationpersisting final iteration only or notprotected booleanpersistZeroFlowpersisting zero flows or not
-
Constructor Summary
Constructors Constructor Description OutputConfiguration()Base constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OutputTypeConfigurationcreateAndRegisterOutputTypeConfiguration(OutputType outputType)Factory method to create an output configuration for a given typevoidderegisterOutputTypeConfiguration(OutputType outputType)remove the output type from the list of active types, its configuration is also nullified, this type will no longer be persistedCollection<OutputTypeConfiguration>getActivatedOutputTypeConfigurations()Collect all output type configuration activated on this instanceSet<OutputType>getActivatedOutputTypes()Collect the activated output typesOutputTypeConfigurationgetOutputTypeConfiguration(OutputType outputType)Collect the output type configuration for the given type if it is activatedbooleanisOutputTypeActive(OutputType outputType)Verify ig the output type is activated or notbooleanisPersistOnlyFinalIteration()Returns whether only the final iteration will be recorded (default is true)booleanisPersistZeroFlow()Verify if we are persisting zero flow or not (default is false)voidsetPersistOnlyFinalIteration(boolean persistOnlyFinalIteration)Set whether only the final iteration will be recorded (default is true)voidsetPersistZeroFlow(boolean persistZeroFlow)Set whether links and paths with zero flow should be record (default is false)
-
-
-
Field Detail
-
persistOnlyFinalIteration
protected boolean persistOnlyFinalIteration
persisting final iteration only or not
-
persistZeroFlow
protected boolean persistZeroFlow
persisting zero flows or not
-
outputTypeConfigurations
protected final Map<OutputType,OutputTypeConfiguration> outputTypeConfigurations
output configurations per output type
-
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
-
-
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
-
-