public class LaneBasedTemplateGTUType extends org.opentrafficsim.core.gtu.TemplateGTUType implements LaneBasedGTUCharacteristicsGenerator
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 |
|---|
LaneBasedTemplateGTUType(String typeId,
org.opentrafficsim.core.idgenerator.IdGenerator idGenerator,
org.opentrafficsim.core.distributions.Generator<org.djunits.value.vdouble.scalar.Length.Rel> lengthGenerator,
org.opentrafficsim.core.distributions.Generator<org.djunits.value.vdouble.scalar.Length.Rel> widthGenerator,
org.opentrafficsim.core.distributions.Generator<org.djunits.value.vdouble.scalar.Speed> maximumSpeedGenerator,
org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator,
org.opentrafficsim.core.distributions.Generator<LaneBasedStrategicalPlanner> strategicalPlannerGenerator,
org.opentrafficsim.core.distributions.Generator<LanePerceptionFull> perceptionGenerator,
Set<DirectedLanePosition> initialLongitudinalPositions,
org.opentrafficsim.core.distributions.Generator<org.djunits.value.vdouble.scalar.Speed> initialSpeedGenerator,
org.opentrafficsim.core.network.OTSNetwork network) |
| Modifier and Type | Method and Description |
|---|---|
LaneBasedGTUCharacteristics |
draw()
Generate the properties of the next GTU.
|
String |
toString() |
getGTUType, getIdGenerator, getSimulatorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSimulatorpublic LaneBasedTemplateGTUType(String typeId, org.opentrafficsim.core.idgenerator.IdGenerator idGenerator, org.opentrafficsim.core.distributions.Generator<org.djunits.value.vdouble.scalar.Length.Rel> lengthGenerator, org.opentrafficsim.core.distributions.Generator<org.djunits.value.vdouble.scalar.Length.Rel> widthGenerator, org.opentrafficsim.core.distributions.Generator<org.djunits.value.vdouble.scalar.Speed> maximumSpeedGenerator, org.opentrafficsim.core.dsol.OTSDEVSSimulatorInterface simulator, org.opentrafficsim.core.distributions.Generator<LaneBasedStrategicalPlanner> strategicalPlannerGenerator, org.opentrafficsim.core.distributions.Generator<LanePerceptionFull> perceptionGenerator, Set<DirectedLanePosition> initialLongitudinalPositions, org.opentrafficsim.core.distributions.Generator<org.djunits.value.vdouble.scalar.Speed> initialSpeedGenerator, org.opentrafficsim.core.network.OTSNetwork network) throws org.opentrafficsim.core.gtu.GTUException
typeId - The id of the GTUType to make it identifiable.idGenerator - IdGenerator; the id generator used to generate names for GTUs constructed using this TemplateGTUType.
Provide null to use the default id generator of AbstractGTU.lengthGenerator - Generator<Length.Rel> generator for the length of the GTU type (parallel with driving
direction).widthGenerator - Generator<Length.Rel>; generator for the width of the GTU type (perpendicular to driving
direction).maximumSpeedGenerator - Generator<Speed>; generator for the maximum speed of the GTU type (in the driving
direction).simulator - the simulator.strategicalPlannerGenerator - Generator<LaneBasedStrategicalPlanner>; generator for the strategical planner
(e.g., route determination)perceptionGenerator - Generator<LanePerceptionFull>; generator for the lane-based perception model of
generated GTUsinitialLongitudinalPositions - Set<DirectedLanePosition>; the initial lanes, directions and positions of
generated GTUsinitialSpeedGenerator - Generator<Speed>; the generator for the initial speed of generated GTUsnetwork - OTSNetwork; the network that all generated GTUs are registered inorg.opentrafficsim.core.gtu.GTUException - when GTUType defined more than oncepublic LaneBasedGTUCharacteristics draw() throws org.opentrafficsim.core.distributions.ProbabilityException
draw in interface org.opentrafficsim.core.distributions.Generator<org.opentrafficsim.core.gtu.GTUCharacteristics>draw in interface LaneBasedGTUCharacteristicsGeneratordraw in class org.opentrafficsim.core.gtu.TemplateGTUTypeorg.opentrafficsim.core.distributions.ProbabilityException - when a generator is improperly configuredpublic String toString()
toString in class org.opentrafficsim.core.gtu.TemplateGTUTypeCopyright © 2014–2016 Delft University of Technology. All rights reserved.