1 package org.opentrafficsim.road.gtu.lane.control;
2
3 import org.djunits.value.vdouble.scalar.Acceleration;
4 import org.djunits.value.vdouble.scalar.Duration;
5 import org.opentrafficsim.base.parameters.ParameterTypeDuration;
6 import org.opentrafficsim.base.parameters.constraint.NumericConstraint;
7 import org.opentrafficsim.road.gtu.lane.LaneBasedGtu;
8
9
10
11
12
13
14
15
16
17
18
19
20 public interface DelayedActuation
21 {
22
23
24 DelayedActuation NONE = new DelayedActuation()
25 {
26
27 @Override
28 public Acceleration delayActuation(final Acceleration desiredAcceleration, final LaneBasedGtu gtu)
29 {
30 return desiredAcceleration;
31 }
32 };
33
34
35 ParameterTypeDuration TAU = new ParameterTypeDuration("tau_actuation", "Actuation delay", Duration.instantiateSI(0.1),
36 NumericConstraint.POSITIVE);
37
38
39 DelayedActuation TAUDELAYED = new DelayedActuation()
40 {
41
42 @Override
43 public Acceleration delayActuation(final Acceleration desiredAcceleration, final LaneBasedGtu gtu)
44 {
45
46 return desiredAcceleration.minus(gtu.getAcceleration());
47 }
48 };
49
50
51
52
53
54
55
56 Acceleration delayActuation(Acceleration desiredAcceleration, LaneBasedGtu gtu);
57
58 }