Class LoopDetector.PlatoonSizes
java.lang.Object
org.opentrafficsim.road.network.object.detector.LoopDetector.LoopDetectorMeasurement<org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement,List<Integer>>
org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonSizes
- Enclosing class:
- LoopDetector
public static class LoopDetector.PlatoonSizes
extends LoopDetector.LoopDetectorMeasurement<org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement,List<Integer>>
Measurement of platoon sizes based on time between previous GTU exit and GTU entry.
-
Constructor Summary
ConstructorsConstructorDescriptionPlatoonSizes(org.djunits.value.vdouble.scalar.Duration threshold) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurementaccumulateEntry(org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement cumulative, LaneBasedGtu gtu, LoopDetector loopDetector) Returns an accumulated value for when the front reaches the detector.protected org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurementaccumulateExit(org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement cumulative, LaneBasedGtu gtu, LoopDetector loopDetector) Returns an accumulated value for when the rear leaves the detector.aggregate(org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement cumulative, int count, org.djunits.value.vdouble.scalar.Duration aggregation) Returns an aggregated value.Measurement description.Methods inherited from class org.opentrafficsim.road.network.object.detector.LoopDetector.LoopDetectorMeasurement
getName, getUnit, getValueType, identity, isPeriodic, toString
-
Constructor Details
-
PlatoonSizes
public PlatoonSizes(org.djunits.value.vdouble.scalar.Duration threshold) Constructor.- Parameters:
threshold- maximum time between two vehicles that are considered to be in the same platoon
-
-
Method Details
-
accumulateEntry
protected org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement accumulateEntry(org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement cumulative, LaneBasedGtu gtu, LoopDetector loopDetector) Description copied from class:LoopDetector.LoopDetectorMeasurementReturns an accumulated value for when the front reaches the detector. GTU's may trigger an exit without having triggered an entry due to a lane change. Reversely, GTU's may not trigger an exit while they did trigger an entry.- Specified by:
accumulateEntryin classLoopDetector.LoopDetectorMeasurement<org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement,List<Integer>> - Parameters:
cumulative- accumulated valuegtu- gtuloopDetector- loop detector- Returns:
- accumulated value
-
accumulateExit
protected org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement accumulateExit(org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement cumulative, LaneBasedGtu gtu, LoopDetector loopDetector) Description copied from class:LoopDetector.LoopDetectorMeasurementReturns an accumulated value for when the rear leaves the detector. GTU's may trigger an exit without having triggered an entry due to a lane change. Reversely, GTU's may not trigger an exit while they did trigger an entry.- Specified by:
accumulateExitin classLoopDetector.LoopDetectorMeasurement<org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement,List<Integer>> - Parameters:
cumulative- accumulated valuegtu- gtuloopDetector- loop detector- Returns:
- accumulated value
-
aggregate
protected List<Integer> aggregate(org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement cumulative, int count, org.djunits.value.vdouble.scalar.Duration aggregation) Description copied from class:LoopDetector.LoopDetectorMeasurementReturns an aggregated value.- Specified by:
aggregatein classLoopDetector.LoopDetectorMeasurement<org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement,List<Integer>> - Parameters:
cumulative- accumulated valuecount- GTU gtuCountaggregation- aggregation period- Returns:
- aggregated value
-
getDescription
Description copied from class:LoopDetector.LoopDetectorMeasurementMeasurement description.- Overrides:
getDescriptionin classLoopDetector.LoopDetectorMeasurement<org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement,List<Integer>> - Returns:
- measurement description.
-