Class BushFlowUpdateConsumer<T extends NetworkFlowUpdateData>
- java.lang.Object
-
- org.goplanit.assignment.ltm.sltm.consumer.BushFlowUpdateConsumer<T>
-
- Direct Known Subclasses:
BushTurnFlowUpdateConsumer
public class BushFlowUpdateConsumer<T extends NetworkFlowUpdateData> extends Object implements Consumer<Bush>
Base Consumer to apply during bush based network 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 BushFlowUpdateConsumer(T dataConfig)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Bush originBush)
Update(increase) the (network) flows based on the bush at hand as dictated by the data configurationprotected void
applyAcceptedTurnFlowUpdate(int prevSegmentId, EdgeSegment currentSegment, double turnAcceptedFlow)
Register the bush accepted turn flow to the turn if required.
-
-
-
Field Detail
-
dataConfig
protected T extends NetworkFlowUpdateData dataConfig
data and configuration used for a flow update by derived classes
-
-
Constructor Detail
-
BushFlowUpdateConsumer
public BushFlowUpdateConsumer(T dataConfig)
Constructor- Parameters:
dataConfig
- to use
-
-
Method Detail
-
applyAcceptedTurnFlowUpdate
protected void applyAcceptedTurnFlowUpdate(int prevSegmentId, EdgeSegment currentSegment, double turnAcceptedFlow)
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:
prevSegmentId
- of turncurrentSegment
- of turnturnAcceptedFlow
- sending flow rate of turn
-
accept
public void accept(Bush originBush)
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>
-
-