Class AbstractHeadwayLaneBasedObject

All Implemented Interfaces:
Serializable, Comparable<Headway>, org.djutils.base.Identifiable, PerceivedObject, Headway, HeadwayLaneBasedObject
Direct Known Subclasses:
HeadwayBusStop, HeadwayConflict, HeadwayStopLine, HeadwayTrafficLight

public abstract class AbstractHeadwayLaneBasedObject extends AbstractHeadwayCopy implements HeadwayLaneBasedObject
Lane based object headway with constructors for stationary information.

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

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
  • Constructor Details

    • AbstractHeadwayLaneBasedObject

      public AbstractHeadwayLaneBasedObject(Headway.ObjectType objectType, String id, org.djunits.value.vdouble.scalar.Length overlapFront, org.djunits.value.vdouble.scalar.Length overlap, org.djunits.value.vdouble.scalar.Length overlapRear, org.djunits.value.vdouble.scalar.Length length, Lane lane) throws GtuException
      Construct a new Headway information object, for a non-moving object parallel with us.
      Parameters:
      objectType - ObjectType; the perceived object type, can be null if object type unknown.
      id - String; the id of the object for comparison purposes, can not be null.
      overlapFront - the front-front distance to the other object; if this constructor is used, this value cannot be null.
      overlap - the 'center' overlap with the other object; if this constructor is used, this value cannot be null.
      overlapRear - the rear-rear distance to the other object; if this constructor is used, this value cannot be null.
      length - the length of the other object; if this constructor is used, length cannot be null.
      lane - Lane; the lane.
      Throws:
      GtuException - when id is null, or parameters are inconsistent
    • AbstractHeadwayLaneBasedObject

      public AbstractHeadwayLaneBasedObject(Headway.ObjectType objectType, String id, org.djunits.value.vdouble.scalar.Length overlapFront, org.djunits.value.vdouble.scalar.Length overlap, org.djunits.value.vdouble.scalar.Length overlapRear, Lane lane) throws GtuException
      Construct a new Headway information object, for a non-moving object parallel with us.
      Parameters:
      objectType - ObjectType; the perceived object type, can be null if object type unknown.
      id - String; the id of the object for comparison purposes, can not be null.
      overlapFront - the front-front distance to the other object; if this constructor is used, this value cannot be null.
      overlap - the 'center' overlap with the other object; if this constructor is used, this value cannot be null.
      overlapRear - the rear-rear distance to the other object; if this constructor is used, this value cannot be null.
      lane - Lane; the lane.
      Throws:
      GtuException - when id is null, or parameters are inconsistent
    • AbstractHeadwayLaneBasedObject

      public AbstractHeadwayLaneBasedObject(Headway.ObjectType objectType, String id, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Length length, Lane lane) throws GtuException
      Construct a new Headway information object, for a non-moving object ahead of us or behind us.
      Parameters:
      objectType - ObjectType; the perceived object type, can be null if object type unknown.
      id - String; the id of the object for comparison purposes, can not be null.
      distance - the distance to the other object; if this constructor is used, distance cannot be null.
      length - the length of the other object; if this constructor is used, length cannot be null.
      lane - Lane; the lane.
      Throws:
      GtuException - when id is null, or parameters are inconsistent
    • AbstractHeadwayLaneBasedObject

      public AbstractHeadwayLaneBasedObject(Headway.ObjectType objectType, String id, org.djunits.value.vdouble.scalar.Length distance, Lane lane) throws GtuException
      Construct a new Headway information object, for a non-moving object ahead of us or behind us.
      Parameters:
      objectType - ObjectType; the perceived object type, can be null if object type unknown.
      id - String; the id of the object for comparison purposes, can not be null.
      distance - the distance to the other object; if this constructor is used, distance cannot be null.
      lane - Lane; the lane.
      Throws:
      GtuException - when id is null, or parameters are inconsistent
  • Method Details

    • getLane

      public Lane getLane()
      Lane at which the object is located.
      Specified by:
      getLane in interface HeadwayLaneBasedObject
      Returns:
      Lane; lane at which the object is located