Class AbstractHeadwayLaneBasedObject
java.lang.Object
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway
org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy
org.opentrafficsim.road.gtu.lane.perception.headway.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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opentrafficsim.road.gtu.lane.perception.headway.Headway
Headway.ObjectType
-
Constructor Summary
ConstructorDescriptionAbstractHeadwayLaneBasedObject
(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) Construct a new Headway information object, for a non-moving object parallel with us.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) Construct a new Headway information object, for a non-moving object parallel with us.AbstractHeadwayLaneBasedObject
(Headway.ObjectType objectType, String id, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Length length, Lane lane) Construct a new Headway information object, for a non-moving object ahead of us or behind us.AbstractHeadwayLaneBasedObject
(Headway.ObjectType objectType, String id, org.djunits.value.vdouble.scalar.Length distance, Lane lane) Construct a new Headway information object, for a non-moving object ahead of us or behind us. -
Method Summary
Methods inherited from class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadwayCopy
equals, getAcceleration, getId, getLength, getObjectType, getSpeed, hashCode
Methods inherited from class org.opentrafficsim.road.gtu.lane.perception.headway.AbstractHeadway
getDistance, getOverlap, getOverlapFront, getOverlapRear, isAhead, isBehind, isParallel, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opentrafficsim.road.gtu.lane.perception.headway.Headway
compareTo, getAcceleration, getDistance, getId, getLength, getObjectType, getOverlap, getOverlapFront, getOverlapRear, getSpeed, isAhead, isBehind, isParallel
-
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
Lane at which the object is located.- Specified by:
getLane
in interfaceHeadwayLaneBasedObject
- Returns:
- Lane; lane at which the object is located
-