Class NMRUpdateEntryLinksOutflowConsumer

  • All Implemented Interfaces:
    ApplyToNodeModelResult

    public class NMRUpdateEntryLinksOutflowConsumer
    extends Object
    implements ApplyToNodeModelResult
    A functional class that consumes the result of a node model update in order to determine the next accepted outflows of incoming links of all nodes it is applied to
    Author:
    markr
    • Constructor Detail

      • NMRUpdateEntryLinksOutflowConsumer

        public NMRUpdateEntryLinksOutflowConsumer​(double[] outflowsToPopulate)
        Constructor
        Parameters:
        outflowsToPopulate - to use
    • Method Detail

      • acceptNonBlockingLinkBasedResult

        public void acceptNonBlockingLinkBasedResult​(DirectedVertex node,
                                                     double[] linkSegmentSendingFlows)
        A centroid node is a special node where all flow is always accepted (destination incoming links), or sending flows do not come from turns but from origin zone (origin exit links). As such we present only the original link segment sending flows
        Specified by:
        acceptNonBlockingLinkBasedResult in interface ApplyToNodeModelResult
        Parameters:
        node - to use
        linkSegmentSendingFlows - to use. Note that these are the network wide sending flows by link segment id, not localised for the node
      • acceptTurnBasedResult

        public void acceptTurnBasedResult​(DirectedVertex node,
                                          org.ojalgo.array.Array1D<Double> flowAcceptanceFactor,
                                          NodeModel nodeModel)
        Result of a node model update
        Specified by:
        acceptTurnBasedResult in interface ApplyToNodeModelResult
        Parameters:
        node - to use
        flowAcceptanceFactor - resulting from the update, localised for the node based on its entry segment iterator order
        nodeModel - that was applied