1 package org.opentrafficsim.kpi.sampling.data;
2
3 import org.djunits.value.vfloat.scalar.FloatSpeed;
4 import org.opentrafficsim.kpi.interfaces.GtuData;
5
6
7
8
9
10
11
12
13
14
15
16 public class ReferenceSpeed extends ExtendedDataSpeed<GtuData>
17 {
18
19
20 public static final ReferenceSpeed INSTANCE = new ReferenceSpeed();
21
22
23
24
25 public ReferenceSpeed()
26 {
27 super("referenceSpeed", "Reference speed (minimum of speed limit and maximum vehicle speed)");
28 }
29
30
31 @Override
32 public final FloatSpeed getValue(final GtuData gtu)
33 {
34 return FloatSpeed.instantiateSI((float) gtu.getReferenceSpeed().si);
35 }
36
37
38 @Override
39 public final String toString()
40 {
41 return "Reference Speed";
42 }
43
44 }