public abstract class AbstractHeadway extends Object implements Headway
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Headway.ObjectType
Constructor and Description |
---|
AbstractHeadway(Headway.ObjectType objectType,
String id,
org.djunits.value.vdouble.scalar.Length distance)
Construct a new Headway information object, for a non-moving object ahead of us or behind us.
|
AbstractHeadway(Headway.ObjectType objectType,
String id,
org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Length length)
Construct a new Headway information object, for a non-moving object ahead of us or behind us.
|
AbstractHeadway(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)
Construct a new Headway information object, for a non-moving object parallel with us.
|
AbstractHeadway(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)
Construct a new Headway information object, for a non-moving object parallel with us.
|
AbstractHeadway(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,
org.djunits.value.vdouble.scalar.Speed speed,
org.djunits.value.vdouble.scalar.Acceleration acceleration)
Construct a new Headway information object, for a moving object parallel with us.
|
AbstractHeadway(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.Speed speed,
org.djunits.value.vdouble.scalar.Acceleration acceleration)
Construct a new Headway information object, for a moving object parallel with us.
|
AbstractHeadway(Headway.ObjectType objectType,
String id,
org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Length length,
org.djunits.value.vdouble.scalar.Speed speed,
org.djunits.value.vdouble.scalar.Acceleration acceleration)
Construct a new Headway information object, for a moving object ahead of us or behind us.
|
AbstractHeadway(Headway.ObjectType objectType,
String id,
org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Speed speed,
org.djunits.value.vdouble.scalar.Acceleration acceleration)
Construct a new Headway information object, for a moving object ahead of us or behind us.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
org.djunits.value.vdouble.scalar.Acceleration |
getAcceleration() |
org.djunits.value.vdouble.scalar.Length |
getDistance()
Retrieve the strongly typed distance to the other object.
|
String |
getId() |
org.djunits.value.vdouble.scalar.Length |
getLength() |
Headway.ObjectType |
getObjectType() |
org.djunits.value.vdouble.scalar.Length |
getOverlap()
Return the (perceived) overlap with the other object.
|
org.djunits.value.vdouble.scalar.Length |
getOverlapFront()
Return the (perceived) front overlap to the other object.
|
org.djunits.value.vdouble.scalar.Length |
getOverlapRear()
Return the (perceived) rear overlap to the other object.
|
org.djunits.value.vdouble.scalar.Speed |
getSpeed() |
int |
hashCode() |
boolean |
isAhead() |
boolean |
isBehind() |
boolean |
isParallel() |
String |
toString() |
public AbstractHeadway(Headway.ObjectType objectType, String id, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration) throws org.opentrafficsim.core.gtu.GTUException
objectType
- the perceived object type, can be null if object type unknown.id
- 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.speed
- the (perceived) speed of the other object; can be null if unknown.acceleration
- the (perceived) acceleration of the other object; can be null if unknown.org.opentrafficsim.core.gtu.GTUException
- when id is null, or parameters are inconsistentpublic AbstractHeadway(Headway.ObjectType objectType, String id, org.djunits.value.vdouble.scalar.Length distance) throws org.opentrafficsim.core.gtu.GTUException
objectType
- the perceived object type, can be null if object type unknown.id
- 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.org.opentrafficsim.core.gtu.GTUException
- when id is null, or parameters are inconsistentpublic AbstractHeadway(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.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration) throws org.opentrafficsim.core.gtu.GTUException
objectType
- the perceived object type, can be null if object type unknown.id
- 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.speed
- the (perceived) speed of the other object; can be null if unknown.acceleration
- the (perceived) acceleration of the other object; can be null if unknown.org.opentrafficsim.core.gtu.GTUException
- when id is null, or parameters are inconsistentpublic AbstractHeadway(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) throws org.opentrafficsim.core.gtu.GTUException
objectType
- the perceived object type, can be null if object type unknown.id
- 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.org.opentrafficsim.core.gtu.GTUException
- when id is null, or parameters are inconsistentpublic AbstractHeadway(Headway.ObjectType objectType, String id, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Length length, org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration) throws org.opentrafficsim.core.gtu.GTUException
objectType
- the perceived object type, can be null if object type unknown.id
- 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.speed
- the (perceived) speed of the other object; can be null if unknown.acceleration
- the (perceived) acceleration of the other object; can be null if unknown.org.opentrafficsim.core.gtu.GTUException
- when id is null, or parameters are inconsistentpublic AbstractHeadway(Headway.ObjectType objectType, String id, org.djunits.value.vdouble.scalar.Length distance, org.djunits.value.vdouble.scalar.Length length) throws org.opentrafficsim.core.gtu.GTUException
objectType
- the perceived object type, can be null if object type unknown.id
- 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.org.opentrafficsim.core.gtu.GTUException
- when id is null, or parameters are inconsistentpublic AbstractHeadway(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, org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Acceleration acceleration) throws org.opentrafficsim.core.gtu.GTUException
objectType
- the perceived object type, can be null if object type unknown.id
- 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.speed
- the (perceived) speed of the other object; can be null if unknown.acceleration
- the (perceived) acceleration of the other object; can be null if unknown.org.opentrafficsim.core.gtu.GTUException
- when id is null, or parameters are inconsistentpublic AbstractHeadway(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) throws org.opentrafficsim.core.gtu.GTUException
objectType
- the perceived object type, can be null if object type unknown.id
- 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.org.opentrafficsim.core.gtu.GTUException
- when id is null, or parameters are inconsistentpublic final String getId()
public final org.djunits.value.vdouble.scalar.Length getLength()
public final org.djunits.value.vdouble.scalar.Speed getSpeed()
public final org.djunits.value.vdouble.scalar.Length getDistance()
getDistance
in interface Headway
public final Headway.ObjectType getObjectType()
getObjectType
in interface Headway
public final org.djunits.value.vdouble.scalar.Acceleration getAcceleration()
getAcceleration
in interface Headway
public final org.djunits.value.vdouble.scalar.Length getOverlapFront()
---------- | GTU 1 | -----> ---------- --------------- | GTU 2 | -----> --------------- | a | b | c |
getOverlapFront
in interface Headway
public final org.djunits.value.vdouble.scalar.Length getOverlapRear()
---------- | GTU 1 | -----> ---------- --------------- | GTU 2 | -----> --------------- | a | b | c |
getOverlapRear
in interface Headway
public final org.djunits.value.vdouble.scalar.Length getOverlap()
---------- | GTU 1 | -----> ---------- --------------- | GTU 2 | -----> --------------- | a | b | c |
getOverlap
in interface Headway
public final boolean isAhead()
public final boolean isBehind()
public final boolean isParallel()
isParallel
in interface Headway
Copyright © 2014–2016 Delft University of Technology. All rights reserved.