ID
- the ID-type of the GTU, e.g. String or a certain Enum type.public class TemplateGTUType<ID> extends GTUType<ID>
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
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 |
---|---|
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.