Class PathFlowUpdateConsumer<T extends NetworkFlowUpdateData>

    • Field Detail

      • dataConfig

        protected T extends NetworkFlowUpdateData dataConfig
        data and configuration used for a flow update by derived classes
    • Constructor Detail

      • PathFlowUpdateConsumer

        public PathFlowUpdateConsumer​(T dataConfig,
                                      OdPaths odPaths)
        Constructor
        Parameters:
        dataConfig - to use
        odPaths - to use
    • Method Detail

      • applySingleFlowUpdate

        protected abstract double applySingleFlowUpdate​(EdgeSegment prevSegment,
                                                        EdgeSegment currentSegment,
                                                        double turnSendingFlowPcuH)
        Apply the flow to the turn (and update link sending flow if required)
        Parameters:
        prevSegment - of turn
        currentSegment - of turn
        turnSendingFlowPcuH - sending flow rate of turn
        Returns:
        accepted flow rate of turn after applying link acceptance factor
      • applyPathFinalSegmentFlowUpdate

        protected abstract void applyPathFinalSegmentFlowUpdate​(EdgeSegment lastEdgeSegment,
                                                                double acceptedPathFlowRate)
        Apply the flow to a final path segment (and update link sending flow if required) which has no outgoing edge segment on the turn
        Parameters:
        lastEdgeSegment - of path
        acceptedPathFlowRate - sending flow rate on last edge segment
      • accept

        public void accept​(OdZone origin,
                           OdZone destination,
                           Double odDemand)
        Update the turn flows for the path of the given origin,destination,demand combination
        Specified by:
        accept in interface TriConsumer<OdZone,​OdZone,​Double>
        Parameters:
        origin - first object to be processed
        destination - second object to be processed
        odDemand - third object to be processed