ID
- the ID type of the GTU (e.g., String or Integer)public abstract class AbstractGTUGenerator<ID> extends Object
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.
Modifier and Type | Field and Description |
---|---|
protected long |
numberGTUs
number of generated GTUs.
|
Constructor and Description |
---|
AbstractGTUGenerator(String name,
OTSDEVSSimulatorInterface simulator,
GTUType<ID> gtuType,
Class<GTU<ID>> gtuClass,
GTUFollowingModel gtuFollowingModel,
DistContinuousDoubleScalar.Abs<SpeedUnit> initialSpeedDist,
DistContinuousDoubleScalar.Rel<TimeUnit> interarrivelTimeDist,
long maxGTUs,
OTSSimTimeDouble startTime,
OTSSimTimeDouble endTime,
Lane lane) |
Modifier and Type | Method and Description |
---|---|
protected void |
generate()
Generate a GTU.
|
OTSSimTimeDouble |
getEndTime() |
Class<GTU<ID>> |
getGtuClass() |
GTUFollowingModel |
getGtuFollowingModel() |
GTUType<ID> |
getGtuType() |
DistContinuousDoubleScalar.Abs<SpeedUnit> |
getInitialSpeedDist() |
DistContinuousDoubleScalar.Rel<TimeUnit> |
getInterarrivelTimeDist() |
abstract DistContinuousDoubleScalar.Rel<LengthUnit> |
getLengthDist() |
long |
getMaxGTUs() |
abstract DistContinuousDoubleScalar.Abs<SpeedUnit> |
getMaximumSpeedDist() |
String |
getName() |
abstract OTSDEVSSimulatorInterface |
getSimulator() |
OTSSimTimeDouble |
getStartTime() |
abstract DistContinuousDoubleScalar.Rel<LengthUnit> |
getWidthDist() |
public AbstractGTUGenerator(String name, OTSDEVSSimulatorInterface simulator, GTUType<ID> gtuType, Class<GTU<ID>> gtuClass, GTUFollowingModel gtuFollowingModel, DistContinuousDoubleScalar.Abs<SpeedUnit> initialSpeedDist, DistContinuousDoubleScalar.Rel<TimeUnit> interarrivelTimeDist, long maxGTUs, OTSSimTimeDouble startTime, OTSSimTimeDouble endTime, Lane lane) throws RemoteException, nl.tudelft.simulation.dsol.SimRuntimeException
name
- the name of the generator.simulator
- the simulator to schedule the start of the generation.gtuType
- the type of GTU to generate.gtuClass
- the gtu class to instantiate.gtuFollowingModel
- the GTU following model to use.initialSpeedDist
- distribution of the initial speed of the GTU.interarrivelTimeDist
- distribution of the interarrival time.maxGTUs
- maximum number of GTUs to generate.startTime
- start time of generation (delayed start).endTime
- end time of generation.lane
- the lane to generate the GTU on -- at the end for now.nl.tudelft.simulation.dsol.SimRuntimeException
- when simulation scheduling failsRemoteException
- when remote simulator cannot be reachedpublic abstract OTSDEVSSimulatorInterface getSimulator()
public abstract DistContinuousDoubleScalar.Rel<LengthUnit> getLengthDist()
public abstract DistContinuousDoubleScalar.Rel<LengthUnit> getWidthDist()
public abstract DistContinuousDoubleScalar.Abs<SpeedUnit> getMaximumSpeedDist()
public final String getName()
public final GTUFollowingModel getGtuFollowingModel()
public final DistContinuousDoubleScalar.Abs<SpeedUnit> getInitialSpeedDist()
public final DistContinuousDoubleScalar.Rel<TimeUnit> getInterarrivelTimeDist()
public final long getMaxGTUs()
public final OTSSimTimeDouble getStartTime()
public final OTSSimTimeDouble getEndTime()
Copyright © 2014–2015 Delft University of Technology. All rights reserved.