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

    Constructors
    Constructor
    Description
    PlatoonSizes(org.djunits.value.vdouble.scalar.Duration threshold)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement
    accumulateEntry(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.PlatoonMeasurement
    accumulateExit(org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement cumulative, LaneBasedGtu gtu, LoopDetector loopDetector)
    Returns an accumulated value for when the rear leaves the detector.
    protected List<Integer>
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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.LoopDetectorMeasurement
      Returns 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:
      accumulateEntry in class LoopDetector.LoopDetectorMeasurement<org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement,List<Integer>>
      Parameters:
      cumulative - accumulated value
      gtu - gtu
      loopDetector - 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.LoopDetectorMeasurement
      Returns 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:
      accumulateExit in class LoopDetector.LoopDetectorMeasurement<org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement,List<Integer>>
      Parameters:
      cumulative - accumulated value
      gtu - gtu
      loopDetector - 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.LoopDetectorMeasurement
      Returns an aggregated value.
      Specified by:
      aggregate in class LoopDetector.LoopDetectorMeasurement<org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement,List<Integer>>
      Parameters:
      cumulative - accumulated value
      count - GTU gtuCount
      aggregation - aggregation period
      Returns:
      aggregated value
    • getDescription

      public String getDescription()
      Description copied from class: LoopDetector.LoopDetectorMeasurement
      Measurement description.
      Overrides:
      getDescription in class LoopDetector.LoopDetectorMeasurement<org.opentrafficsim.road.network.object.detector.LoopDetector.PlatoonMeasurement,List<Integer>>
      Returns:
      measurement description.