Class PathLinkSendingFlowUpdateConsumer
- java.lang.Object
-
- org.goplanit.assignment.ltm.sltm.consumer.PathFlowUpdateConsumer<NetworkFlowUpdateData>
-
- org.goplanit.assignment.ltm.sltm.consumer.PathLinkSendingFlowUpdateConsumer
-
- All Implemented Interfaces:
TriConsumer<OdZone,OdZone,Double>
public class PathLinkSendingFlowUpdateConsumer 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 PathLinkSendingFlowUpdateConsumer(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(int, EdgeSegment, double)
protected double
applySingleFlowUpdate(int prevSegmentId, 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
-
PathLinkSendingFlowUpdateConsumer
public PathLinkSendingFlowUpdateConsumer(NetworkFlowUpdateData dataConfig, OdPaths odPaths)
Constructor- Parameters:
dataConfig
- containing data configuration to useodPaths
- to use
-
-
Method Detail
-
applySingleFlowUpdate
protected double applySingleFlowUpdate(int prevSegmentId, EdgeSegment currentSegment, double turnSendingFlowPcuH)
For each entry segment update the in(sending)flow- Specified by:
applySingleFlowUpdate
in classPathFlowUpdateConsumer<NetworkFlowUpdateData>
- Parameters:
prevSegmentId
- 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(int, EdgeSegment, double)
- Specified by:
applyPathFinalSegmentFlowUpdate
in classPathFlowUpdateConsumer<NetworkFlowUpdateData>
- Parameters:
lastEdgeSegment
- to useacceptedPathFlowRate
- to use
-
-