Class OdOutputTypeAdapterImpl

    • Constructor Detail

      • OdOutputTypeAdapterImpl

        public OdOutputTypeAdapterImpl​(OutputType outputType,
                                       TrafficAssignment trafficAssignment)
        Constructor
        Parameters:
        outputType - the output type for the current persistence
        trafficAssignment - 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 interface OdOutputTypeAdapter
        Parameters:
        outputProperty - the specified output property
        odIterator - the iterator through the current OD Matrix
        mode - the current mode
        timePeriod - 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 interface OutputTypeAdapter
        Overrides:
        getIterationIndexForSubOutputType in class OutputTypeAdapterImpl
        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