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,
org.opentrafficsim.core.gtu.GTUType gtuType)
Construct a new HeadwayGTU information object.
|
HeadwayGTU(String gtuId,
org.djunits.value.vdouble.scalar.Speed gtuSpeed,
org.djunits.value.vdouble.scalar.Length.Rel distance,
org.opentrafficsim.core.gtu.GTUType gtuType)
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.
|
String |
getGtuId() |
org.djunits.value.vdouble.scalar.Speed |
getGtuSpeed() |
org.opentrafficsim.core.gtu.GTUType |
getGtuType() |
String |
toString() |
public HeadwayGTU(String gtuId, org.djunits.value.vdouble.scalar.Speed gtuSpeed, org.djunits.value.vdouble.scalar.Length.Rel distance, org.opentrafficsim.core.gtu.GTUType gtuType)
gtuId
- the id of the GTU for comparison purposes, can be null if no GTU but just headwaygtuSpeed
- the (perceived) speed of the GTU in front of us; can be null if unknowndistance
- the distance to the other GTU; if the other GTU is parallel, use distance nullgtuType
- the perceived GTU type, can be null if GTU unknownpublic HeadwayGTU(String gtuId, org.djunits.value.vdouble.scalar.Speed gtuSpeed, double distanceSI, org.opentrafficsim.core.gtu.GTUType gtuType)
gtuId
- the id of the GTU for comparison purposes, can be null if no GTU but just headwaygtuSpeed
- the (perceived) speed of the GTU in front of us; can be null if unknowndistanceSI
- the distance to the other GTU; if the other GTU is parallel, use distance nullgtuType
- the perceived GTU type, can be null if GTU unknownpublic final String getGtuId()
public final org.djunits.value.vdouble.scalar.Speed getGtuSpeed()
public final org.djunits.value.vdouble.scalar.Length.Rel getDistance()
public final org.opentrafficsim.core.gtu.GTUType getGtuType()
Copyright © 2014–2016 Delft University of Technology. All rights reserved.