Class PathLinkFlowUpdateConsumer
- java.lang.Object
-
- org.goplanit.assignment.ltm.sltm.consumer.PathFlowUpdateConsumer<NetworkFlowUpdateData>
-
- org.goplanit.assignment.ltm.sltm.consumer.PathLinkFlowUpdateConsumer
-
- All Implemented Interfaces:
TriConsumer<OdZone,OdZone,Double>
public class PathLinkFlowUpdateConsumer extends PathFlowUpdateConsumer<NetworkFlowUpdateData>
Consumer to apply during path based loading to update the inflows on the provided raw array by their link segment ids for each combination of origin, destination, and demand- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.assignment.ltm.sltm.consumer.PathFlowUpdateConsumer
dataConfig
-
-
Constructor Summary
Constructors Constructor Description PathLinkFlowUpdateConsumer(NetworkFlowUpdateData dataConfig, OdPaths odPaths)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyPathFinalSegmentFlowUpdate(EdgeSegment lastEdgeSegment, double acceptedPathFlowRate)
Apply final path flow on last segment that otherwise would not have been updated in the turn basedapplySingleFlowUpdate(EdgeSegment, EdgeSegment, double)
protected double
applySingleFlowUpdate(EdgeSegment prevSegment, EdgeSegment currentSegment, double turnSendingFlowPcuH)
For each entry segment update the in(sending)flow-
Methods inherited from class org.goplanit.assignment.ltm.sltm.consumer.PathFlowUpdateConsumer
accept
-
-
-
-
Constructor Detail
-
PathLinkFlowUpdateConsumer
public PathLinkFlowUpdateConsumer(NetworkFlowUpdateData dataConfig, OdPaths odPaths)
Constructor- Parameters:
dataConfig
- containing data configuration to useodPaths
- to use
-
-
Method Detail
-
applySingleFlowUpdate
protected double applySingleFlowUpdate(EdgeSegment prevSegment, EdgeSegment currentSegment, double turnSendingFlowPcuH)
For each entry segment update the in(sending)flow- Specified by:
applySingleFlowUpdate
in classPathFlowUpdateConsumer<NetworkFlowUpdateData>
- Parameters:
prevSegment
- to usecurrentSegment
- to useturnSendingFlowPcuH
- to use- Returns:
- accepted flow rate of turn after applying link acceptance factor
-
applyPathFinalSegmentFlowUpdate
protected void applyPathFinalSegmentFlowUpdate(EdgeSegment lastEdgeSegment, double acceptedPathFlowRate)
Apply final path flow on last segment that otherwise would not have been updated in the turn basedapplySingleFlowUpdate(EdgeSegment, EdgeSegment, double)
- Specified by:
applyPathFinalSegmentFlowUpdate
in classPathFlowUpdateConsumer<NetworkFlowUpdateData>
- Parameters:
lastEdgeSegment
- to useacceptedPathFlowRate
- to use
-
-