1 package org.opentrafficsim.road.gtu.lane.plan.operational;
2
3 import java.io.Serializable;
4
5 import org.djunits.value.vdouble.scalar.Acceleration;
6 import org.opentrafficsim.core.network.LateralDirectionality;
7
8
9
10
11
12
13
14
15
16
17
18
19
20 public class SimpleOperationalPlan implements Serializable
21 {
22
23
24 private static final long serialVersionUID = 20160811L;
25
26
27 private Acceleration acceleration;
28
29
30 private final LateralDirectionality laneChangeDirection;
31
32
33
34
35 public SimpleOperationalPlan(final Acceleration acceleration)
36 {
37 this.acceleration = acceleration;
38 this.laneChangeDirection = null;
39 }
40
41
42
43
44
45 public SimpleOperationalPlan(final Acceleration acceleration, final LateralDirectionality laneChangeDirection)
46 {
47 this.acceleration = acceleration;
48 this.laneChangeDirection = laneChangeDirection;
49 }
50
51
52
53
54 public final Acceleration getAcceleration()
55 {
56 return this.acceleration;
57 }
58
59
60
61
62 public final LateralDirectionality getLaneChangeDirection()
63 {
64 return this.laneChangeDirection;
65 }
66
67
68
69
70
71 public final void minimumAcceleration(final Acceleration a)
72 {
73 this.acceleration = Acceleration.min(this.acceleration, a);
74 }
75
76
77 @SuppressWarnings("checkstyle:designforextension")
78 public String toString()
79 {
80 return "SimpleOperationalPlan [Acceleration=" + this.acceleration + ", change=" + this.laneChangeDirection + "]";
81 }
82
83 }