Package org.goplanit.output.adapter
Class OdOutputTypeAdapterImpl
- java.lang.Object
-
- org.goplanit.output.adapter.OutputTypeAdapterImpl
-
- org.goplanit.output.adapter.OdOutputTypeAdapterImpl
-
- All Implemented Interfaces:
OdOutputTypeAdapter
,OutputTypeAdapter
- Direct Known Subclasses:
TraditionalStaticAssignmentOdOutputTypeAdapter
public abstract class OdOutputTypeAdapterImpl extends OutputTypeAdapterImpl implements OdOutputTypeAdapter
Top-level abstract class which defines the common methods required by OD output type adapters- Author:
- gman6028
-
-
Field Summary
-
Fields inherited from class org.goplanit.output.adapter.OutputTypeAdapterImpl
outputType
-
-
Constructor Summary
Constructors Constructor Description OdOutputTypeAdapterImpl(OutputType outputType, TrafficAssignment trafficAssignment)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Integer>
getIterationIndexForSubOutputType(SubOutputTypeEnum outputTypeEnum)
ODSkimOutputType.COST: Cost is collected through the shortest path in iteration i based on the link costs of iteration i-1, so the od cost of i-1 are only known once we are in iteration i, hence this information is trailing behind one iteration, and we can only store it in i.Optional<?>
getOdOutputPropertyValue(OutputProperty outputProperty, OdDataIterator<?> odIterator, Mode mode, TimePeriod timePeriod)
Returns the specified output property values for the current cell in the OD Matrix Iterator-
Methods inherited from class org.goplanit.output.adapter.OutputTypeAdapterImpl
createConvertedUnitsValue, getAssignment, getOutputType, getOutputTypeIndependentPropertyValue
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.output.adapter.OdOutputTypeAdapter
getOdSkimMatrix
-
Methods inherited from interface org.goplanit.output.adapter.OutputTypeAdapter
getOutputType
-
-
-
-
Constructor Detail
-
OdOutputTypeAdapterImpl
public OdOutputTypeAdapterImpl(OutputType outputType, TrafficAssignment trafficAssignment)
Constructor- Parameters:
outputType
- the output type for the current persistencetrafficAssignment
- the traffic assignment used to provide the data
-
-
Method Detail
-
getOdOutputPropertyValue
public Optional<?> getOdOutputPropertyValue(OutputProperty outputProperty, OdDataIterator<?> odIterator, Mode mode, TimePeriod timePeriod)
Returns the specified output property values for the current cell in the OD Matrix Iterator- Specified by:
getOdOutputPropertyValue
in interfaceOdOutputTypeAdapter
- Parameters:
outputProperty
- the specified output propertyodIterator
- the iterator through the current OD Matrixmode
- the current modetimePeriod
- the current time period- Returns:
- the value of the specified property (or an Exception if an error has occurred)
-
getIterationIndexForSubOutputType
public Optional<Integer> getIterationIndexForSubOutputType(SubOutputTypeEnum outputTypeEnum) throws PlanItException
ODSkimOutputType.COST: Cost is collected through the shortest path in iteration i based on the link costs of iteration i-1, so the od cost of i-1 are only known once we are in iteration i, hence this information is trailing behind one iteration, and we can only store it in i. Hence, we must reduce the iteration index by 1 to obtain the true iteration index that goes with this information. all other od information is based on the actual iteration index and will return i- Specified by:
getIterationIndexForSubOutputType
in interfaceOutputTypeAdapter
- Overrides:
getIterationIndexForSubOutputType
in classOutputTypeAdapterImpl
- Parameters:
outputTypeEnum
- , allowed to be null, in that case it is assumed there does not exist a suboutputtype for this output type- Returns:
- iterationIndexForData
- Throws:
PlanItException
- thrown if exception
-
-