public static class Detector.PlatoonSizes extends Object implements Detector.DetectorMeasurement<Detector.PlatoonMeasurement,List<Integer>>
Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
PlatoonSizes(org.djunits.value.vdouble.scalar.Duration threshold)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Detector.PlatoonMeasurement |
accumulateEntry(Detector.PlatoonMeasurement cumulative,
LaneBasedGTU gtu,
Detector loopDetector)
Returns an accumulated value for when the front reaches the detector.
|
Detector.PlatoonMeasurement |
accumulateExit(Detector.PlatoonMeasurement cumulative,
LaneBasedGTU gtu,
Detector loopDetector)
Returns an accumulated value for when the rear leaves the detector.
|
List<Integer> |
aggregate(Detector.PlatoonMeasurement cumulative,
int count,
org.djunits.value.vdouble.scalar.Duration aggregation)
Returns an aggregated value.
|
String |
getName()
Returns the value name.
|
Detector.PlatoonMeasurement |
identity()
Returns the initial value before accumulation.
|
boolean |
isPeriodic()
Returns whether the measurement aggregates every aggregation period (or only over the entire simulation).
|
String |
stringValue(List<Integer> aggregate,
String format)
Returns a string representation of the aggregate result.
|
String |
toString() |
public PlatoonSizes(org.djunits.value.vdouble.scalar.Duration threshold)
threshold - Duration; maximum time between two vehicles that are considered to be in the same platoonpublic Detector.PlatoonMeasurement identity()
identity in interface Detector.DetectorMeasurement<Detector.PlatoonMeasurement,List<Integer>>public Detector.PlatoonMeasurement accumulateEntry(Detector.PlatoonMeasurement cumulative, LaneBasedGTU gtu, Detector loopDetector)
accumulateEntry in interface Detector.DetectorMeasurement<Detector.PlatoonMeasurement,List<Integer>>cumulative - C; accumulated valuegtu - LaneBasedGTU; gtuloopDetector - LoopDetector; loop detectorpublic Detector.PlatoonMeasurement accumulateExit(Detector.PlatoonMeasurement cumulative, LaneBasedGTU gtu, Detector loopDetector)
accumulateExit in interface Detector.DetectorMeasurement<Detector.PlatoonMeasurement,List<Integer>>cumulative - C; accumulated valuegtu - LaneBasedGTU; gtuloopDetector - LoopDetector; loop detectorpublic boolean isPeriodic()
isPeriodic in interface Detector.DetectorMeasurement<Detector.PlatoonMeasurement,List<Integer>>public List<Integer> aggregate(Detector.PlatoonMeasurement cumulative, int count, org.djunits.value.vdouble.scalar.Duration aggregation)
aggregate in interface Detector.DetectorMeasurement<Detector.PlatoonMeasurement,List<Integer>>cumulative - C; accumulated valuecount - int; GTU countaggregation - Duration; aggregation periodpublic String getName()
getName in interface Detector.DetectorMeasurement<Detector.PlatoonMeasurement,List<Integer>>public String stringValue(List<Integer> aggregate, String format)
stringValue in interface Detector.DetectorMeasurement<Detector.PlatoonMeasurement,List<Integer>>aggregate - A; aggregate resultformat - String; format stringCopyright © 2014–2018 Delft University of Technology. All rights reserved.