Class InitialiseBushEdgeSegmentDemandConsumer
- java.lang.Object
-
- org.goplanit.assignment.ltm.sltm.consumer.InitialiseBushEdgeSegmentDemandConsumer
-
- All Implemented Interfaces:
Consumer<EdgeSegment>
public class InitialiseBushEdgeSegmentDemandConsumer extends Object implements Consumer<EdgeSegment>
Initialise the bush for a given origin/destination with the shortest path being offered from the destination to the origin via the provided edge segments in the callback.Add the edge segments to the bush and update the turn sending flow accordingly.
Consumer can be reused for multiple destinations by updating the destination and demand that goes with it.
- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description InitialiseBushEdgeSegmentDemandConsumer(Bush originBush)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(EdgeSegment edgeSegment)
void
setDestination(DirectedVertex destination, double originDestinationDemandPcuH)
Update to next destination with accompanying demand.
-
-
-
Constructor Detail
-
InitialiseBushEdgeSegmentDemandConsumer
public InitialiseBushEdgeSegmentDemandConsumer(Bush originBush)
Constructor- Parameters:
originBush
- to use
-
-
Method Detail
-
accept
public void accept(EdgeSegment edgeSegment)
- Specified by:
accept
in interfaceConsumer<EdgeSegment>
-
setDestination
public void setDestination(DirectedVertex destination, double originDestinationDemandPcuH)
Update to next destination with accompanying demand. Demand is applied to all edge segments on the provided edge segments via the consumer callback- Parameters:
destination
- to setoriginDestinationDemandPcuH
- total travel demand of the od combination
-
-