Class GTUGeneratorIndividualOld
java.lang.Object
org.djutils.event.EventProducer
org.opentrafficsim.road.gtu.generator.AbstractGTUGeneratorOld
org.opentrafficsim.road.gtu.generator.GTUGeneratorIndividualOld
- All Implemented Interfaces:
java.io.Serializable
,Locatable
,EventProducerInterface
,GtuGeneratorQueue
public class GTUGeneratorIndividualOld extends AbstractGTUGeneratorOld implements java.io.Serializable
Generate GTUs.
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Version:
- $Revision: 1401 $, $LastChangedDate: 2015-09-14 01:33:02 +0200 (Mon, 14 Sep 2015) $, by $Author: averbraeck $,
initial version Feb 2, 2015
- Author:
- Alexander Verbraeck, Peter Knoppers
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class org.opentrafficsim.road.gtu.generator.AbstractGTUGeneratorOld
numberGTUs
Fields inherited from interface org.djutils.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
-
Constructor Summary
Constructors Constructor Description GTUGeneratorIndividualOld(java.lang.String name, OTSSimulatorInterface simulator, GTUType gtuType, java.lang.Class<?> gtuClass, ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit> initialSpeedDist, ContinuousDistDoubleScalar.Rel<Duration,DurationUnit> interarrivelTimeDist, ContinuousDistDoubleScalar.Rel<Length,LengthUnit> lengthDist, ContinuousDistDoubleScalar.Rel<Length,LengthUnit> widthDist, ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit> maximumSpeedDist, long maxGTUs, Time startTime, Time endTime, Lane lane, Length position, GTUDirectionality direction, LaneBasedStrategicalPlannerFactory<? extends LaneBasedStrategicalPlanner> strategicalPlannerFactory, Generator<Route> routeGenerator, OTSRoadNetwork network)
-
Method Summary
Modifier and Type Method Description ContinuousDistDoubleScalar.Rel<Length,LengthUnit>
getLengthDist()
ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit>
getMaximumSpeedDist()
OTSSimulatorInterface
getSimulator()
java.io.Serializable
getSourceId()
ContinuousDistDoubleScalar.Rel<Length,LengthUnit>
getWidthDist()
java.lang.String
toString()
Methods inherited from class org.opentrafficsim.road.gtu.generator.AbstractGTUGeneratorOld
checkCarBuilderList, enoughSpace, generate, getBounds, getEndTime, getGtuClass, getGtuType, getInitialSpeedDist, getInterarrivelTimeDist, getLocation, getMaxGTUs, getName, getQueueLengths, getStartTime, getStrategicalPlannerFactory, headway
Methods inherited from class org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, getEventTypesWithListeners, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
-
Constructor Details
-
GTUGeneratorIndividualOld
public GTUGeneratorIndividualOld(java.lang.String name, OTSSimulatorInterface simulator, GTUType gtuType, java.lang.Class<?> gtuClass, ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit> initialSpeedDist, ContinuousDistDoubleScalar.Rel<Duration,DurationUnit> interarrivelTimeDist, ContinuousDistDoubleScalar.Rel<Length,LengthUnit> lengthDist, ContinuousDistDoubleScalar.Rel<Length,LengthUnit> widthDist, ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit> maximumSpeedDist, long maxGTUs, Time startTime, Time endTime, Lane lane, Length position, GTUDirectionality direction, LaneBasedStrategicalPlannerFactory<? extends LaneBasedStrategicalPlanner> strategicalPlannerFactory, Generator<Route> routeGenerator, OTSRoadNetwork network) throws SimRuntimeException- Parameters:
name
- String; the name of the generatorgtuType
- GTUType; the type of GTU to generategtuClass
- Class<?>; the gtu class to instantiateinitialSpeedDist
- ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit>; distribution of the initial speed of the GTUinterarrivelTimeDist
- ContinuousDistDoubleScalar.Rel<Duration,DurationUnit>; distribution of the interarrival timemaxGTUs
- long; maximum number of GTUs to generatestartTime
- Time; start time of generation (delayed start)endTime
- Time; end time of generationsimulator
- OTSSimulatorInterface; simulator to schedule next arrival eventslengthDist
- ContinuousDistDoubleScalar.Rel<Length,LengthUnit>; distribution of the length of the GTUwidthDist
- ContinuousDistDoubleScalar.Rel<Length,LengthUnit>; distribution of the width of the GTUmaximumSpeedDist
- ContinuousDistDoubleScalar.Rel<Speed,SpeedUnit>; distribution of the maximum speed of the GTUlane
- Lane; Lane on which newly GTUs are placedposition
- Length; position on the lane, relative to the design line of the linkdirection
- GTUDirectionality; the direction on the lane in which the GTU has to be generated (DIR_PLUS, or DIR_MINUS)strategicalPlannerFactory
- LaneBasedStrategicalPlannerFactory<? extends LaneBasedStrategicalPlanner>; the lane-based strategical planner factory to userouteGenerator
- Generator<Route>; route generatornetwork
- OTSRoadNetwork; the network to register the GTU into- Throws:
SimRuntimeException
- when simulation scheduling fails
-
-
Method Details
-
getSimulator
- Specified by:
getSimulator
in classAbstractGTUGeneratorOld
- Returns:
- simulator.
-
getLengthDist
- Specified by:
getLengthDist
in classAbstractGTUGeneratorOld
- Returns:
- lengthDist.
-
getWidthDist
- Specified by:
getWidthDist
in classAbstractGTUGeneratorOld
- Returns:
- widthDist.
-
getMaximumSpeedDist
- Specified by:
getMaximumSpeedDist
in classAbstractGTUGeneratorOld
- Returns:
- maximumSpeedDist.
-
toString
public final java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
getSourceId
public java.io.Serializable getSourceId()- Specified by:
getSourceId
in interfaceEventProducerInterface
- Specified by:
getSourceId
in classEventProducer
-