public class HeadwayGTU extends Object
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
HeadwayGTU(String gtuId,
org.djunits.value.vdouble.scalar.Speed gtuSpeed,
double distanceSI)
Construct a new HeadwayGTU information object.
|
| Modifier and Type | Method and Description |
|---|---|
org.djunits.value.vdouble.scalar.Length.Rel |
getDistance()
Retrieve the strongly typed distance to the other GTU.
|
double |
getDistanceSI()
Retrieve the distance to the other GTU in meters.
|
String |
getGtuId() |
org.djunits.value.vdouble.scalar.Speed |
getGtuSpeed() |
String |
toString() |
public HeadwayGTU(String gtuId, org.djunits.value.vdouble.scalar.Speed gtuSpeed, double distanceSI)
gtuId - the id of the GTU for comparison purposesgtuSpeed - the (perceived) speed of the GTU in front of us; can be null if unknowndistanceSI - the distance to the other GTU in meters; if the other GTU is parallel, use distance Double.NaNpublic final String getGtuId()
public final org.djunits.value.vdouble.scalar.Speed getGtuSpeed()
public final double getDistanceSI()
public final org.djunits.value.vdouble.scalar.Length.Rel getDistance()
Copyright © 2014–2016 Delft University of Technology. All rights reserved.