Class MeanSpeed
- java.lang.Object
-
- org.opentrafficsim.kpi.sampling.indicator.AbstractIndicator<Speed>
-
- org.opentrafficsim.kpi.sampling.indicator.MeanSpeed
-
public class MeanSpeed extends AbstractIndicator<Speed>
Sum of trajectory lengths divided by sum of trajectory durations.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version Sep 22, 2016
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Constructor Summary
Constructors Constructor Description MeanSpeed(TotalTravelDistance travelDistance, TotalTravelTime travelTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <G extends GtuDataInterface>
Speedcalculate(Query<G> query, Time startTime, Time endTime, List<TrajectoryGroup<G>> trajectoryGroups)
Calculate value for given trajectory group.String
toString()
-
Methods inherited from class org.opentrafficsim.kpi.sampling.indicator.AbstractIndicator
getValue, getValue
-
-
-
-
Constructor Detail
-
MeanSpeed
public MeanSpeed(TotalTravelDistance travelDistance, TotalTravelTime travelTime)
- Parameters:
travelDistance
- TotalTravelDistance; travel distance indicatortravelTime
- TotalTravelTime; travel time indicator
-
-
Method Detail
-
calculate
protected <G extends GtuDataInterface> Speed calculate(Query<G> query, Time startTime, Time endTime, List<TrajectoryGroup<G>> trajectoryGroups)
Calculate value for given trajectory group.- Specified by:
calculate
in classAbstractIndicator<Speed>
- Type Parameters:
G
- gtu data type- Parameters:
query
- Query<G>; querystartTime
- Time; start time of interval to calculate indicator overendTime
- Time; start time of interval to calculate indicator overtrajectoryGroups
- List<TrajectoryGroup<G>>; group of trajectories to calculate the indicator for- Returns:
- value for given trajectory group
-
-