Class SplittingRateDataPartial
- java.lang.Object
-
- org.goplanit.assignment.ltm.sltm.loading.SplittingRateDataPartial
-
- All Implemented Interfaces:
SplittingRateData
public class SplittingRateDataPartial extends Object implements SplittingRateData
Store the splitting rates used during sLTM loading updates (Step 1 and 5). In this implementation we only track splitting rates of explicitly registered node. This is compatible with the basic PointQueue solution method where we do not require any information of nodes that are not potentially blocking. It requires the less memory than the other approach where we track all splitting rates of all used nodes.- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description SplittingRateDataPartial(int numberOfVertices)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.ojalgo.array.Array1D<Double>getSplittingRates(EdgeSegment entrySegment)Obtain the downstream splitting rates of given node entry segment (can be modified)TreeSet<DirectedVertex>getTrackedNodes()Collect all registered potentially blocking nodesbooleanisPotentiallyBlocking(DirectedVertex nodeToVerify)Verify if node is registered as potentially blockingbooleanisTracked(DirectedVertex nodeToVerify)Verify if node is registered as being tracked with splitting ratesvoidregisterPotentiallyBlockingNode(DirectedVertex potentiallyBlockingNode)Register a potentially blocking node so we not only track its splitting rates but also mark it as potentially blocking.voidregisterTrackedNode(DirectedVertex trackNode)Register a node so we are able to track its splitting rates (and turn flows) during loadingvoidresetPotentiallyBlockingNodes()Reset registered potentially blocking nodesvoidresetSplittingRates()Reset splitting rate datavoidresetTrackedNodes()Reset registered tracked nodes-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.assignment.ltm.sltm.loading.SplittingRateData
getSplittingRate, reset
-
-
-
-
Method Detail
-
registerPotentiallyBlockingNode
public void registerPotentiallyBlockingNode(DirectedVertex potentiallyBlockingNode)
Register a potentially blocking node so we not only track its splitting rates but also mark it as potentially blocking. This see to it that it is considered for node model updates which in turn might impact its splitting rates in a network setting- Parameters:
potentiallyBlockingNode- mark as potentially blocking (and track it if not already done so)
-
registerTrackedNode
public void registerTrackedNode(DirectedVertex trackNode)
Register a node so we are able to track its splitting rates (and turn flows) during loading- Parameters:
trackNode- node to track splitting rates and (turn) sending flows for
-
isTracked
public boolean isTracked(DirectedVertex nodeToVerify)
Verify if node is registered as being tracked with splitting rates- Specified by:
isTrackedin interfaceSplittingRateData- Parameters:
nodeToVerify- the node to verify- Returns:
- true when registered as tracked, false otherwise
-
isPotentiallyBlocking
public boolean isPotentiallyBlocking(DirectedVertex nodeToVerify)
Verify if node is registered as potentially blocking- Specified by:
isPotentiallyBlockingin interfaceSplittingRateData- Parameters:
nodeToVerify- the node to verify- Returns:
- true when registered as potentially blocking, false otherwise
-
getTrackedNodes
public TreeSet<DirectedVertex> getTrackedNodes()
Collect all registered potentially blocking nodes- Specified by:
getTrackedNodesin interfaceSplittingRateData- Returns:
- registered potentially blocking nodes
-
getSplittingRates
public org.ojalgo.array.Array1D<Double> getSplittingRates(EdgeSegment entrySegment)
Obtain the downstream splitting rates of given node entry segment (can be modified)- Specified by:
getSplittingRatesin interfaceSplittingRateData- Parameters:
entrySegment- to obtain for- Returns:
- currently set next splitting rates
-
resetTrackedNodes
public void resetTrackedNodes()
Reset registered tracked nodes- Specified by:
resetTrackedNodesin interfaceSplittingRateData
-
resetPotentiallyBlockingNodes
public void resetPotentiallyBlockingNodes()
Reset registered potentially blocking nodes- Specified by:
resetPotentiallyBlockingNodesin interfaceSplittingRateData
-
resetSplittingRates
public void resetSplittingRates()
Reset splitting rate data- Specified by:
resetSplittingRatesin interfaceSplittingRateData
-
-