1 package org.opentrafficsim.road.gtu.lane;
2
3 import java.util.Set;
4
5 import org.djunits.value.vdouble.scalar.Speed;
6 import org.opentrafficsim.core.gtu.GTUCharacteristics;
7 import org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalPlanner;
8 import org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalPlannerFactory;
9 import org.opentrafficsim.road.network.lane.DirectedLanePosition;
10
11
12
13
14
15
16
17
18
19
20
21 public class LaneBasedGTUCharacteristics extends GTUCharacteristics
22 {
23
24 private static final long serialVersionUID = 1L;
25
26
27 private final LaneBasedStrategicalPlannerFactory<?> strategicalPlannerFactory;
28
29
30 private final Speed speed;
31
32
33 private final Set<DirectedLanePosition> initialLongitudinalPositions;
34
35
36
37
38
39
40
41
42 public LaneBasedGTUCharacteristics(final GTUCharacteristics gtuCharacteristics,
43 final LaneBasedStrategicalPlannerFactory<?> laneBasedStrategicalPlannerFactory, final Speed speed,
44 final Set<DirectedLanePosition> initialLongitudinalPositions)
45 {
46 super(gtuCharacteristics.getGTUType(), gtuCharacteristics.getIdGenerator(), gtuCharacteristics.getLength(),
47 gtuCharacteristics.getWidth(), gtuCharacteristics.getMaximumSpeed(), gtuCharacteristics.getSimulator(),
48 gtuCharacteristics.getNetwork());
49 this.strategicalPlannerFactory = laneBasedStrategicalPlannerFactory;
50 this.speed = speed;
51 this.initialLongitudinalPositions = initialLongitudinalPositions;
52 }
53
54
55
56
57 public final LaneBasedStrategicalPlannerFactory<?> getStrategicalPlannerFactory()
58 {
59 return this.strategicalPlannerFactory;
60 }
61
62
63
64
65 public final Speed getSpeed()
66 {
67 return this.speed;
68 }
69
70
71
72
73 public final Set<DirectedLanePosition> getInitialLongitudinalPositions()
74 {
75 return this.initialLongitudinalPositions;
76 }
77
78 }