View Javadoc
1   package org.opentrafficsim.road.gtu.generator.characteristics;
2   
3   import org.opentrafficsim.core.gtu.GTUCharacteristics;
4   import org.opentrafficsim.core.network.Node;
5   import org.opentrafficsim.core.network.route.Route;
6   import org.opentrafficsim.road.gtu.lane.VehicleModel;
7   import org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalPlannerFactory;
8   
9   /**
10   * Characteristics for a lane base GTU. This class is used to store all characteristics of a (not-yet constructed) LaneBasedGTU.
11   * <p>
12   * Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
13   * BSD-style license. See <a href="http://opentrafficsim.org/docs/current/license.html">OpenTrafficSim License</a>.
14   * <p>
15   * @version $Revision$, $LastChangedDate$, by $Author$, initial version Mar 8, 2016 <br>
16   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
17   * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
18   */
19  public class LaneBasedGTUCharacteristics extends GTUCharacteristics
20  {
21      /** */
22      private static final long serialVersionUID = 1L;
23  
24      /** The strategical planner factory. */
25      private final LaneBasedStrategicalPlannerFactory<?> strategicalPlannerFactory;
26  
27      /** Route. */
28      private final Route route;
29  
30      /** Origin. */
31      private final Node origin;
32  
33      /** Destination. */
34      private final Node destination;
35  
36      /** Vehicle model. */
37      private final VehicleModel vehicleModel;
38  
39      /**
40       * Construct a new set of lane based GTU characteristics.
41       * @param gtuCharacteristics GTUCharacteristics; characteristics of the super GTU type to be used for the GTU
42       * @param laneBasedStrategicalPlannerFactory LaneBasedStrategicalPlannerFactory&lt;?&gt;; the strategical planner for the
43       *            GTU
44       * @param route Route; route
45       * @param origin Node; origin
46       * @param destination Node; destination
47       * @param vehicleModel VehicleModel; vehicle model
48       */
49      public LaneBasedGTUCharacteristics(final GTUCharacteristics gtuCharacteristics,
50              final LaneBasedStrategicalPlannerFactory<?> laneBasedStrategicalPlannerFactory, final Route route,
51              final Node origin, final Node destination, final VehicleModel vehicleModel)
52      {
53          super(gtuCharacteristics.getGTUType(), gtuCharacteristics.getLength(), gtuCharacteristics.getWidth(),
54                  gtuCharacteristics.getMaximumSpeed(), gtuCharacteristics.getMaximumAcceleration(),
55                  gtuCharacteristics.getMaximumDeceleration(), gtuCharacteristics.getFront());
56          this.strategicalPlannerFactory = laneBasedStrategicalPlannerFactory;
57          this.route = route;
58          this.origin = origin;
59          this.destination = destination;
60          this.vehicleModel = vehicleModel;
61      }
62  
63      /**
64       * @return LaneBasedStrategicalPlannerFactory; the strategical planner factory for the GTU
65       */
66      public final LaneBasedStrategicalPlannerFactory<?> getStrategicalPlannerFactory()
67      {
68          return this.strategicalPlannerFactory;
69      }
70  
71      /**
72       * @return Route; route
73       */
74      public final Route getRoute()
75      {
76          return this.route;
77      }
78  
79      /**
80       * @return Node; origin
81       */
82      public Node getOrigin()
83      {
84          return this.origin;
85      }
86  
87      /**
88       * @return Node; destination
89       */
90      public Node getDestination()
91      {
92          return this.destination;
93      }
94  
95      /**
96       * Returns the vehicle model.
97       * @return VehicleModel; vehicle model
98       */
99      public VehicleModel getVehicleModel()
100     {
101         return this.vehicleModel;
102     }
103 
104 }