1 package org.opentrafficsim.road.gtu.lane;
2
3 import org.djunits.value.vdouble.scalar.Acceleration;
4
5
6
7
8
9
10
11
12
13
14
15
16 public interface VehicleModel
17 {
18
19
20 VehicleModel NONE = new VehicleModel()
21 {
22 @Override
23 public Acceleration boundAcceleration(final Acceleration acceleration, final LaneBasedGTU gtu)
24 {
25 return acceleration;
26 }
27 };
28
29
30 VehicleModel MINMAX = new VehicleModel()
31 {
32 @Override
33 public Acceleration boundAcceleration(final Acceleration acceleration, final LaneBasedGTU gtu)
34 {
35 return acceleration.si > gtu.getMaximumDeceleration().si
36 ? (acceleration.si < gtu.getMaximumAcceleration().si ? acceleration : gtu.getMaximumAcceleration())
37 : gtu.getMaximumDeceleration();
38 }
39 };
40
41
42
43
44
45
46
47 Acceleration boundAcceleration(Acceleration acceleration, LaneBasedGTU gtu);
48
49 }