Class AbstractLaneBasedIndividualGTU

java.lang.Object
All Implemented Interfaces:
java.io.Serializable, Locatable, EventProducerInterface, Identifiable, Drawable, GTU, LaneBasedGTU
Direct Known Subclasses:
LaneBasedIndividualGTU

public abstract class AbstractLaneBasedIndividualGTU
extends AbstractLaneBasedGTU2
Specific type of LaneBasedGTU. This class adds length, width, maximum speed and a reference to the simulator to the AbstractLaneBasedGTU.

Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Version:
$Revision: 1401 $, $LastChangedDate: 2015-09-14 01:33:02 +0200 (Mon, 14 Sep 2015) $, by $Author: averbraeck $, initial version Jan 1, 2015
Author:
Alexander Verbraeck, Peter Knoppers
See Also:
Serialized Form
  • Constructor Details

    • AbstractLaneBasedIndividualGTU

      public AbstractLaneBasedIndividualGTU​(java.lang.String id, GTUType gtuType, Length length, Length width, Speed maximumSpeed, OTSSimulatorInterface simulator, OTSRoadNetwork network) throws GTUException
      Construct a new AbstractLaneBasedIndividualGTU.
      Parameters:
      id - String; the id of the GTU
      gtuType - GTUType; the type of GTU, e.g. TruckType, CarType, BusType
      length - Length; the maximum length of the GTU (parallel with driving direction)
      width - Length; the maximum width of the GTU (perpendicular to driving direction)
      maximumSpeed - Speed; the maximum speed of the GTU (in the driving direction)
      simulator - OTSSimulatorInterface; the simulator
      network - OTSRoadNetwork; the network that the GTU is initially registered in
      Throws:
      GTUException - when a parameter is invalid
  • Method Details

    • getLength

      public final Length getLength()
    • getWidth

      public final Length getWidth()
    • getMaximumSpeed

      public final Speed getMaximumSpeed()
    • setNoLaneChangeDistance

      public final void setNoLaneChangeDistance​(Length distance)
      Set distance over which the GTU should not change lane after being created.
      Parameters:
      distance - Length; distance over which the GTU should not change lane after being created
    • laneChangeAllowed

      public final boolean laneChangeAllowed()
      Returns whether a lane change is allowed.
      Returns:
      whether a lane change is allowed