public class TemplateGTUType extends Object implements Serializable, Generator<GTUCharacteristics>
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: 2016-05-07 22:15:51 +0200 (Sat, 07 May 2016) $, @version $Revision: 2002 $, by $Author: averbraeck $,
initial version Jul 8, 2014
| Constructor and Description |
|---|
TemplateGTUType(GTUType gtuType,
IdGenerator idGenerator,
Generator<org.djunits.value.vdouble.scalar.Length> lengthGenerator,
Generator<org.djunits.value.vdouble.scalar.Length> widthGenerator,
Generator<org.djunits.value.vdouble.scalar.Speed> maximumVelocityGenerator,
OTSDEVSSimulatorInterface simulator,
OTSNetwork network) |
| Modifier and Type | Method and Description |
|---|---|
GTUCharacteristics |
draw()
Generate the next object.
|
GTUType |
getGTUType() |
IdGenerator |
getIdGenerator()
Retrieve the id generator.
|
OTSDEVSSimulatorInterface |
getSimulator() |
String |
toString() |
public TemplateGTUType(GTUType gtuType, IdGenerator idGenerator, Generator<org.djunits.value.vdouble.scalar.Length> lengthGenerator, Generator<org.djunits.value.vdouble.scalar.Length> widthGenerator, Generator<org.djunits.value.vdouble.scalar.Speed> maximumVelocityGenerator, OTSDEVSSimulatorInterface simulator, OTSNetwork network) throws NullPointerException
gtuType - GTUType, 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>; generator for the length of the GTU type (parallel with driving
direction).widthGenerator - Generator<Length>; generator for the width of the GTU type (perpendicular to driving
direction).maximumVelocityGenerator - Generator<Speed>; generator for the maximum velocity of the GTU type (in the
driving direction).simulator - OTSDEVSSimulatorInterface; the simulator.network - OTSNetwork; the network that will own the GTUsNullPointerException - when one of the arguments is nullpublic GTUCharacteristics draw() throws ProbabilityException, ParameterException
draw in interface Generator<GTUCharacteristics>ProbabilityException - if the stored collection is emptyParameterException - in case of a parameter exceptionpublic final IdGenerator getIdGenerator()
public final OTSDEVSSimulatorInterface getSimulator()
public GTUType getGTUType()
Copyright © 2014–2016 Delft University of Technology. All rights reserved.