ID - the ID-type of the GTU, e.g. String or a certain Enum type.public class TemplateGTUType<ID> extends Object implements Serializable
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.
$LastChangedDate: 2015-07-26 01:01:13 +0200 (Sun, 26 Jul 2015) $, @version $Revision: 1155 $, by $Author: averbraeck $,
initial version Jul 8, 2014
| Constructor and Description |
|---|
TemplateGTUType(ID id,
DistContinuousDoubleScalar.Rel<LengthUnit> lengthDist,
DistContinuousDoubleScalar.Rel<LengthUnit> widthDist,
DistContinuousDoubleScalar.Abs<SpeedUnit> maximumSpeedDist,
OTSDEVSSimulatorInterface simulator) |
| Modifier and Type | Method and Description |
|---|---|
GTUType<ID> |
getGtuType() |
DoubleScalar.Rel<LengthUnit> |
getLength() |
DoubleScalar.Abs<SpeedUnit> |
getMaximumVelocity() |
OTSDEVSSimulatorInterface |
getSimulator() |
DoubleScalar.Rel<LengthUnit> |
getWidth() |
boolean |
isCompatible(LaneType<?> laneType) |
public TemplateGTUType(ID id, DistContinuousDoubleScalar.Rel<LengthUnit> lengthDist, DistContinuousDoubleScalar.Rel<LengthUnit> widthDist, DistContinuousDoubleScalar.Abs<SpeedUnit> maximumSpeedDist, OTSDEVSSimulatorInterface simulator)
id - The id of the GTUType to make it identifiable.lengthDist - the length of the GTU type (parallel with driving direction).widthDist - the width of the GTU type (perpendicular to driving direction).maximumSpeedDist - the maximum speed of the GTU type (in the driving direction).simulator - the simulator.public final boolean isCompatible(LaneType<?> laneType)
laneType - lane type to look for compatibility.public final DoubleScalar.Rel<LengthUnit> getLength()
public final DoubleScalar.Rel<LengthUnit> getWidth()
public final DoubleScalar.Abs<SpeedUnit> getMaximumVelocity()
public final OTSDEVSSimulatorInterface getSimulator()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.