Class RootedBushFlowUpdateConsumerImpl<T extends NetworkFlowUpdateData>
- java.lang.Object
-
- org.goplanit.assignment.ltm.sltm.consumer.RootedBushFlowUpdateConsumerImpl<T>
-
- All Implemented Interfaces:
Consumer<RootedLabelledBush>
,BushFlowUpdateConsumer<RootedLabelledBush>
- Direct Known Subclasses:
RootedBushTurnFlowUpdateConsumer
public class RootedBushFlowUpdateConsumerImpl<T extends NetworkFlowUpdateData> extends Object implements BushFlowUpdateConsumer<RootedLabelledBush>
Base Consumer to apply during bush based network loading flow update for each origin bushDerived implementation can apply different changes to each of the (turn/link) flows on the bushes by
- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description protected T
dataConfig
data and configuration used for a flow update by derived classes
-
Constructor Summary
Constructors Constructor Description RootedBushFlowUpdateConsumerImpl(T dataConfig)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(RootedLabelledBush bush)
Update(increase) the (network) flows based on the bush at hand as dictated by the data configurationprotected void
applyAcceptedTurnFlowUpdate(EdgeSegment prevSegment, BushFlowLabel prevLabel, EdgeSegment currentSegment, BushFlowLabel currLabel, double turnAcceptedFlowPcuH)
Register the bush accepted turn flow to the turn if required.-
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.consumer.BushFlowUpdateConsumer
getAcceptedTurnFlows
-
-
-
-
Field Detail
-
dataConfig
protected T extends NetworkFlowUpdateData dataConfig
data and configuration used for a flow update by derived classes
-
-
Constructor Detail
-
RootedBushFlowUpdateConsumerImpl
public RootedBushFlowUpdateConsumerImpl(T dataConfig)
Constructor- Parameters:
dataConfig
- to use
-
-
Method Detail
-
applyAcceptedTurnFlowUpdate
protected void applyAcceptedTurnFlowUpdate(EdgeSegment prevSegment, BushFlowLabel prevLabel, EdgeSegment currentSegment, BushFlowLabel currLabel, double turnAcceptedFlowPcuH)
Register the bush accepted turn flow to the turn if required. Default implementation does nothing but provide a hook for derived classes that do require to do something with turn accepted flows- Parameters:
prevSegment
- of turnprevLabel
- at handcurrentSegment
- of turncurrLabel
- at handturnAcceptedFlowPcuH
- sending flow rate of turn
-
accept
public void accept(RootedLabelledBush bush)
Update(increase) the (network) flows based on the bush at hand as dictated by the data configuration- Specified by:
accept
in interfaceConsumer<T extends NetworkFlowUpdateData>
-
-