1 package org.opentrafficsim.road.gtu.lane.tactical.directedlanechange;
2
3 import org.djunits.value.vdouble.scalar.Acceleration;
4 import org.opentrafficsim.road.gtu.lane.perception.LanePerception;
5 import org.opentrafficsim.road.gtu.lane.tactical.following.DualAccelerationStep;
6
7
8
9
10
11
12
13
14
15
16
17 public class DirectedEgoistic extends AbstractDirectedLaneChangeModel
18 {
19
20
21
22 public DirectedEgoistic(final LanePerception perception)
23 {
24 super(perception);
25 }
26
27
28 @Override
29 public final Acceleration applyDriverPersonality(final DualAccelerationStep accelerations)
30 {
31
32 return accelerations.getLeaderAcceleration();
33 }
34
35
36 @Override
37 public final String getName()
38 {
39 return "Egoistic";
40 }
41
42
43 @Override
44 public final String getLongName()
45 {
46 return "Egoistic lane change model (as described by Treiber).";
47 }
48
49
50 @Override
51 public final String toString()
52 {
53 return "DirectedEgoistic [name=" + this.getName() + "]";
54 }
55
56 }