Class NMRCollectMostRestrictingTurnConsumer
- java.lang.Object
-
- org.goplanit.assignment.ltm.sltm.consumer.NMRCollectMostRestrictingTurnConsumer
-
- All Implemented Interfaces:
ApplyToNodeModelResult
public class NMRCollectMostRestrictingTurnConsumer extends Object implements ApplyToNodeModelResult
A functional class that consumes the result of a node model update in order to obtain the most restrictive out link for the given in link provided- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description NMRCollectMostRestrictingTurnConsumer(EdgeSegment entrySegment)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acceptNonBlockingLinkBasedResult(DirectedVertex node, double[] sendingFlows)
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).void
acceptTurnBasedResult(DirectedVertex node, org.ojalgo.array.Array1D<Double> flowAcceptanceFactors, NodeModel nodeModel)
Result of a node model updateEdgeSegment
getMostRestrictingOutSegment()
boolean
hasMostRestrictingOutSegment()
-
-
-
Constructor Detail
-
NMRCollectMostRestrictingTurnConsumer
public NMRCollectMostRestrictingTurnConsumer(EdgeSegment entrySegment)
Constructor- Parameters:
entrySegment
- to collect most restricting out link for
-
-
Method Detail
-
acceptNonBlockingLinkBasedResult
public void acceptNonBlockingLinkBasedResult(DirectedVertex node, double[] sendingFlows)
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 interfaceApplyToNodeModelResult
- Parameters:
node
- to usesendingFlows
- 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> flowAcceptanceFactors, NodeModel nodeModel)
Result of a node model update- Specified by:
acceptTurnBasedResult
in interfaceApplyToNodeModelResult
- Parameters:
node
- to useflowAcceptanceFactors
- resulting from the update, localised for the node based on its entry segment iterator ordernodeModel
- that was applied
-
hasMostRestrictingOutSegment
public boolean hasMostRestrictingOutSegment()
-
getMostRestrictingOutSegment
public EdgeSegment getMostRestrictingOutSegment()
-
-